feat: show expected and got types for TypeMismatch
This commit is contained in:
@@ -35,7 +35,7 @@ def printError(error: Error)(using errorContent: String): Unit = {
|
||||
highlight(pos, 1)
|
||||
case Error.TypeMismatch(pos, expected, got, msg) =>
|
||||
printPosition(pos)
|
||||
println(msg)
|
||||
println(s"Type mismatch: $msg\nExpected: $expected\nGot: $got")
|
||||
highlight(pos, 1)
|
||||
case Error.SemanticError(pos, msg) =>
|
||||
printPosition(pos)
|
||||
|
Reference in New Issue
Block a user