Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions compiler/src/dotty/tools/dotc/inlines/Inlines.scala
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,7 @@ object Inlines:
val constVal = tryConstValue(tpe)
if constVal.isEmpty then
val msg = NotConstant("cannot take constValue", tpe)
report.error(msg, callTypeArgs.head.srcPos)
ref(defn.Predef_undefined).withSpan(callTypeArgs.head.span).withType(ErrorType(msg))
else
constVal
Expand Down
6 changes: 6 additions & 0 deletions tests/neg/i21359.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import scala.compiletime.constValueTuple
import scala.deriving.Mirror

case class Hello(a: Int)
val mirror = summon[Mirror.Of[Hello]]
val test = constValueTuple[mirror.MirroredElemTypes] // error
Loading