improve error message

This commit is contained in:
Irmen de Jong
2025-11-07 01:22:41 +01:00
parent 1f31cb18e4
commit 6611e4e092
2 changed files with 3 additions and 2 deletions

View File

@@ -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 {