Skip to content

Commit 3b8b24a

Browse files
committed
Remove obsolete diagnostic error for SI-6231
The previous commit means we no longer have a test that gets to this point.
1 parent cca4d51 commit 3b8b24a

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

src/compiler/scala/tools/nsc/transform/Mixin.scala

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,21 +1207,7 @@ abstract class Mixin extends InfoTransform with ast.TreeDSL {
12071207
val iface = toInterface(sym.owner.tpe).typeSymbol
12081208
val ifaceGetter = sym getter iface
12091209

1210-
def si6231Restriction() {
1211-
// See SI-6231 comments in LamdaLift for ideas on how to lift the restriction.
1212-
val msg = sm"""Implementation restriction: local ${iface.fullLocationString} is unable to automatically capture the
1213-
|free variable ${sym} on behalf of ${currentClass}. You can manually assign it to a val inside the trait,
1214-
|and refer to that val in ${currentClass}. For more details, see SI-6231."""
1215-
reporter.error(tree.pos, msg)
1216-
}
1217-
1218-
if (ifaceGetter == NoSymbol) {
1219-
if (sym.isParamAccessor) {
1220-
si6231Restriction()
1221-
EmptyTree
1222-
}
1223-
else abort("No getter for " + sym + " in " + iface)
1224-
}
1210+
if (ifaceGetter == NoSymbol) abort("No getter for " + sym + " in " + iface)
12251211
else typedPos(tree.pos)((qual DOT ifaceGetter)())
12261212

12271213
case Assign(Apply(lhs @ Select(qual, _), List()), rhs) =>

0 commit comments

Comments
 (0)