Debug Failure. False expression: Provided ast is not the expected AST

Topics: General
Dec 6, 2013 at 4:08 AM
Edited Dec 6, 2013 at 4:09 AM
Just upgraded my web project (which contains TypeScript files) and fixed a few compiler errors. The final error is a little odd, and makes no sense to me:
"Error  14  Debug Failure. False expression: Provided ast is not the expected AST, Expected: ObjectLiteralExpression Given: FunctionPropertyAssignment  C:\Data\Visual Studio\Projects\DC Mobile App\Source\DC Web App\VSTSC    DC Web App"
Did the upgrade fail to change something?

Also, I don't have any TypeScript options available in my project options - is this only for TS specific projects?
Dec 6, 2013 at 4:15 AM
Edited Dec 6, 2013 at 4:16 AM
(FYI: I already tried cleaning and rebuilding the project, and the error is still there. I have no idea where "ast" is coming from.)
Coordinator
Dec 6, 2013 at 4:28 AM
Looks like this is specific to compiling this particular form of object literal with --sourcemap:
// Fails
var x = { n() { return 4; } };

// OK
var x = { n: function() { return 4; } };
So you should be able to work around it either by not emitting source maps or by using the alternate function syntax. I'll get a bug logged - sorry you ran into this.
Dec 6, 2013 at 4:33 AM
Edited Dec 6, 2013 at 4:40 AM
No worries! Thanks for the work-around. :). I have a large project; hopefully this won't be a needle in a hay stack.
Dec 6, 2013 at 4:34 AM
Also, shouldn't I see TypeScript options in my web project options? They are not there.