Skip to content

Commit a0db7c1

Browse files
committed
Allow opaque type def in repl
1 parent 59b67fc commit a0db7c1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: compiler/src/dotty/tools/dotc/parsing/Parsers.scala

+2
Original file line numberDiff line numberDiff line change
@@ -4696,6 +4696,8 @@ object Parsers {
46964696
stats += closure(in.offset, Location.InBlock, modifiers(BitSet(IMPLICIT)))
46974697
else if isIdent(nme.extension) && followingIsExtension() then
46984698
stats += extension()
4699+
else if ctx.mode.is(Mode.Interactive) && isDefIntro(localModifierTokens) then
4700+
stats +++= localDef(in.offset)
46994701
else if isDefIntro(localModifierTokens, excludedSoftModifiers = Set(nme.`opaque`)) then
47004702
stats +++= localDef(in.offset)
47014703
else

0 commit comments

Comments
 (0)