File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ object Annotations {
3838 if (i < args.length) Some (args(i)) else None
3939 }
4040 def argumentConstant (i : Int )(using Context ): Option [Constant ] =
41- for ( case ConstantType (c) <- argument(i) map (_ .tpe.widenTermRefExpr.normalized) ) yield c
41+ for case ConstantType (c) <- argument(i). map(stripCast(_) .tpe.widenTermRefExpr.normalized) yield c
4242
4343 def argumentConstantString (i : Int )(using Context ): Option [String ] =
4444 for (case Constant (s : String ) <- argumentConstant(i)) yield s
Original file line number Diff line number Diff line change 11@ SerialVersionUID (13l .toLong) class C1 extends Serializable // OK because toLong is constant-folded
22@ SerialVersionUID (13l ) class C2 extends Serializable // OK
3- @ SerialVersionUID (13 .asInstanceOf [Long ]) class C3 extends Serializable // error
3+ @ SerialVersionUID (13 .asInstanceOf [Long ]) class C3 extends Serializable // OK was error
44@ SerialVersionUID (Test .bippy) class C4 extends Serializable // error
55
66object Test {
You can’t perform that action at this time.
0 commit comments