scala / bug

Scala 2 bug reports only. Please, no questions — proper bug reports only.
https://scala-lang.org
232 stars 21 forks source link

invisible forward reference when using default arguments #2489

Closed scabug closed 13 years ago

scabug commented 15 years ago
scala> class A { def foo { def bar(a: Int = 1) = a; bar(); val u = 0 } }
<console>:4: error: forward reference extends over definition of value u
       class A { def foo { def bar(a: Int = 1) = a; bar(); val u = 0 } }
                                                    ^
scabug commented 15 years ago

Imported From: https://issues.scala-lang.org/browse/SI-2489?orig=1 Reporter: @lrytz

scabug commented 14 years ago

@lrytz said: fixed in r19561

scabug commented 14 years ago

@lrytz said: improved fix in r19894

scabug commented 13 years ago

@lrytz said: (In e1a0866ce7) close #4036, fix #2489. synthetic members (companion objects, default getters) are emitted next to their correspondant. review by extempore.