File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -3780,22 +3780,22 @@ object Types {
37803780
37813781 def tryCompiletimeConstantFold (implicit ctx : Context ): Type = tycon match {
37823782 case tycon : TypeRef if defn.isCompiletimeAppliedType(tycon.symbol) =>
3783- def constValue (tp : Type ): Option [Any ] = tp match {
3783+ def constValue (tp : Type ): Option [Any ] = tp.dealias match {
37843784 case ConstantType (Constant (n)) => Some (n)
37853785 case _ => None
37863786 }
37873787
3788- def boolValue (tp : Type ): Option [Boolean ] = tp match {
3788+ def boolValue (tp : Type ): Option [Boolean ] = tp.dealias match {
37893789 case ConstantType (Constant (n : Boolean )) => Some (n)
37903790 case _ => None
37913791 }
37923792
3793- def intValue (tp : Type ): Option [Int ] = tp match {
3793+ def intValue (tp : Type ): Option [Int ] = tp.dealias match {
37943794 case ConstantType (Constant (n : Int )) => Some (n)
37953795 case _ => None
37963796 }
37973797
3798- def stringValue (tp : Type ): Option [String ] = tp match {
3798+ def stringValue (tp : Type ): Option [String ] = tp.dealias match {
37993799 case ConstantType (Constant (n : String )) => Some (n)
38003800 case _ => None
38013801 }
You can’t perform that action at this time.
0 commit comments