XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.1.5
    • None
    • Compiler, syntax
    • n/a

    Description

      I propose a new operator ?=

      Instead of doing this:

      bar = bar ?: new Bar()
      assert bar != null

      params.foo = params.foo ?: defaultFoo
      assert params.foo != null

      with the ?= operator I could do this:

      bar ?= new Bar()
      assert bar != null

      params.foo ?= defaultFoo
      assert params.foo != null

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            coreynelson Corey Nelson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: