Skip to content

Commit e5f17cc

Browse files
committed
More detail in explanation for 'traits cannot extend AnyVal'
1 parent 3274bf1 commit e5f17cc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1473,6 +1473,7 @@ object messages {
14731473
val explanation =
14741474
hl"""Only classes (not traits) are allowed to extend ${"AnyVal"}, but traits may extend
14751475
|${"Any"} to become ${Green("\"universal traits\"")} which may only have ${"def"} members.
1476+
|Universal traits can be mixed in to classes that extend ${"AnyVal"}.
14761477
|"""
14771478
}
14781479

0 commit comments

Comments
 (0)