You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classC:finalvalSeconds= java.util.concurrent.TimeUnit.SECONDS//inline val SecondSeconds = java.util.concurrent.TimeUnit.SECONDS // not a literal@OutputTimeUnit(Seconds)
deff():Unit= ()
@OutputTimeUnit(java.util.concurrent.TimeUnit.SECONDS)
defok():Unit= ()
where
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.util.concurrent.TimeUnit;
@Inherited
@Target({ElementType.METHOD,ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface OutputTimeUnit {
/**
* @return Time unit to use.
*/
TimeUnit value();
}
Output
7|@OutputTimeUnit(Seconds)
| ^^^^^^^
|Annotation argument is not a constant
Expectation
Works as in Scala 2.
Spec says platform enum is a constant value expression; Seconds is a constant value definition.
The text was updated successfully, but these errors were encountered:
Compiler version
3.5.2
Minimized code
where
Output
Expectation
Works as in Scala 2.
Spec says platform enum is a constant value expression;
Seconds
is a constant value definition.The text was updated successfully, but these errors were encountered: