michal@miso ~/iced_work » cat -n at_name.iced
1 class Test
2 constructor : (@s) ->
3 console.log "s is ", s
4 console.log "@s is ", @s
5 console.log "@ is ", @
6
7 new Test "hello world"
michal@miso ~/iced_work » iced at_name.iced
s is hello world
@s is hello world
@ is Test { s: 'hello world' }
michal@miso ~/iced_work » iced3 at_name.iced
ReferenceError: s is not defined
at new Test (/home/michal/iced_work/at_name.iced:3:30)
at Object.<anonymous> (/home/michal/iced_work/at_name.iced:7:5)
at Object.<anonymous> (/home/michal/iced_work/at_name.iced:1:1)
at Module._compile (module.js:570:32)
Generated code has changed from: (on iced2):
function Test(s) {
this.s = s;
console.log("s is ", s);
console.log("@s is ", this.s);
console.log("@ is ", this);
}
to (iced3):
function Test(s1) {
this.s = s1;
console.log("s is ", s);
console.log("@s is ", this.s);
console.log("@ is ", this);
}
Generated code has changed from: (on iced2):
to (iced3):