Open
Description
Compiler version
3.4.0, 00802ab
Minimized code
@annotation.experimental
def method(): Unit = ()
@annotation.experimental
val _ = method()
Output
5 |val _ = method() // error but should not
| ^^^^^^
| method method is marked @experimental
|
| Experimental definition may only be used under experimental mode:
| 1. in a definition marked as @experimental, or
| 2. compiling with the -experimental compiler flag, or
| 3. with a nightly or snapshot version of the compiler.
Expectation
The error should not be emitted. The cause of this issue is the same as in #19807 (comment).