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
I get this error when running the command line with 3.0.2 but also when compiling my project
in SBT with 3.1.0-RC2.
$ scala -version 127↵Scala compiler version 3.0.2--Copyright2002-2021, LAMP/EPFL
$ scala -Yexplicit-nulls 127↵
scala>importscala.util.control.NoStackTrace
scala>caseclassParseException(line: Int, character: Int, message: String) extendsNoStackTrace--Error:1|caseclassParseException(line: Int, character: Int, message: String) extendsNoStackTrace|^|classParseException cannot be defined due to a conflict between its parents when
|implementing a super-accessor for fillInStackTrace in traitNoStackTrace:||1. One of its parent (NoStackTrace) contains a call super.fillInStackTrace in its body,
| and when a super-call in a traitis written without an explicit parent
| listed in brackets, it is implemented by a generated super-accessor in
| the classthatextendsthistraitbased on the linearization order of
| the class.
|2. BecauseThrowable comes before NoStackTrace in the linearization
| order of ParseException, and because Throwable overrides fillInStackTrace,
| the super-accessor in ParseException is implemented asa call to
|super[Throwable].fillInStackTrace.
|3. However,
| ():Throwable|Null (the typeofsuper[Throwable].fillInStackTrace in ParseException)
| is not a subtype of
| ():Throwable (the typeof fillInStackTrace in traitNoStackTrace).
|Hence, the super-accessor that needs to be generated in ParseException| is illegal.
||Here are two possible ways to resolve this:||1. Change the linearization order of ParseException such that
|NoStackTrace comes before Throwable.
|2. Alternatively, replace super.fillInStackTrace in the body of traitNoStackTrace by a
|super-call to a specific parent, e.g. super[Throwable].fillInStackTrace
Output
// TODO add output here
Expectation
The text was updated successfully, but these errors were encountered:
Compiler version
3.0.2
3.1.0-RC2
running on Java 17
Minimized code
I get this error when running the command line with 3.0.2 but also when compiling my project
in SBT with 3.1.0-RC2.
Output
// TODO add output here
Expectation
The text was updated successfully, but these errors were encountered: