Skip to content

Commit a466d5e

Browse files
committed
Avoid forcing diagnostic message in ErrorType
I found the problem when trying to debug what went wrong with encoded names in backend. I added an assert that the toString of a name would not contain symbolic operator characters. The assert triggered because an error type forced the message (without printing to Console later).
1 parent 6f8ce61 commit a466d5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/core/Types.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3444,7 +3444,7 @@ object Types {
34443444
abstract class FlexType extends UncachedGroundType with ValueType
34453445

34463446
class ErrorType(_msg: => Message) extends FlexType {
3447-
val msg = _msg
3447+
def msg = _msg
34483448
}
34493449

34503450
object UnspecifiedErrorType extends ErrorType("unspecified error")

0 commit comments

Comments
 (0)