We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d11e137 commit 95e2dc2Copy full SHA for 95e2dc2
compiler/src/dotty/tools/dotc/reporting/messages.scala
@@ -527,6 +527,17 @@ import ast.tpd
527
|but an uninitialized var definition.
528
|Only fields can be left uninitialized in this manner; local variables
529
|must be initialized.
530
+ |
531
+ |Another occurrence for this error is defining a val with self type.
532
+ |The ${hl("_")} can be replaced with ${hl("this")}.
533
534
+ |Example before:
535
536
+ |${hl("trait A { _: B => ... ")}
537
538
+ |Example after:
539
540
+ |${hl("trait A { this: B => ... ")}
541
|"""
542
}
543
0 commit comments