-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Allow experimental language imports in experimental scopes #13417
Allow experimental language imports in experimental scopes #13417
Conversation
2d61dd0
to
8e2957e
Compare
5cf6c79
to
c92da2e
Compare
cf1a732
to
1d9e672
Compare
Also allow top-level experimental language imports if all top-level definitions are experimental
1d9e672
to
3fb1b6d
Compare
It is simpler to look at the commits individually, the second only moves documentation. |
def check(stable: => String) = | ||
Feature.checkExperimentalFeature("features", imp.srcPos, | ||
s"\n\nNote: the scope enclosing the import is not considered experimental because it contains the\nnon-experimental $stable") | ||
if ctx.owner.is(Package) then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main change in this logic is the addition of this condition to detect if we are in a top-level scope.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
A version of #13396 that only add the extra rule for top-level experimental imports.