Anonymous Login
2021-09-29 01:17 UTC

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001705OpenClonkEngine - C4Scriptpublic2017-08-20 12:06
Assigned To 
Product Version 
Target Version9.0Fixed in Version 
Summary0001705: Automatic type conversion bool -> int in function parameters
DescriptionFor a function taking an "int" parameter, "bool" is accepted as well. However, the bool isn't converted to an int, which breaks comparisons.

Passing a "bool" as an "int" should either produce an error or convert the bool to 0 or 1.
Steps To Reproduce% c4script -e 'func Main() { Log("%v", broken(false)); } func broken(int x) { return x == 0; }'
% c4script -e 'func Main() { Log("%v", broken(true)); } func broken(int x) { return x == 1; }'
TagsNo tags attached.
Attached Files


There are no notes attached to this issue.

-Issue History
Date Modified Username Field Change
2016-03-13 16:54 Luchs New Issue
2017-08-05 13:58 Maikel Target Version => 8.0
2017-08-20 12:06 Zapper Target Version 8.0 => 9.0
+Issue History