You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
scala-helpful-compiler-errors is a list of Scala compiler errors that could be more helpful, especially for newcomers to Scala.
5
+
6
+
Experienced Scala programmers maintain a mental map of compiler error -> actual problem. In many cases a compiler error can't know the "actual" problem, but in many cases it can or make a helpful guess.
7
+
8
+
The list of compiler errors focused on Scala 3's Dotty compiler. The idea behind this project is to build up a list of compiler errors that could one day be an input into a [larger project](https://contributors.scala-lang.org/t/towards-better-error-messages-in-scalac/1470/31) to make compiler errors more helpful. Such a project seems unlikely to occur for Scala 2.13's scalac, which is why this list is Dotty-specific.
9
+
10
+
## PRs Welcome
11
+
12
+
Please submit pull requests with Dotty errors that could be more helpful, especially for newcomers to Scala.
13
+
14
+
## Template for new compiler errors or warnings
15
+
16
+
#### $errorName
17
+
18
+
* Scastie link: $scastieLink (here's a [starter](https://scastie.scala-lang.org/G4zbEq5dTFqSnRryRnTzwg))
19
+
* Current error msg:
20
+
```
21
+
// paste output of dotty compiler error or warning
22
+
```
23
+
* Suggested helpful msg: `Oh no, it broke. Suggestion: don't break it`
24
+
25
+
## List of Dotty compiler errors that could be more helpful
* Suggested helpful msg: `The result type of this if statement must be an Int, but there's no else branch, so it returns Unit on else. Suggestion: add an else branch`
0 commit comments