You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fields have been ruled out of cheerp::jsexport scope.
So in this case (if you are interested in the getter and/or setter) you will have to define get/set on your own.
Once added function int get_age() e void set_age(int), this is the resulting code:
"use strict";
/*Compiled using Cheerp (R) by Leaning Technologies Ltd*/
var __imul=Math.imul;
var __fround=Math.fround;
var oSlot=0;var nullArray=[null];var nullObj={d:nullArray,o:0};
function __ZN3Cat3sayEv(Lthis){
console.log(String(Lthis.i0|0));
}
function __ZN3CatC1Ei(Lthis,Lage){
Lthis.i0=Lage;
}
function __ZN3Cat7set_ageEi(Lthis,Lx){
Lthis.i0=Lx;
}
function __ZN3Cat7get_ageEv(Lthis){
return Lthis.i0|0;
}
function Cat(a0){
this.i0=0;
;
this.d=[this];
if (arguments.length===1&&arguments[0]===undefined){
return;
}
__ZN3CatC1Ei(this,a0);
};
Cat.prototype.get_age=function (){
return __ZN3Cat7get_ageEv(this);
};
Cat.prototype.set_age=function (a0){
return __ZN3Cat7set_ageEi(this,a0);
};
Cat.prototype.say=function (){
return __ZN3Cat3sayEv(this);
};
Cat.promise=
Promise.resolve();
in javascript
The text was updated successfully, but these errors were encountered: