View Issue Details

IDProjectCategoryView StatusLast Update
0029731RunnerVariables (In-Built)Public2018-10-29 11:31
ReporterYellowAfterlifeAssigned ToRussell Kay 
PriorityMediumSeverityC - GeneralReproducibility100%
Status ClosedResolutionFixed 
PlatformWindowsOSWindows 10 ProOS Version>=1703
Product Version2.1.4 
Target Version2.2.1Fixed in Version2.2.1 
Summary0029731: Variables: [YYC] Array literal doesn't set array ownership correctly - not copied on write
Descriptiontest:
global.thing_proto = ["???"]; // not OK
//global.thing_proto[0] = "???"; // OK!
var a = thing_create();
var b = thing_create();
show_debug_message(a != b);


add_thing:
var thing = global.thing_proto;
thing[1, 0] = "thing"; // clone the "prototype"
return thing;


VM output: 1
YYC output: 0
TagsRunner, yyc
1.4 Found In7.7.1717
2.x Runtime Found In9.9.1074
2.x Runtime Verified In2.2.1.268

Activities

YellowAfterlife

2018-06-30 00:07

Developer  

a_bug.yyz (46,919 bytes)

YellowAfterlife

2018-07-01 11:19

Developer   ~0060763

Upon further examination, it appears like array ownership behaviour is consistently different between VM and YYC on green and red versions of both GMS1 and GMS2, and might have been for a while now.

Leads to questions whether anyone actually understood/relied on it, this being such an uncommon feature for a default array access operator.

Russell Kay

2018-08-27 13:19

Manager   ~0061391

I think I fixed this with the fix for https://bugs.yoyogames.com/view.php?id=29915 as that was related to arrays as well