评论者:
thheller
我刚刚看了生成的 JavaScript 代码。正如 David 所说的,问题在于为获取::后条件的结果而生成的附加函数。
dummy.f_no_post_condition = function f_no_post_condition(argument) {
var this$ = this;
var G__82157 = argument;
var G__82158 = this$;
return console.log(G__82157, G__82158);
});
dummy.f_with_post_condition = function f_with_post_condition(argument) {
var _PERCENT_ = function () {var this$ = this;
var G__82161 = argument;
var G__82162 = this$;
return console.log(G__82161, G__82162);
})();
return _PERCENT_;
});
dummy.test_object = { "methodWithPostcondition": dummy.f_with_post_condition, "methodNoPostcondition": dummy.f_no_post_condition };
dummy.f_with_post_condition("A");
dummy.test_object.methodNoPostcondition("B");
dummy.test_object.methodWithPostcondition("C");