Skip to content

Commit 7cf571e

Browse files
committed
Improve error message
1 parent e27005a commit 7cf571e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

compiler/src/dotty/tools/dotc/reporting/messages.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1254,7 +1254,8 @@ import transform.SymUtils._
12541254
|
12551255
|I found: $tree
12561256
|But the part corresponding to `<skolem>` is not a reference that can be generated.
1257-
|This might be because resolution yielded as given instance a function that is not known to be pure."""
1257+
|This might be because resolution yielded as given instance a function that is not
1258+
|known to be total and side-effect free."""
12581259
def explain =
12591260
em"""The part of given resolution that corresponds to `<skolem>` produced a term that
12601261
|is not a stable reference. Therefore a given instance could not be generated.

tests/neg/i8623.check

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
|
66
| I found: <skolem>.tasty.pos(unseal(given_QC[Any]))
77
| But the part corresponding to `<skolem>` is not a reference that can be generated.
8-
| This might be because resolution yielded as given instance a function that is not known to be pure.
8+
| This might be because resolution yielded as given instance a function that is not
9+
| known to be total and side-effect free.
910

1011
longer explanation available when compiling with `-explain`

0 commit comments

Comments
 (0)