Skip to content

Commit b537890

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 760d0c8 commit b537890

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
@@ -3306,7 +3306,7 @@ object Types {
33063306
abstract class FlexType extends UncachedGroundType with ValueType
33073307

33083308
class ErrorType(_msg: => Message) extends FlexType {
3309-
val msg = _msg
3309+
def msg = _msg
33103310
}
33113311

33123312
object UnspecifiedErrorType extends ErrorType("unspecified error")

0 commit comments

Comments
 (0)