inconsistent export behavior
andrewrk opened this issue · 1 comments
andrewrk commented
code:
export const foo1 = -> "hi"
const foo2 = -> "hi"
export foo2
expected:
var foo1, foo2, out$ = typeof exports != 'undefined' && exports || this;
foo1 = function(){
return "hi";
};
out$.foo1 = foo1;
foo2 = function(){
return "hi";
};
out$.foo2 = foo2;
actual:
var foo1, foo2, out$ = typeof exports != 'undefined' && exports || this;
import$(out$, foo1 = function(){
return "hi";
});
foo2 = function(){
return "hi";
};
out$.foo2 = foo2;
function import$(obj, src){
var own = {}.hasOwnProperty;
for (var key in src) if (own.call(src, key)) obj[key] = src[key];
return obj;
}
satyr commented
Looks like I forgot to make it unroll sub-blocks and managed to write a wrong test. Fixing.