Groovy
  1. Groovy
  2. GROOVY-2503 MOP 2.0 design inflluencing issues
  3. GROOVY-1603

positional parameters in constructors behaves like a default constructor

    Details

    • Type: Sub-task Sub-task
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.0-RC-1
    • Fix Version/s: None
    • Component/s: groovy-runtime
    • Labels:
      None

      Description

      class Foo {
      String s
      Foo(s)

      { assert s == null this.s = s }

      }
      def foo = new Foo() // shouldn't call Foo(s) with null!
      assert foo
      assert !foo.s

      See http://www.nabble.com/always-default-constructor--tf2834900.html for more details.

        Activity

        Bernd Schiffer created issue -
        Guillaume Delcroix made changes -
        Field Original Value New Value
        Assignee Guillaume Laforge [ guillaume ] Jochen Theodorou [ blackdrag ]
        Jochen Theodorou made changes -
        Issue Type Bug [ 1 ] Improvement [ 4 ]
        Fix Version/s 2.0 [ 13489 ]
        Jochen Theodorou made changes -
        Issue Type Improvement [ 4 ] Bug [ 1 ]
        Jochen Theodorou made changes -
        Fix Version/s 3.0 [ 13489 ]
        Jochen Theodorou made changes -
        Parent GROOVY-2503 [ 61571 ]
        Issue Type Bug [ 1 ] Sub-task [ 7 ]
        Jochen Theodorou made changes -
        Component/s groovy-runtime [ 16250 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 13:32:57 UTC 2015 [ 1428240777691 ]
        Mark Thomas made changes -
        Workflow jira [ 12730733 ] Default workflow, editable Closed status [ 12742646 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 02:11:23 UTC 2015 [ 1428286283443 ]
        Mark Thomas made changes -
        Workflow jira [ 12969025 ] Default workflow, editable Closed status [ 12976742 ]
        Jochen Theodorou made changes -
        Assignee Jochen Theodorou [ blackdrag ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Bernd Schiffer
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development