View Issue Details

IDProjectCategoryView StatusLast Update
0031608RunnerWindows (YYC)Public2020-02-27 12:00
ReporterYellowAfterlifeAssigned ToRussell Kay 
PriorityLowSeverityC - GeneralReproducibility100%
Status ResolvedResolutionFixed 
PlatformWindowsOSWindows 10 ProOS Version>=18362
Product Version2.2.5 
Target Version2.3.0Fixed in Version2.3.0 
Summary0031608: YYC: ++boolean/--boolean remains a clamped boolean, unlike on VM
DescriptionLeads to some peculiar effects.

Code:
var i = bool(false);
show_debug_message(i);
show_debug_message(typeof(i));
show_debug_message(++i);
show_debug_message(typeof(i));
show_debug_message(++i);
show_debug_message(typeof(i));
show_debug_message(i + 0);


VM:
0
bool
1
number
2
number
2


YYC:
0
bool
1
bool
1
bool
1


Edit: upon further inspection, most assignment operators (+=, -=, etc.) are affected.
Additional InformationOn a glance, I would say that quietly re-typing to VALUE_REAL would have no side effects,
YYRValue& operator++() {
        switch ((kind & MASK_KIND_RVALUE)) {
        case VALUE_BOOL:
            kind = VALUE_REAL; // new
        case VALUE_REAL:
            ++val;
            break;
Tagsyyc
1.4 Found In
2.x Runtime Found In9.9.1.1685
2.x Runtime Verified In

Activities

YellowAfterlife

2020-02-08 19:03

Developer  

a_bug.yyz (8,724 bytes)

Russell Kay

2020-02-18 22:22

Manager   ~0065374

Fixed in gitlab