Diagnostic print error method

As it is shown in the skript, by check type, there is an extra getErrorType function…does this means we should also create a errorType under the super class Type?
currently i do not have this errorType class can i just return an null if there is a illed type? then by type check of statements i use the diagnostic printError method to report the error, because there the return type should be void…
or must we report error already by checkType method of expressions
image

Well, you can do whatever you want, since in practice, d.printError() will immediately abort your program.

1 Like