Skip to content

Commit 099074c

Browse files
committed
Deprecate old syntax
1 parent ecdf9bf commit 099074c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3117,6 +3117,7 @@ object Parsers {
31173117
case GIVEN =>
31183118
val start = in.skipToken()
31193119
if in.token == USCORE then
3120+
deprecationWarning(em"`given _` is deprecated in imports; replace with just `given`", start)
31203121
in.nextToken()
31213122
ImportSelector(givenSelectorId(start)) // Let the selector span all of `given _`; needed for -Ytest-pickler
31223123
else if canStartTypeTokens.contains(in.token) then

0 commit comments

Comments
 (0)