View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0020812GameMaker Runner[All Projects] VariablesPublic2016-03-20 06:102016-06-23 14:58
Assigned ToRussell Kay 
PriorityMediumSeverityC - GeneralReproducibility100%
PlatformWindowsOSWindowsOS Version7
Summary0020812: Equivalent expressions return different variable types
Descriptionvar a=1,

After the above is executed, b contains a real. c contains a boolean.
Additionally, real(c) causes the game to throw an error.
Steps To ReproduceRunning above code should be enough to reproduce.
GM Version1.4.1749
Attached Files? file icon Bugs.gmz [^] (372,161 bytes) 2016-03-20 06:10

- Relationships

-  Notes
rcusumano (Updater)
2016-04-27 18:40


all these bugs are the same problem - runner incorrectly treating booleans
Russell Kay (Manager)
2016-05-24 21:33

Runner is correctly treating booleans...

a is a number (no question)
b is a number (compiler will optimise out constants, and true is a constant 1)
c is calculated at runtime and is a boolean
GameGeisha (Updater)
2016-05-25 02:49

If that's the case, shouldn't the compiler pre-evaluate 1==1 to an actual Boolean true instead of 1? That's something to think about for the compiler, the implementation of true and false, and all functions that take true/false as arguments but currently accepts reals.
Russell Kay (Manager)
2016-06-14 21:14

Fixed in gitlab 529cd55
Stewart Bishop (Administrator)
2016-06-23 14:58

Confirming this now works as expected.

Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker