This project is read-only.

Specification and VS versus Compiler

Topics: Language Specification
Aug 3, 2013 at 5:29 PM
Edited Aug 3, 2013 at 5: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 ?
Aug 6, 2013 at 4: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.
Aug 6, 2013 at 4:15 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.