Skip to content

Commit b4fb9b0

Browse files
committed
Update
1 parent eff1edb commit b4fb9b0

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ object ExplicitOuter {
247247

248248
/** Class constructor takes an outer argument. Can be called only after phase ExplicitOuter. */
249249
def hasOuterParam(cls: ClassSymbol)(using Context): Boolean =
250-
!cls.is(Trait) && needsOuterIfReferenced(cls)
250+
!cls.is(Trait) && needsOuterAlways(cls)
251251

252252
/** Tree references an outer class of `cls` which is not a static owner.
253253
*/

tests/run/10838/A.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
public class A {
22
public class B {}
3-
}
3+
}

tests/run/10838/Test.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ object Test {
33
val a = new A
44
new a.B
55
}
6-
}
6+
}

0 commit comments

Comments
 (0)