Skip to content

Commit affc77b

Browse files
committed
Tweak error message
1 parent dcdae04 commit affc77b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/src/dotty/tools/dotc/cc/CaptureSet.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1306,7 +1306,7 @@ object CaptureSet:
13061306
|cannot be included in outer capture set $cs"""
13071307
else if !elem.tryClassifyAs(cs.classifier) then
13081308
i"""capability ${elem} is not classified as ${cs.classifier}, therefore it
1309-
|cannot be included in capture set $cs of ${cs.classifier} elements"""
1309+
|cannot be included in capture set $cs of ${cs.classifier.name} elements"""
13101310
else if cs.isBadRoot(elem) then
13111311
elem match
13121312
case elem: FreshCap =>

tests/neg-custom-args/captures/i21614.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@
1919
| cap is a root capability associated with the result type of (_$1: File^?): Logger{val f: File^{_$1}}^{cap.rd, _$1}
2020
|
2121
|Note that capability C is not classified as trait SharedCapability, therefore it
22-
|cannot be included in capture set ? of parameter _$1 of trait SharedCapability elements.
22+
|cannot be included in capture set ? of parameter _$1 of SharedCapability elements.
2323
|
2424
| longer explanation available when compiling with `-explain`

0 commit comments

Comments
 (0)