DoclerLabs / hexMachina

Releases, issues, documentation, website of hexMachina, framework written in Haxe
http://hexmachina.org
MIT License
44 stars 8 forks source link

hexDSL - Duplicate properties in generated code #235

Closed aliokan closed 7 years ago

aliokan commented 7 years ago

This Flow :

obj.isSleeping = false;
obj = { 
  name: "Francis", 
  age: 44, 
  height: 1.75, 
  isWorking: true 
};

d = new Date(2013, 12, 2, 12, 9, 0);

c = new exercises.support.Character();
c.name = "hello";

generate this Haxe code with BasicStaticFlowCompiler :

var obj = {};
coreFactory.register("obj", obj);
this.obj = obj;
obj.isSleeping = false;
obj.name = "Francis";
obj.age = 44;
obj.height = 1.75;
obj.isWorking = true;
var d = new Date(2013, 12, 2, 12, 9, 0);
coreFactory.register("d", d);
this.d = d;
var c = new exercises.support.Character(null);
coreFactory.register("c", c);
this.c = c;
c.name = "hello";
applicationContext.dispatch(hex.core.ApplicationAssemblerMessage.OBJECTS_BUILT, null);
obj.isSleeping = false;
obj.name = "Francis";
obj.age = 44;
obj.height = 1.75;
obj.isWorking = true;
c.name = "hello";