Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
-
None
Description
Bean-style references to static trait property in static scopes fail with unresolved variable errors.
This works:
trait T { static p = 1 } class C implements T { static m() { setP(2) setP(getP() + 1) return getP() } } C.m()
This fails:
trait T { static p = 1 } class C implements T { static m() { p = 2 // Apparent variable 'p' was found in a static scope but doesn't refer to a local variable, static field or class p += 1 return p } } C.m()