test example for ODASA-6859

This commit is contained in:
Henning Makholm
2019-01-17 23:25:55 +01:00
parent 6af8948a3f
commit 26b6581bdb

View File

@@ -260,4 +260,14 @@ public class Classes {
};
}
}
/** Has a method that calls a constructor that accessing an enclosing instance of this class. */
class CannotBeStatic4 {
CannotBeStatic4() {
System.out.println(foo);
}
void foo() {
new CannotBeStatic4();
}
}
}