Skip to content

Commit b15ba90

Browse files
committed
Fix #2379: Deprecate with in types only under -strict
1 parent ad2bb89 commit b15ba90

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/src/dotty/tools/dotc/parsing/Parsers.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,8 @@ object Parsers {
763763

764764
def withTypeRest(t: Tree): Tree =
765765
if (in.token == WITH) {
766-
deprecationWarning(DeprecatedWithOperator())
766+
if (ctx.settings.strict.value)
767+
deprecationWarning(DeprecatedWithOperator())
767768
in.nextToken()
768769
AndTypeTree(t, withType())
769770
}

0 commit comments

Comments
 (0)