File tree Expand file tree Collapse file tree 3 files changed +27
-1
lines changed
src/dotty/tools/dotc/transform Expand file tree Collapse file tree 3 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -292,7 +292,7 @@ class LambdaLift extends MiniPhase with IdentityDenotTransformer { thisTransform
292292 val encClass = local.enclosingClass
293293 val topClass = local.topLevelClass
294294 // member of a static object
295- if (encClass.isStatic && encClass.isProperlyContainedIn (topClass)) {
295+ if (encClass.isStatic && encClass.isContainedIn (topClass)) {
296296 // though the second condition seems weird, it's not true for symbols which are defined in some
297297 // weird combinations of super calls.
298298 (encClass, EmptyFlags )
Original file line number Diff line number Diff line change 1+ 1
2+ 2
Original file line number Diff line number Diff line change 1+ object Test {
2+ def foo (x : Int ) = {
3+ println(x)
4+ }
5+
6+ def outer (x : Int ) = {
7+ def inner () = {
8+ foo(x)
9+ }
10+ inner()
11+ }
12+
13+ def outer2 (x : Int ) = {
14+ def inner2 () = {
15+ Test .foo(x)
16+ }
17+ inner2()
18+ }
19+
20+ def main (args : Array [String ]): Unit = {
21+ outer(1 )
22+ outer2(2 )
23+ }
24+ }
You can’t perform that action at this time.
0 commit comments