mirror of
https://github.com/irmen/prog8.git
synced 2025-01-11 13:29:45 +00:00
clearer error msg
This commit is contained in:
parent
9f1bd2d7d6
commit
267ea13e8c
@ -1041,7 +1041,7 @@ internal class AstChecker(private val program: Program,
|
||||
} else if((leftDt==DataType.UWORD && rightDt==DataType.STR) || (leftDt==DataType.STR && rightDt==DataType.UWORD)) {
|
||||
// exception allowed: comparing uword (pointer) with string
|
||||
} else {
|
||||
errors.err("left and right operands aren't the same type", expr.position)
|
||||
errors.err("left and right operands aren't the same type: $leftDt vs $rightDt", expr.position)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -235,7 +235,7 @@ class TypecastsAdder(val program: Program, val options: CompilationOptions, val
|
||||
if(toFix!=null) {
|
||||
if(commonDt==DataType.BOOL) {
|
||||
// don't automatically cast to bool
|
||||
errors.err("left and right operands aren't the same type", expr.position)
|
||||
errors.err("left and right operands aren't the same type: $leftDt vs $rightDt", expr.position)
|
||||
} else {
|
||||
val modifications = mutableListOf<IAstModification>()
|
||||
when {
|
||||
|
Loading…
x
Reference in New Issue
Block a user