mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-10 06:41:59 -06:00
Merge branch 'master' into mergeMarkers1
This commit is contained in:
commit
a1d04c3c65
@ -4016,7 +4016,7 @@ module ts {
|
||||
result &= related;
|
||||
}
|
||||
}
|
||||
else if (source.typeParameters || source.typeParameters) {
|
||||
else if (source.typeParameters || target.typeParameters) {
|
||||
return Ternary.False;
|
||||
}
|
||||
// Spec 1.0 Section 3.8.3 & 3.8.4:
|
||||
@ -5274,7 +5274,7 @@ module ts {
|
||||
signatureList = [signature];
|
||||
}
|
||||
else if (!compareSignatures(signatureList[0], signature, /*compareReturnTypes*/ false, compareTypes)) {
|
||||
// Signatures arent identical, do not use
|
||||
// Signatures aren't identical, do not use
|
||||
return undefined;
|
||||
}
|
||||
else {
|
||||
|
||||
@ -1548,7 +1548,7 @@ module ts {
|
||||
return sourceFile;
|
||||
}
|
||||
|
||||
export var disableIncrementalParsing = true;
|
||||
export var disableIncrementalParsing = false;
|
||||
|
||||
export function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile {
|
||||
if (textChangeRange && Debug.shouldAssert(AssertionLevel.Normal)) {
|
||||
|
||||
@ -0,0 +1,17 @@
|
||||
tests/cases/compiler/genericAndNonGenericInheritedSignature1.ts(7,11): error TS2320: Interface 'Hello' cannot simultaneously extend types 'Foo' and 'Bar'.
|
||||
Named properties 'f' of types 'Foo' and 'Bar' are not identical.
|
||||
|
||||
|
||||
==== tests/cases/compiler/genericAndNonGenericInheritedSignature1.ts (1 errors) ====
|
||||
interface Foo {
|
||||
f(x: any): any;
|
||||
}
|
||||
interface Bar {
|
||||
f<T>(x: T): T;
|
||||
}
|
||||
interface Hello extends Foo, Bar {
|
||||
~~~~~
|
||||
!!! error TS2320: Interface 'Hello' cannot simultaneously extend types 'Foo' and 'Bar'.
|
||||
!!! error TS2320: Named properties 'f' of types 'Foo' and 'Bar' are not identical.
|
||||
}
|
||||
|
||||
@ -0,0 +1,12 @@
|
||||
//// [genericAndNonGenericInheritedSignature1.ts]
|
||||
interface Foo {
|
||||
f(x: any): any;
|
||||
}
|
||||
interface Bar {
|
||||
f<T>(x: T): T;
|
||||
}
|
||||
interface Hello extends Foo, Bar {
|
||||
}
|
||||
|
||||
|
||||
//// [genericAndNonGenericInheritedSignature1.js]
|
||||
@ -0,0 +1,17 @@
|
||||
tests/cases/compiler/genericAndNonGenericInheritedSignature2.ts(7,11): error TS2320: Interface 'Hello' cannot simultaneously extend types 'Bar' and 'Foo'.
|
||||
Named properties 'f' of types 'Bar' and 'Foo' are not identical.
|
||||
|
||||
|
||||
==== tests/cases/compiler/genericAndNonGenericInheritedSignature2.ts (1 errors) ====
|
||||
interface Foo {
|
||||
f(x: any): any;
|
||||
}
|
||||
interface Bar {
|
||||
f<T>(x: T): T;
|
||||
}
|
||||
interface Hello extends Bar, Foo {
|
||||
~~~~~
|
||||
!!! error TS2320: Interface 'Hello' cannot simultaneously extend types 'Bar' and 'Foo'.
|
||||
!!! error TS2320: Named properties 'f' of types 'Bar' and 'Foo' are not identical.
|
||||
}
|
||||
|
||||
@ -0,0 +1,12 @@
|
||||
//// [genericAndNonGenericInheritedSignature2.ts]
|
||||
interface Foo {
|
||||
f(x: any): any;
|
||||
}
|
||||
interface Bar {
|
||||
f<T>(x: T): T;
|
||||
}
|
||||
interface Hello extends Bar, Foo {
|
||||
}
|
||||
|
||||
|
||||
//// [genericAndNonGenericInheritedSignature2.js]
|
||||
@ -0,0 +1,8 @@
|
||||
interface Foo {
|
||||
f(x: any): any;
|
||||
}
|
||||
interface Bar {
|
||||
f<T>(x: T): T;
|
||||
}
|
||||
interface Hello extends Foo, Bar {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
interface Foo {
|
||||
f(x: any): any;
|
||||
}
|
||||
interface Bar {
|
||||
f<T>(x: T): T;
|
||||
}
|
||||
interface Hello extends Bar, Foo {
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user