This project is read-only.

1.0 RC compiler bug

Topics: General
Feb 27, 2014 at 12:26 AM
Start with the "Walkthrough - Classes" sample from the playground.

Add the following to the Greeter class
    kickOut = (message: string ) => {
        var sayings : Array<string> = ['Bye', 'Adiós'];
        sayings.forEach( (value) => { console.log(value + message);});
You get a compiler error indicating that message variable from the forEach callback cannot reference the constructor's message instance. However, message is a parameter to the function that the callback is in and therefore references that instance, not the constructor variable.

"Initializer of instance member variable 'kickOut' cannot reference identifier 'message' declared in the constructor"

This was working in 0.9.5
Feb 27, 2014 at 12:29 AM
Already tracking with . Thanks!
Feb 27, 2014 at 12:41 AM
Thanks for the fast feedback. Any hope for a patch before 1.0 as this is breaking a lot of code in our 10000+ TS line project
Feb 27, 2014 at 2:08 AM
Should have a fix get checked in to the release-1.0 branch the next hour or so.