Groovy
  1. Groovy
  2. GROOVY-5178

STC allows assign an array to any type which is not an array

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-beta-1
    • Fix Version/s: 2.0-beta-2
    • Component/s: Static Type Checker
    • Labels:
      None
    • Flags:
      Patch

      Description

      STC allows assign an array to any type which is not an array

      import groovy.transform.*
      
      @TypeChecked 
      class Foo {
          def say() {
              FooAnother foo1 = new Foo[13] // but FooAnother[] foo1 = new Foo() reports a STC                        Error
          }
      }
      class FooAnother {
          
      }
      

        Activity

        Valery Shyshkin created issue -
        Cédric Champeau made changes -
        Field Original Value New Value
        Fix Version/s 2.0-beta-2 [ 18072 ]
        Assignee Cedric Champeau [ melix ]
        Affects Version/s 2.0-beta-1 [ 17925 ]
        Component/s SQL processing [ 12873 ]
        Component/s Static Type Checker [ 15261 ]
        Cédric Champeau made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Paul King made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 13:32:57 UTC 2015 [ 1428240777691 ]
        Mark Thomas made changes -
        Workflow jira [ 12734102 ] Default workflow, editable Closed status [ 12745687 ]
        Mark Thomas made changes -
        Flags Patch [ 10430 ]
        Patch Submitted Yes [ 10763 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 02:11:23 UTC 2015 [ 1428286283443 ]
        Mark Thomas made changes -
        Workflow jira [ 12971417 ] Default workflow, editable Closed status [ 12979221 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        1d 3h 38m 1 Cédric Champeau 09/Dec/11 11:14
        Resolved Resolved Closed Closed
        14d 15h 53m 1 Paul King 24/Dec/11 03:08

          People

          • Assignee:
            Cédric Champeau
            Reporter:
            Valery Shyshkin
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development