mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
added baselines for new test case
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
tests/cases/compiler/differentTypesWithSameName.ts(16,15): error TS2345: Argument of type 'variable' is not assignable to parameter of type 'm.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'.
|
||||
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);
|
||||
Reference in New Issue
Block a user