Daniil Ovchinnikov created GROOVY-8050:

             Summary: Reference outer class property via inner class
                 Key: GROOVY-8050
                 URL: https://issues.apache.org/jira/browse/GROOVY-8050
             Project: Groovy
          Issue Type: Bug
          Components: Compiler, Static compilation, Static Type Checker
    Affects Versions: 2.4.7
            Reporter: Daniil Ovchinnikov

class Outer {
  def foo = 1
  Inner createInner() { new Inner() }
  class Inner {}

class Main {
  static void main(String[] args) {
    def i = new Outer().createInner()
    println i.foo // [Static type checking] - No such property: foo for class: 
  // works without @CompileStatic

I think should work in both static and dynamic contexts or fail in both.
Please close this issue if this is by design.

This message was sent by Atlassian JIRA

Reply via email to