>.\tsc.exe --emit=jit --nogc .\main.ts
.\main.ts:4:5: warning: Type '!ts.class<@Abc, !ts.class_storage<@Abc>>' does not satisfy the constraint '!ts.iface<@IAbc>'.
interfaceCall(abc);
^
.\main.ts:4:5: error: not all types could be inferred
interfaceCall(abc);
^
.\main.ts:4:5: error: can't instantiate function. 'interfaceCall' not all generic types can be identified
interfaceCall(abc);
^
.\main.ts:1:1: error: failed statement
function main()
code:
function main()
{
var abc = new Abc();
interfaceCall(abc);
}
// but corret if 'function interfaceCall<TAbc extends ->Abc<->(aaa: TAbc) '
function interfaceCall<TAbc extends IAbc>(aaa: TAbc)
{
aaa.ok();
}
interface IAbc
{
ok(): void;
}
class Abc implements IAbc
{
ok()
{
print("aaaa");
}
}
error:
code: