diff --git a/tests/cases/compiler/taggedTemplatesInModuleAndGlobal.ts b/tests/cases/compiler/taggedTemplatesInModuleAndGlobal.ts new file mode 100644 index 00000000000..b96b869704a --- /dev/null +++ b/tests/cases/compiler/taggedTemplatesInModuleAndGlobal.ts @@ -0,0 +1,24 @@ +// @module: commonjs +// @target: es5 + +// @filename: global.ts +namespace n { + function id(x: T): T { + return x; + } + + function templateObjectFactory() { + return id`hello world`; + } + let result = templateObjectFactory() === templateObjectFactory(); +} +// @filename: module.ts +export { } +function id(x: T): T { + return x; +} + +function templateObjectFactory() { + return id`hello world`; +} +let result = templateObjectFactory() === templateObjectFactory();