Specification and VS versus Compiler

Topics: Language Specification
Aug 3, 2013 at 4:29 PM
Edited Aug 3, 2013 at 4:43 PM
interface A<T> {
    F<U extends T[]>();
}
interface A<T> {
    F<a extends number[]>();
}
Who is right ?
Specification and VS say this is incorrect code because of T[] , but TS compiler says it is correct.
Who is correct ?
Thanks.
Coordinator
Aug 6, 2013 at 3:14 PM
At first glance, this definitely looks like a bug to say that the code is incorrect. For example, this is also giving me an error:
interface A<T> {
    F<U extends T[]>(x: U);
    F<a extends number[]>(x: a);
}
Even though the type variables are now being used. I'm going to move this over to the issue tracker so we can investigate.
Coordinator
Aug 6, 2013 at 3:15 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.