Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #9879: allow top-level opaque type definitions in REPL #21753

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

noti0na1
Copy link
Member

Fix #9879

@noti0na1 noti0na1 self-assigned this Oct 11, 2024
@@ -4696,6 +4696,8 @@ object Parsers {
stats += closure(in.offset, Location.InBlock, modifiers(BitSet(IMPLICIT)))
else if isIdent(nme.extension) && followingIsExtension() then
stats += extension()
else if outermost && ctx.mode.is(Mode.Interactive) && isDefIntro(localModifierTokens) then
stats +++= localDef(in.offset)
else if isDefIntro(localModifierTokens, excludedSoftModifiers = Set(nme.`opaque`)) then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't you remove opaque from excluded in interactive mode and outermost?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Opaque types are not definable at top level of REPL
2 participants