mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 21:36:50 -05:00
Merge branch 'master' into emitArrowFunctionES6
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/clodulesDerivedClasses.ts(9,7): error TS2417: Class static side 'typeof Path' incorrectly extends base class static side 'typeof Shape'.
|
||||
Types of property 'Utils' are incompatible.
|
||||
Type 'typeof Utils' is not assignable to type 'typeof Utils'.
|
||||
Type 'typeof Path.Utils' is not assignable to type 'typeof Shape.Utils'.
|
||||
Property 'convert' is missing in type 'typeof Utils'.
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ tests/cases/compiler/clodulesDerivedClasses.ts(9,7): error TS2417: Class static
|
||||
~~~~
|
||||
!!! error TS2417: Class static side 'typeof Path' incorrectly extends base class static side 'typeof Shape'.
|
||||
!!! error TS2417: Types of property 'Utils' are incompatible.
|
||||
!!! error TS2417: Type 'typeof Utils' is not assignable to type 'typeof Utils'.
|
||||
!!! error TS2417: Type 'typeof Path.Utils' is not assignable to type 'typeof Shape.Utils'.
|
||||
!!! error TS2417: Property 'convert' is missing in type 'typeof Utils'.
|
||||
name: string;
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
tests/cases/compiler/differentTypesWithSameName.ts(16,15): error TS2345: Argument of type 'variable' is not assignable to parameter of type 'm.variable'.
|
||||
Property 's' is missing in type 'variable'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/differentTypesWithSameName.ts (1 errors) ====
|
||||
module m {
|
||||
export class variable{
|
||||
s: string;
|
||||
}
|
||||
export function doSomething(v: m.variable) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class variable {
|
||||
t: number;
|
||||
}
|
||||
|
||||
|
||||
var v: variable = new variable();
|
||||
m.doSomething(v);
|
||||
~
|
||||
!!! error TS2345: Argument of type 'variable' is not assignable to parameter of type 'm.variable'.
|
||||
!!! error TS2345: Property 's' is missing in type 'variable'.
|
||||
38
tests/baselines/reference/differentTypesWithSameName.js
Normal file
38
tests/baselines/reference/differentTypesWithSameName.js
Normal file
@@ -0,0 +1,38 @@
|
||||
//// [differentTypesWithSameName.ts]
|
||||
module m {
|
||||
export class variable{
|
||||
s: string;
|
||||
}
|
||||
export function doSomething(v: m.variable) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class variable {
|
||||
t: number;
|
||||
}
|
||||
|
||||
|
||||
var v: variable = new variable();
|
||||
m.doSomething(v);
|
||||
|
||||
//// [differentTypesWithSameName.js]
|
||||
var m;
|
||||
(function (m) {
|
||||
var variable = (function () {
|
||||
function variable() {
|
||||
}
|
||||
return variable;
|
||||
})();
|
||||
m.variable = variable;
|
||||
function doSomething(v) {
|
||||
}
|
||||
m.doSomething = doSomething;
|
||||
})(m || (m = {}));
|
||||
var variable = (function () {
|
||||
function variable() {
|
||||
}
|
||||
return variable;
|
||||
})();
|
||||
var v = new variable();
|
||||
m.doSomething(v);
|
||||
@@ -25,10 +25,10 @@ tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAnd
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(50,5): error TS2322: Type 'typeof N' is not assignable to type 'typeof M'.
|
||||
Types of property 'A' are incompatible.
|
||||
Type 'typeof A' is not assignable to type 'typeof A'.
|
||||
Type 'A' is not assignable to type 'A'.
|
||||
Type 'typeof N.A' is not assignable to type 'typeof M.A'.
|
||||
Type 'N.A' is not assignable to type 'M.A'.
|
||||
Property 'name' is missing in type 'A'.
|
||||
tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(51,5): error TS2322: Type 'A' is not assignable to type 'A'.
|
||||
tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(51,5): error TS2322: Type 'N.A' is not assignable to type 'M.A'.
|
||||
tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(52,5): error TS2322: Type '(x: number) => boolean' is not assignable to type '(x: number) => string'.
|
||||
Type 'boolean' is not assignable to type 'string'.
|
||||
|
||||
@@ -124,12 +124,12 @@ tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAnd
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type 'typeof N' is not assignable to type 'typeof M'.
|
||||
!!! error TS2322: Types of property 'A' are incompatible.
|
||||
!!! error TS2322: Type 'typeof A' is not assignable to type 'typeof A'.
|
||||
!!! error TS2322: Type 'A' is not assignable to type 'A'.
|
||||
!!! error TS2322: Type 'typeof N.A' is not assignable to type 'typeof M.A'.
|
||||
!!! error TS2322: Type 'N.A' is not assignable to type 'M.A'.
|
||||
!!! error TS2322: Property 'name' is missing in type 'A'.
|
||||
var aClassInModule: M.A = new N.A();
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'A' is not assignable to type 'A'.
|
||||
!!! error TS2322: Type 'N.A' is not assignable to type 'M.A'.
|
||||
var aFunctionInModule: typeof M.F2 = F2;
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type '(x: number) => boolean' is not assignable to type '(x: number) => string'.
|
||||
|
||||
@@ -10,7 +10,7 @@ tests/cases/compiler/qualify.ts(47,13): error TS2322: Type 'I4' is not assignabl
|
||||
tests/cases/compiler/qualify.ts(48,13): error TS2322: Type 'I4' is not assignable to type '(k: I3) => void'.
|
||||
tests/cases/compiler/qualify.ts(49,13): error TS2322: Type 'I4' is not assignable to type '{ k: I3; }'.
|
||||
Property 'k' is missing in type 'I4'.
|
||||
tests/cases/compiler/qualify.ts(58,5): error TS2322: Type 'I' is not assignable to type 'I'.
|
||||
tests/cases/compiler/qualify.ts(58,5): error TS2322: Type 'I' is not assignable to type 'T.I'.
|
||||
Property 'p' is missing in type 'I'.
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ tests/cases/compiler/qualify.ts(58,5): error TS2322: Type 'I' is not assignable
|
||||
var y:I;
|
||||
var x:T.I=y;
|
||||
~
|
||||
!!! error TS2322: Type 'I' is not assignable to type 'I'.
|
||||
!!! error TS2322: Type 'I' is not assignable to type 'T.I'.
|
||||
!!! error TS2322: Property 'p' is missing in type 'I'.
|
||||
|
||||
|
||||
16
tests/cases/compiler/differentTypesWithSameName.ts
Normal file
16
tests/cases/compiler/differentTypesWithSameName.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
module m {
|
||||
export class variable{
|
||||
s: string;
|
||||
}
|
||||
export function doSomething(v: m.variable) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class variable {
|
||||
t: number;
|
||||
}
|
||||
|
||||
|
||||
var v: variable = new variable();
|
||||
m.doSomething(v);
|
||||
Reference in New Issue
Block a user