18 lines
509 B
Plaintext
18 lines
509 B
Plaintext
==== tests/cases/compiler/genericCallsWithoutParens.ts (4 errors) ====
|
|
function f<T>() { }
|
|
var r = f<number>; // parse error
|
|
~
|
|
!!! error TS1109: Expression expected.
|
|
~~~~~~
|
|
!!! error TS2304: Cannot find name 'number'.
|
|
|
|
class C<T> {
|
|
foo: T;
|
|
}
|
|
var c = new C<number>; // parse error
|
|
~
|
|
!!! error TS1109: Expression expected.
|
|
~~~~~~
|
|
!!! error TS2304: Cannot find name 'number'.
|
|
|
|
|