Skip to content

Commit a178222

Browse files
noti0na1tgodzik
authored andcommitted
Allow opaque type def in repl
[Cherry-picked a0db7c1]
1 parent 6b9084d commit a178222

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4389,6 +4389,8 @@ object Parsers {
43894389
stats += closure(in.offset, Location.InBlock, modifiers(BitSet(IMPLICIT)))
43904390
else if isIdent(nme.extension) && followingIsExtension() then
43914391
stats += extension()
4392+
else if ctx.mode.is(Mode.Interactive) && isDefIntro(localModifierTokens) then
4393+
stats +++= localDef(in.offset)
43924394
else if isDefIntro(localModifierTokens, excludedSoftModifiers = Set(nme.`opaque`)) then
43934395
stats +++= localDef(in.offset)
43944396
else

0 commit comments

Comments
 (0)