2014-07-13 01:04:16 +02:00
|
|
|
//// [grammarAmbiguities.ts]
|
|
|
|
function f(n: any) { return null; }
|
|
|
|
function g<A, B>(x: any) { return null; }
|
|
|
|
interface A { }
|
|
|
|
interface B { }
|
|
|
|
var A, B;
|
|
|
|
|
|
|
|
f(g<A, B>(7));
|
|
|
|
f(g < A, B > 7); // Should error
|
|
|
|
f(g < A, B > +(7)); // Should error
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//// [grammarAmbiguities.js]
|
|
|
|
function f(n) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
function g(x) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
var A, B;
|
|
|
|
f(g(7));
|
2014-08-16 00:49:09 +02:00
|
|
|
f(g < A, B > 7); // Should error
|
|
|
|
f(g < A, B > +(7)); // Should error
|