Closed
Description
Compiler version
3.1.0
Minimized example
import language.experimental.erasedDefinitions
import annotation.experimental
@experimental
erased class CanThrow[-E <: Exception]
Output
Error: 2 |import language.experimental.erasedDefinitions
Error: | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: |Experimental features may only be used with a nightly or snapshot version of the compiler
Expectation
Should compile.
Otherwise, we cannot use experimental language features in @experimental code.
I think what happens is that we check the compiler version when we analyze the import statement. We should wait with it until we need to check whether the language import is enabled. If all these tests are from experimental scopes, this should be permitted.
Metadata
Metadata
Assignees
Labels
No labels