We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5ce9a99 commit 9b549abCopy full SHA for 9b549ab
compiler/src/dotty/tools/dotc/transform/InlineVals.scala
@@ -40,7 +40,7 @@ class InlineVals extends MiniPhase:
40
report.error(s"inline value must be pure$details", rhs.srcPos)
41
case tp =>
42
if tp.typeSymbol.is(Opaque) then
43
- report.error(em"`inline val` of type opaque types is not supported.\n\nTo inline consider using `inline def`", rhs)
+ report.error(em"The type of an `inline val` cannot be an opaque type.\n\nTo inline, consider using `inline def` instead", rhs)
44
else if tp.derivesFrom(defn.UnitClass) then
45
report.error(em"`inline val` of type `Unit` is not supported.\n\nTo inline a `Unit` consider using `inline def`", rhs)
46
else if tp.derivesFrom(defn.StringClass) || defn.ScalaValueClasses().exists(tp.derivesFrom(_)) then
0 commit comments