mirror of
https://github.com/irmen/prog8.git
synced 2026-04-19 20:16:51 +00:00
improve error message
This commit is contained in:
@@ -598,7 +598,7 @@ main {
|
||||
compileText(C64Target(), false, src, outputDir, writeAssembly = false, errors = errors) shouldBe null
|
||||
errors.errors.size shouldBe 3
|
||||
errors.errors[0] shouldContain ":9:"
|
||||
errors.errors[0] shouldContain "no cast"
|
||||
errors.errors[0] shouldContain "no implicit cast"
|
||||
errors.errors[1] shouldContain ":10:"
|
||||
errors.errors[1] shouldContain "out of range"
|
||||
errors.errors[2] shouldContain ":10:"
|
||||
|
||||
@@ -946,7 +946,8 @@ class NumericLiteral(val type: BaseDataType, // only numerical types allowed
|
||||
throw FatalAstException("type cast of weird type $type")
|
||||
}
|
||||
}
|
||||
return ValueAfterCast(false, "no cast available from $type to $targettype number=$number", null)
|
||||
val implicit = if(implicit) "implicit " else ""
|
||||
return ValueAfterCast(false, "no ${implicit}cast available from $type to $targettype for value $number", null)
|
||||
}
|
||||
|
||||
fun convertTypeKeepValue(targetDt: BaseDataType): ValueAfterCast {
|
||||
|
||||
Reference in New Issue
Block a user