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
MODULE A;
TYPE
R* = RECORD foo : INTEGER END;
END A.
MODULE B;
IMPORT A;
VAR
s : A.R;
BEGIN
END B.
Generated code:
var RTL$ = {
extend: function extend(methods){
function Type(){
for(var m in methods)
this[m] = methods[m];
}
Type.prototype = this.prototype;
var result = methods.init;
result.prototype = new Type(); // inherit this.prototype
result.prototype.constructor = result; // to see constructor name in diagnostic
result.extend = extend;
return result;
}
};
var A = function (){
var R = RTL$.extend({
init: function R(){
this.foo = 0;
}
});
return {
R: R
}
}();
var B = function (A){
var s = new R();
}(A);
So, there is runtime error: ReferenceError: R is not defined
Generated code: var s = new R(); is wrong.
The text was updated successfully, but these errors were encountered:
Generated code:
So, there is runtime error: ReferenceError: R is not defined
Generated code: var s = new R(); is wrong.
The text was updated successfully, but these errors were encountered: