Anonymous Login
2018-12-13 03:46 UTC

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001705OpenClonkEngine - C4Scriptpublic2017-08-20 12:06
ReporterLuchs 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
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; }'
false
% c4script -e 'func Main() { Log("%v", broken(true)); } func broken(int x) { return x == 1; }'
false
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes
There are no notes attached to this issue.
+Notes

-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