32 lines
No EOL
804 B
Text
32 lines
No EOL
804 B
Text
==== tests/cases/compiler/objectLitArrayDeclNoNew.ts (2 errors) ====
|
|
declare var console;
|
|
"use strict";
|
|
module Test {
|
|
export interface IState {
|
|
}
|
|
|
|
export interface IToken {
|
|
}
|
|
|
|
export interface ILineTokens {
|
|
tokens: IToken[];
|
|
endState: IState;
|
|
}
|
|
|
|
export class Gar {
|
|
public moo: number = 0;
|
|
}
|
|
|
|
export function bug(): ILineTokens {
|
|
var state:IState= null;
|
|
return {
|
|
tokens: Gar[],//IToken[], // Missing new. Correct syntax is: tokens: new IToken[]
|
|
~
|
|
!!! Expression expected.
|
|
endState: state
|
|
};
|
|
}
|
|
}
|
|
}
|
|
~
|
|
!!! Declaration or statement expected. |