Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-705

Syntax error in correct code

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-beta-9
    • 1.0-JSR-4
    • None
    • None
    • Windows XP, Java 1.4.2_06

    Description

      I have three classes, like this:

      class A {
      }

      class B extends A {
      C myc
      }

      class C {
      void blah(A mya)

      { ((B)mya) }

      }

      If I put them in separate files and type "x = new C()" in groovysh, it throws an exeption "No such class: C in constructor call" which I've realized means "syntax error." If I put all three classes in a single file, it works fine. If I comment out "C myc" or the cast in blah(), it also works fine.

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            mcspanky Martin C. Martin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: