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 b981231 commit e66860bCopy full SHA for e66860b
compiler/src/dotty/tools/dotc/inlines/Inlines.scala
@@ -429,6 +429,7 @@ object Inlines:
429
val constVal = tryConstValue(tpe)
430
if constVal.isEmpty then
431
val msg = NotConstant("cannot take constValue", tpe)
432
+ report.error(msg, callTypeArgs.head.srcPos)
433
ref(defn.Predef_undefined).withSpan(callTypeArgs.head.span).withType(ErrorType(msg))
434
else
435
constVal
tests/neg/i21359.scala
@@ -0,0 +1,6 @@
1
+import scala.compiletime.constValueTuple
2
+import scala.deriving.Mirror
3
+
4
+case class Hello(a: Int)
5
+val mirror = summon[Mirror.Of[Hello]]
6
+val test = constValueTuple[mirror.MirroredElemTypes] // error
0 commit comments