Skip to content

Commit b2a7932

Browse files
committed
Don't allow accesses to <into> from source code
1 parent aaea883 commit b2a7932

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compiler/src/dotty/tools/dotc/typer/Typer.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2094,6 +2094,8 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
20942094
&& checkedArgs(1).tpe.derivesFrom(defn.RuntimeExceptionClass)
20952095
then
20962096
report.error(em"throws clause cannot be defined for RuntimeException", checkedArgs(1).srcPos)
2097+
else if tycon == defn.IntoType then
2098+
report.error(em"not found: <into>", tpt1.srcPos)
20972099
else if (ctx.isJava)
20982100
if tycon eq defn.ArrayClass then
20992101
checkedArgs match {

0 commit comments

Comments
 (0)