We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 209d3b0 commit e740119Copy full SHA for e740119
src/dotty/tools/dotc/transform/Literalize.scala
@@ -80,7 +80,8 @@ class Literalize extends MiniPhaseTransform { thisTransform =>
80
case Literal(c @ Constant(treeValue)) =>
81
tree.tpe match {
82
case ConstantType(typeValue) =>
83
- assert(treeValue == typeValue.value, i"Type of Literal $tree is inconsistent with underlying constant")
+ assert(treeValue == typeValue.value && treeValue.getClass == typeValue.getClass,
84
+ i"Type of Literal $tree is inconsistent with underlying constant")
85
case tpe =>
86
c.tpe =:= tpe
87
}
0 commit comments