File tree 1 file changed +5
-3
lines changed
compiler/src/dotty/tools/dotc/parsing
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -4389,9 +4389,11 @@ object Parsers {
4389
4389
stats += closure(in.offset, Location .InBlock , modifiers(BitSet (IMPLICIT )))
4390
4390
else if isIdent(nme.extension) && followingIsExtension() then
4391
4391
stats += extension()
4392
- else if outermost && ctx.mode.is(Mode .Interactive ) && isDefIntro(localModifierTokens) then
4393
- stats +++= localDef(in.offset)
4394
- else if isDefIntro(localModifierTokens, excludedSoftModifiers = Set (nme.`opaque`)) then
4392
+ else if isDefIntro(localModifierTokens,
4393
+ excludedSoftModifiers =
4394
+ // Allow opaque definitions at outermost level in REPL.
4395
+ if outermost && ctx.mode.is(Mode .Interactive )
4396
+ then Set .empty else Set (nme.`opaque`)) then
4395
4397
stats +++= localDef(in.offset)
4396
4398
else
4397
4399
empty = true
You can’t perform that action at this time.
0 commit comments