This was we don't get noisy baselines just because a different phase of the compiler reported the diagnostic. This helps with Yui's refactoring work to move grammar checks into the type checker.
71 lines
No EOL
4.5 KiB
Text
71 lines
No EOL
4.5 KiB
Text
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(8,16): error TS2314: Generic type 'C<T>' requires 1 type argument(s).
|
|
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(10,21): error TS2314: Generic type 'C<T>' requires 1 type argument(s).
|
|
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(11,22): error TS2314: Generic type 'C<T>' requires 1 type argument(s).
|
|
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(11,26): error TS2314: Generic type 'C<T>' requires 1 type argument(s).
|
|
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(12,19): error TS1023: An index signature parameter type must be 'string' or 'number'.
|
|
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(12,22): error TS2314: Generic type 'C<T>' requires 1 type argument(s).
|
|
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(12,26): error TS2314: Generic type 'C<T>' requires 1 type argument(s).
|
|
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(14,23): error TS2314: Generic type 'C<T>' requires 1 type argument(s).
|
|
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(14,27): error TS2314: Generic type 'C<T>' requires 1 type argument(s).
|
|
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(16,25): error TS2314: Generic type 'C<T>' requires 1 type argument(s).
|
|
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(22,26): error TS2305: Module 'M' has no exported member 'C'.
|
|
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(23,28): error TS2314: Generic type 'E<T>' requires 1 type argument(s).
|
|
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(25,30): error TS2314: Generic type 'C<T>' requires 1 type argument(s).
|
|
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(26,30): error TS2314: Generic type 'E<T>' requires 1 type argument(s).
|
|
|
|
|
|
==== tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts (14 errors) ====
|
|
// it is an error to use a generic type without type arguments
|
|
// all of these are errors
|
|
|
|
declare class C<T> {
|
|
foo: T;
|
|
}
|
|
|
|
declare var c: C;
|
|
~
|
|
!!! error TS2314: Generic type 'C<T>' requires 1 type argument(s).
|
|
|
|
declare var a: { x: C };
|
|
~
|
|
!!! error TS2314: Generic type 'C<T>' requires 1 type argument(s).
|
|
declare var b: { (x: C): C };
|
|
~
|
|
!!! error TS2314: Generic type 'C<T>' requires 1 type argument(s).
|
|
~
|
|
!!! error TS2314: Generic type 'C<T>' requires 1 type argument(s).
|
|
declare var d: { [x: C]: C };
|
|
~
|
|
!!! error TS1023: An index signature parameter type must be 'string' or 'number'.
|
|
~
|
|
!!! error TS2314: Generic type 'C<T>' requires 1 type argument(s).
|
|
~
|
|
!!! error TS2314: Generic type 'C<T>' requires 1 type argument(s).
|
|
|
|
declare function f(x: C): C;
|
|
~
|
|
!!! error TS2314: Generic type 'C<T>' requires 1 type argument(s).
|
|
~
|
|
!!! error TS2314: Generic type 'C<T>' requires 1 type argument(s).
|
|
|
|
declare class D extends C {}
|
|
~
|
|
!!! error TS2314: Generic type 'C<T>' requires 1 type argument(s).
|
|
|
|
declare module M {
|
|
export class E<T> { foo: T }
|
|
}
|
|
|
|
declare class D2 extends M.C { }
|
|
~~~
|
|
!!! error TS2305: Module 'M' has no exported member 'C'.
|
|
declare class D3<T extends M.E> { }
|
|
~~~
|
|
!!! error TS2314: Generic type 'E<T>' requires 1 type argument(s).
|
|
|
|
declare function h<T extends C>(x: T);
|
|
~
|
|
!!! error TS2314: Generic type 'C<T>' requires 1 type argument(s).
|
|
declare function i<T extends M.E>(x: T);
|
|
~~~
|
|
!!! error TS2314: Generic type 'E<T>' requires 1 type argument(s). |