%output library header generation depends on compiler target

fileselector example tweaks
This commit is contained in:
Irmen de Jong
2025-02-02 20:46:49 +01:00
parent 75ddcda5f3
commit 74dd8fe80b
10 changed files with 59 additions and 73 deletions

View File

@@ -275,7 +275,8 @@ class AstPreprocessor(val program: Program,
if(targetStatement is Subroutine) {
for(arg in call.args.zip(targetStatement.parameters)) {
if(arg.first.inferType(program).isBytes && arg.second.type.isString) {
errors.err("cannot use byte value for string parameter", arg.first.position)
if((arg.first as? NumericLiteral)?.number!=0.0)
errors.err("cannot use byte value for string parameter", arg.first.position)
}
}
}