Skip to content

Commit 9b549ab

Browse files
Update compiler/src/dotty/tools/dotc/transform/InlineVals.scala
Co-authored-by: Guillaume Martres <[email protected]>
1 parent 5ce9a99 commit 9b549ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/transform/InlineVals.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class InlineVals extends MiniPhase:
4040
report.error(s"inline value must be pure$details", rhs.srcPos)
4141
case tp =>
4242
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)
43+
report.error(em"The type of an `inline val` cannot be an opaque type.\n\nTo inline, consider using `inline def` instead", rhs)
4444
else if tp.derivesFrom(defn.UnitClass) then
4545
report.error(em"`inline val` of type `Unit` is not supported.\n\nTo inline a `Unit` consider using `inline def`", rhs)
4646
else if tp.derivesFrom(defn.StringClass) || defn.ScalaValueClasses().exists(tp.derivesFrom(_)) then

0 commit comments

Comments
 (0)