mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-10 01:43:59 -05:00
rename tests, add another test, reoslve symbols for comparison
This commit is contained in:
@@ -1113,7 +1113,7 @@ namespace ts {
|
||||
};
|
||||
}
|
||||
}
|
||||
else if (lookupTable && exportNode && id !== "default" && hasProperty(target, id) && target[id] !== source[id]) {
|
||||
else if (lookupTable && exportNode && id !== "default" && hasProperty(target, id) && resolveSymbol(target[id]) !== resolveSymbol(source[id])) {
|
||||
lookupTable[id].exportsWithDuplicate.push(exportNode);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//// [tests/cases/compiler/moduleSameValueDuplicateExportedBindings.ts] ////
|
||||
//// [tests/cases/compiler/moduleSameValueDuplicateExportedBindings1.ts] ////
|
||||
|
||||
//// [a.ts]
|
||||
export * from "./b";
|
||||
@@ -0,0 +1,34 @@
|
||||
//// [tests/cases/compiler/moduleSameValueDuplicateExportedBindings2.ts] ////
|
||||
|
||||
//// [a.ts]
|
||||
export * from "./b";
|
||||
export * from "./c";
|
||||
|
||||
//// [b.ts]
|
||||
export {Animals} from "./c";
|
||||
|
||||
//// [c.ts]
|
||||
export enum Animals {
|
||||
Cat,
|
||||
Dog
|
||||
};
|
||||
|
||||
//// [c.js]
|
||||
"use strict";
|
||||
(function (Animals) {
|
||||
Animals[Animals["Cat"] = 0] = "Cat";
|
||||
Animals[Animals["Dog"] = 1] = "Dog";
|
||||
})(exports.Animals || (exports.Animals = {}));
|
||||
var Animals = exports.Animals;
|
||||
;
|
||||
//// [b.js]
|
||||
"use strict";
|
||||
var c_1 = require("./c");
|
||||
exports.Animals = c_1.Animals;
|
||||
//// [a.js]
|
||||
"use strict";
|
||||
function __export(m) {
|
||||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
||||
}
|
||||
__export(require("./b"));
|
||||
__export(require("./c"));
|
||||
@@ -0,0 +1,19 @@
|
||||
=== tests/cases/compiler/a.ts ===
|
||||
export * from "./b";
|
||||
No type information for this code.export * from "./c";
|
||||
No type information for this code.
|
||||
No type information for this code.=== tests/cases/compiler/b.ts ===
|
||||
export {Animals} from "./c";
|
||||
>Animals : Symbol(Animals, Decl(b.ts, 0, 8))
|
||||
|
||||
=== tests/cases/compiler/c.ts ===
|
||||
export enum Animals {
|
||||
>Animals : Symbol(Animals, Decl(c.ts, 0, 0))
|
||||
|
||||
Cat,
|
||||
>Cat : Symbol(Animals.Cat, Decl(c.ts, 0, 21))
|
||||
|
||||
Dog
|
||||
>Dog : Symbol(Animals.Dog, Decl(c.ts, 1, 5))
|
||||
|
||||
};
|
||||
@@ -0,0 +1,19 @@
|
||||
=== tests/cases/compiler/a.ts ===
|
||||
export * from "./b";
|
||||
No type information for this code.export * from "./c";
|
||||
No type information for this code.
|
||||
No type information for this code.=== tests/cases/compiler/b.ts ===
|
||||
export {Animals} from "./c";
|
||||
>Animals : typeof Animals
|
||||
|
||||
=== tests/cases/compiler/c.ts ===
|
||||
export enum Animals {
|
||||
>Animals : Animals
|
||||
|
||||
Cat,
|
||||
>Cat : Animals
|
||||
|
||||
Dog
|
||||
>Dog : Animals
|
||||
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
// @module: commonjs
|
||||
// @filename: a.ts
|
||||
export * from "./b";
|
||||
export * from "./c";
|
||||
|
||||
// @filename: b.ts
|
||||
export {Animals} from "./c";
|
||||
|
||||
// @filename: c.ts
|
||||
export enum Animals {
|
||||
Cat,
|
||||
Dog
|
||||
};
|
||||
Reference in New Issue
Block a user