From d2fd6437d76b842ef64df8038659df634e67083c Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Wed, 18 Nov 2015 21:46:45 -0800 Subject: [PATCH 001/160] initial implementation of path mapping based module resolution --- src/compiler/commandLineParser.ts | 81 ++++-- src/compiler/diagnosticMessages.json | 31 +- src/compiler/program.ts | 273 +++++++++++++++++- src/compiler/tsc.ts | 6 +- src/compiler/types.ts | 24 +- src/harness/compilerRunner.ts | 21 +- src/harness/harness.ts | 31 +- .../pathMappingBasedModuleResolution1.js | 27 ++ .../pathMappingBasedModuleResolution1.symbols | 25 ++ .../pathMappingBasedModuleResolution1.types | 28 ++ .../pathMappingBasedModuleResolution10.js | 34 +++ ...pathMappingBasedModuleResolution10.symbols | 29 ++ .../pathMappingBasedModuleResolution10.types | 32 ++ .../pathMappingBasedModuleResolution10_1.js | 34 +++ ...thMappingBasedModuleResolution10_1.symbols | 29 ++ ...pathMappingBasedModuleResolution10_1.types | 32 ++ .../pathMappingBasedModuleResolution10_2.js | 34 +++ ...thMappingBasedModuleResolution10_2.symbols | 29 ++ ...pathMappingBasedModuleResolution10_2.types | 32 ++ .../pathMappingBasedModuleResolution1_1.js | 27 ++ ...athMappingBasedModuleResolution1_1.symbols | 25 ++ .../pathMappingBasedModuleResolution1_1.types | 28 ++ .../pathMappingBasedModuleResolution2.js | 23 ++ .../pathMappingBasedModuleResolution2.symbols | 22 ++ .../pathMappingBasedModuleResolution2.types | 25 ++ .../pathMappingBasedModuleResolution2_1.js | 23 ++ ...athMappingBasedModuleResolution2_1.symbols | 22 ++ .../pathMappingBasedModuleResolution2_1.types | 25 ++ .../pathMappingBasedModuleResolution3.js | 23 ++ .../pathMappingBasedModuleResolution3.symbols | 22 ++ .../pathMappingBasedModuleResolution3.types | 25 ++ .../pathMappingBasedModuleResolution3_1.js | 23 ++ ...athMappingBasedModuleResolution3_1.symbols | 22 ++ .../pathMappingBasedModuleResolution3_1.types | 25 ++ .../pathMappingBasedModuleResolution4.js | 27 ++ .../pathMappingBasedModuleResolution4.symbols | 22 ++ .../pathMappingBasedModuleResolution4.types | 25 ++ .../pathMappingBasedModuleResolution4_1.js | 27 ++ ...athMappingBasedModuleResolution4_1.symbols | 22 ++ .../pathMappingBasedModuleResolution4_1.types | 25 ++ ...thMappingBasedModuleResolution5.errors.txt | 6 + .../pathMappingBasedModuleResolution5.js | 5 + ...thMappingBasedModuleResolution6.errors.txt | 8 + .../pathMappingBasedModuleResolution6.js | 7 + .../pathMappingBasedModuleResolution7.js | 40 +++ .../pathMappingBasedModuleResolution7.symbols | 44 +++ .../pathMappingBasedModuleResolution7.types | 53 ++++ .../pathMappingBasedModuleResolution7_1.js | 40 +++ ...athMappingBasedModuleResolution7_1.symbols | 44 +++ .../pathMappingBasedModuleResolution7_1.types | 53 ++++ .../pathMappingBasedModuleResolution7_2.js | 50 ++++ ...athMappingBasedModuleResolution7_2.symbols | 57 ++++ .../pathMappingBasedModuleResolution7_2.types | 69 +++++ .../pathMappingBasedModuleResolution8.js | 40 +++ .../pathMappingBasedModuleResolution8.symbols | 44 +++ .../pathMappingBasedModuleResolution8.types | 53 ++++ .../pathMappingBasedModuleResolution8_1.js | 50 ++++ ...athMappingBasedModuleResolution8_1.symbols | 57 ++++ .../pathMappingBasedModuleResolution8_1.types | 69 +++++ .../pathMappingBasedModuleResolution9.js | 47 +++ .../pathMappingBasedModuleResolution9.symbols | 48 +++ .../pathMappingBasedModuleResolution9.types | 57 ++++ .../pathMappingBasedModuleResolution9_1.js | 57 ++++ ...athMappingBasedModuleResolution9_1.symbols | 61 ++++ .../pathMappingBasedModuleResolution9_1.types | 73 +++++ .../pathMappingBasedModuleResolution9_2.js | 57 ++++ ...athMappingBasedModuleResolution9_2.symbols | 61 ++++ .../pathMappingBasedModuleResolution9_2.types | 73 +++++ .../pathMappingBasedModuleResolution1.ts | 18 ++ .../pathMappingBasedModuleResolution10.ts | 34 +++ .../pathMappingBasedModuleResolution10_1.ts | 35 +++ .../pathMappingBasedModuleResolution10_2.ts | 36 +++ .../pathMappingBasedModuleResolution1_1.ts | 18 ++ .../pathMappingBasedModuleResolution2.ts | 22 ++ .../pathMappingBasedModuleResolution2_1.ts | 22 ++ .../pathMappingBasedModuleResolution3.ts | 23 ++ .../pathMappingBasedModuleResolution3_1.ts | 23 ++ .../pathMappingBasedModuleResolution4.ts | 23 ++ .../pathMappingBasedModuleResolution4_1.ts | 23 ++ .../pathMappingBasedModuleResolution5.ts | 13 + .../pathMappingBasedModuleResolution6.ts | 17 ++ .../pathMappingBasedModuleResolution7.ts | 38 +++ .../pathMappingBasedModuleResolution7_1.ts | 38 +++ .../pathMappingBasedModuleResolution7_2.ts | 44 +++ .../pathMappingBasedModuleResolution8.ts | 39 +++ .../pathMappingBasedModuleResolution8_1.ts | 45 +++ .../pathMappingBasedModuleResolution9.ts | 42 +++ .../pathMappingBasedModuleResolution9_1.ts | 48 +++ .../pathMappingBasedModuleResolution9_2.ts | 48 +++ tests/cases/unittests/moduleResolution.ts | 128 ++++++++ 90 files changed, 3391 insertions(+), 49 deletions(-) create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution1.js create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution1.symbols create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution1.types create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution10.js create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution10.symbols create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution10.types create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution10_1.js create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution10_1.symbols create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution10_1.types create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution10_2.js create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution10_2.symbols create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution10_2.types create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution1_1.js create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution1_1.symbols create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution1_1.types create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution2.js create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution2.symbols create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution2.types create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution2_1.js create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution2_1.symbols create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution2_1.types create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution3.js create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution3.symbols create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution3.types create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution3_1.js create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution3_1.symbols create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution3_1.types create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution4.js create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution4.symbols create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution4.types create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution4_1.js create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution4_1.symbols create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution4_1.types create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution5.errors.txt create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution5.js create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution6.errors.txt create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution6.js create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution7.js create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution7.symbols create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution7.types create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution7_1.js create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution7_1.symbols create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution7_1.types create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution7_2.js create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution7_2.symbols create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution7_2.types create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution8.js create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution8.symbols create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution8.types create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution8_1.js create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution8_1.symbols create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution8_1.types create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution9.js create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution9.symbols create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution9.types create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution9_1.js create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution9_1.symbols create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution9_1.types create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution9_2.js create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution9_2.symbols create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution9_2.types create mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution1.ts create mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution10.ts create mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution10_1.ts create mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution10_2.ts create mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution1_1.ts create mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution2.ts create mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution2_1.ts create mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution3.ts create mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution3_1.ts create mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution4.ts create mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution4_1.ts create mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution5.ts create mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution6.ts create mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution7.ts create mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution7_1.ts create mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution7_2.ts create mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution8.ts create mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution8_1.ts create mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution9.ts create mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution9_1.ts create mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution9_2.ts diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 3fca97c0450..70513219000 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -250,10 +250,12 @@ namespace ts { name: "moduleResolution", type: { "node": ModuleResolutionKind.NodeJs, - "classic": ModuleResolutionKind.Classic + "classic": ModuleResolutionKind.Classic, + // name is lowercased so we can still use hasProperty(userValue.toLower()) to check if user has entered the right value + "baseurl": ModuleResolutionKind.BaseUrl, }, description: Diagnostics.Specifies_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6, - error: Diagnostics.Argument_for_moduleResolution_option_must_be_node_or_classic, + error: Diagnostics.Argument_for_moduleResolution_option_must_be_node_classic_or_baseUrl, }, { name: "allowUnusedLabels", @@ -279,6 +281,26 @@ namespace ts { name: "forceConsistentCasingInFileNames", type: "boolean", description: Diagnostics.Disallow_inconsistently_cased_references_to_the_same_file + }, + { + name: "baseUrl", + type: "string", + isFilePath: true, + description: Diagnostics.Base_directory_to_resolve_relative_module_names + }, + { + // this option can only be specified in tsconfig.json + // use type = object to copy the value as-is + name: "paths", + type: "object", + isTSConfigOnly: true + }, + { + // this option can only be specified in tsconfig.json + // use type = object to copy the value as-is + name: "rootDirs", + type: "object", + isTSConfigOnly: true } ]; @@ -339,31 +361,36 @@ namespace ts { if (hasProperty(optionNameMap, s)) { const opt = optionNameMap[s]; - // Check to see if no argument was provided (e.g. "--locale" is the last command-line argument). - if (!args[i] && opt.type !== "boolean") { - errors.push(createCompilerDiagnostic(Diagnostics.Compiler_option_0_expects_an_argument, opt.name)); + if (opt.isTSConfigOnly) { + errors.push(createCompilerDiagnostic(Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file, opt.name)); } + else { + // Check to see if no argument was provided (e.g. "--locale" is the last command-line argument). + if (!args[i] && opt.type !== "boolean") { + errors.push(createCompilerDiagnostic(Diagnostics.Compiler_option_0_expects_an_argument, opt.name)); + } - switch (opt.type) { - case "number": - options[opt.name] = parseInt(args[i++]); - break; - case "boolean": - options[opt.name] = true; - break; - case "string": - options[opt.name] = args[i++] || ""; - break; - // If not a primitive, the possible types are specified in what is effectively a map of options. - default: - let map = >opt.type; - let key = (args[i++] || "").toLowerCase(); - if (hasProperty(map, key)) { - options[opt.name] = map[key]; - } - else { - errors.push(createCompilerDiagnostic((opt).error)); - } + switch (opt.type) { + case "number": + options[opt.name] = parseInt(args[i++]); + break; + case "boolean": + options[opt.name] = true; + break; + case "string": + options[opt.name] = args[i++] || ""; + break; + // If not a primitive, the possible types are specified in what is effectively a map of options. + default: + let map = >opt.type; + let key = (args[i++] || "").toLowerCase(); + if (hasProperty(map, key)) { + options[opt.name] = map[key]; + } + else { + errors.push(createCompilerDiagnostic((opt).error)); + } + } } } else { @@ -466,7 +493,6 @@ namespace ts { return output; } - /** * Parse the contents of a config file (tsconfig.json). * @param json The contents of the config file to parse @@ -477,6 +503,9 @@ namespace ts { export function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string): ParsedCommandLine { const { options, errors } = convertCompilerOptionsFromJson(json["compilerOptions"], basePath); + // set basePath as inferredBaseUrl so baseUrl module resolution strategy can still work even if user have not specified baseUrl explicity + options.inferredBaseUrl = basePath; + return { options, fileNames: getFileNames(), diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index ad71d646b7b..39b7fad4a49 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -2060,7 +2060,26 @@ "category": "Error", "code": 5054 }, - + "Option '{0}' can only be used when option 'moduleResolution' is 'baseUrl'.": { + "category": "Error", + "code": 5055 + }, + "Pattern '{0}' can have at most one '*' character": { + "category": "Error", + "code": 5056 + }, + "Substitution '{0}' in pattern '{1}' in can have at most one '*' character": { + "category": "Error", + "code": 5057 + }, + "'moduleResolution' kind 'baseUrl' cannot be used without specifying '--baseUrl' option.": { + "category": "Error", + "code": 5058 + }, + "Module resolution kind cannot be determined automatically. Please specify module resolution explicitly via 'moduleResolution' option.": { + "category": "Error", + "code": 5059 + }, "Concatenate and emit output to single file.": { "category": "Message", "code": 6001 @@ -2253,10 +2272,14 @@ "category": "Error", "code": 6062 }, - "Argument for '--moduleResolution' option must be 'node' or 'classic'.": { + "Argument for '--moduleResolution' option must be 'node', 'classic' or 'baseUrl'.": { "category": "Error", "code": 6063 }, + "Option '{0}' can only be specified in 'tsconfig.json' file.": { + "category": "Error", + "code": 6064 + }, "Enables experimental support for ES7 decorators.": { "category": "Message", @@ -2322,6 +2345,10 @@ "category": "Error", "code": 6082 }, + "Base directory to resolve relative module names.": { + "category": "Message", + "code": 6083 + }, "Variable '{0}' implicitly has an '{1}' type.": { "category": "Error", "code": 7005 diff --git a/src/compiler/program.ts b/src/compiler/program.ts index dc31dfb5213..36f01e77ece 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -37,23 +37,221 @@ namespace ts { } export function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations { - const moduleResolution = compilerOptions.moduleResolution !== undefined - ? compilerOptions.moduleResolution - : compilerOptions.module === ModuleKind.CommonJS ? ModuleResolutionKind.NodeJs : ModuleResolutionKind.Classic; + let moduleResolution = compilerOptions.moduleResolution; + if (moduleResolution === undefined) { + if (compilerOptions.module === ModuleKind.CommonJS) { + moduleResolution = ModuleResolutionKind.NodeJs; + } + else if (compilerOptions.baseUrl !== undefined || compilerOptions.paths || compilerOptions.rootDirs) { + moduleResolution = ModuleResolutionKind.BaseUrl; + } + else { + moduleResolution = ModuleResolutionKind.Classic; + } + } switch (moduleResolution) { case ModuleResolutionKind.NodeJs: return nodeModuleNameResolver(moduleName, containingFile, host); case ModuleResolutionKind.Classic: return classicNameResolver(moduleName, containingFile, compilerOptions, host); + case ModuleResolutionKind.BaseUrl: return baseUrlModuleNameResolver(moduleName, containingFile, compilerOptions, host); } } + // Path mapping based module resolution strategy uses base url to resolve relative file names. This resolution strategy can be enabled + // by setting 'moduleResolution' option to 'baseUrl' and as it implied by the name it uses base url to resolve module names. + // Base url can be specified: + // - explicitly via command line option 'baseUrl'. If this value is relative it will be computed relative to current directory. + // - explicitly in 'tsconfig.json' via 'baseUrl' compiler option. If this value is relative it will be computed relative to the location + // of 'tsconfig.json'. + // - if value is not provided explicitly but project uses tsconfig.json then 'baseUrl' will be set of folder that contains 'tsconfig.json' + // If baseUrl is the only provided option then non-relative module names will be resolved relative to baseUrl. Relative module names + // will still be resolved relative to the folder that contains file with import. + // User can specify additional options in tsconfig.json to tweak module resolution. + // - 'paths' option allows to tune how non-relative module names will be resolved based on the content of the module name. + // Structure of 'paths' compiler options + // 'paths': { + // pattern-1: list of substitutions 1, + // pattern-2: list of substitutions 2, + // ... + // pattern-n: list of substitutions-n + // } + // Pattern here is a string that can contain zero or one '*' character. During module resolution module name will be matched against + // all patterns in the list. Matching for patterns that don't contain '*' means that module name must be equal to pattern respecting the case. + // If pattern contains '*' then to match pattern "*" module name must start with the and end with . + // denotes part of the module name between and . + // If module name can be matches with multiple patterns then pattern with the longest prefix will be picked. + // After selecting pattern we'll use list of substitutions to get candidate locations of the module and the try to load module from the candidate location. + // Substitiution is a string that can contain zero or one '*'. To get candidate location from substitution we'll pick every substitution in the list + // and replace '*' with string. If candidate location is not rooted it will be converted to absolute using baseUrl. + // For example: + // baseUrl: /a/b/c + // "paths": { + // // match all module names + // "*": [ + // "*", // use matched name as is, + // // will be looked as /a/b/c/ + // + // "folder1/*" // substitution will convert matched name to 'folder1/', + // // since it is not rooted then final candidate location will be /a/b/c/folder1/ + // ], + // // match module names that start with 'components/' + // "components/*": [ "/root/components/*" ] // substitution will convert /components/folder1/ to '/root/components/folder1/', + // // it is rooted so it will be final candidate location + // } + // 'paths' allows to remap locations of non-relative module names. Relative module names usually are resolved relative to the folder + // that contains import. However sometimes it might be useful to apply mappings to relative module names as well. + // Since the there might be different relative file names that refer to the same file we need to convert relative module name to non-relative + // so we can just apply path mapping to it. This conversion can be performed using 'rootDirs' compiler option - this options stores list of root directories + // for the project (if root directory is not absolute it will be converted to absolute using baseUrl as a base path). + // First - we convert relative module name to absolute using location of file that contains import. + // Then we try to find what element is rootDirs is the longest prefix for this absolute file name (respecting case): + // = + // Once it is done - value of is a be non-relative name for initially relative module name. + // Note that if element in rootDirs should always end with '/' so it will be appended automatically if value in configuration does not have it. + // For example: + // baseUrl: /a/b/c + // "paths": { + // "*": [ "*", "generated/*" ] // try to resolve module name as '/a/b/c/' then look it in '/a/b/c/generated/' + // } + // "rootDirs": [ + // "./src", // root dir is project baseUrl/src + // "./generated" // root dir is baseUrl/generated + // "/e/f" // root dir is /e/f + // ] + // @file: /a/b/c/src/form1.ts + // import {x} from "./form.content.ts" + // @file: /a/b/c/generated/form1.content.ts + // export var x = ... + // first './form.content.ts' needs to be converted to non-relative name. + // 1. convert it to absolute name '/a/b/c/src/form1.content.ts' -> + // find longest prefix in rootDirs that match this path, it will be './src' (after expansion '/a/b/c/src/') -> + // suffix is form1.content.ts + // 2. apply path mappings to 'form1.content.ts' -> + // '*' pattern will be matched -> + // '*' substitution yields '/a/b/c/form1.content.ts' - file does not exists + // 'generated/*' substitution yields '/a/b/c/generated/form1.content' - file exists - OK + export function baseUrlModuleNameResolver(moduleName: string, containingFile: string, options: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations { + const baseUrl = options.baseUrl !== undefined ? options.baseUrl : options.inferredBaseUrl; + Debug.assert(baseUrl !== undefined); + + if (isRootedDiskPath(moduleName)) { + return { resolvedModule: { resolvedFileName: moduleName }, failedLookupLocations: emptyArray }; + } + + if (nameStartsWithDotSlashOrDotDotSlash(moduleName)) { + // relative name + return baseUrlResolveRelativeModuleName(moduleName, containingFile, baseUrl, options, host); + } + else { + // non-relative name + return baseUrlResolveNonRelativeModuleName(moduleName, baseUrl, options, host); + } + } + + export function baseUrlResolveRelativeModuleName(moduleName: string, containingFile: string, baseUrl: string, options: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations { + const failedLookupLocations: string[] = []; + + const containingDirectory = getDirectoryPath(containingFile); + const candidate = normalizePath(combinePaths(containingDirectory, moduleName)); + + if (options.rootDirs) { + let matchedPrefix: string; + for (const rootDir of options.rootDirs) { + let normalizedRoot = getNormalizedAbsolutePath(rootDir, baseUrl); + if (!endsWith(normalizedRoot, directorySeparator)) { + normalizedRoot += directorySeparator; + } + if (startsWith(candidate, normalizedRoot) && (matchedPrefix === undefined || matchedPrefix.length < normalizedRoot.length)) { + matchedPrefix = normalizedRoot; + } + } + if (matchedPrefix) { + const suffix = candidate.substr(matchedPrefix.length); + return baseUrlResolveNonRelativeModuleName(suffix, baseUrl, options, host); + } + return { resolvedModule: undefined, failedLookupLocations }; + } + else { + const resolvedFileName = loadModuleFromFile(supportedExtensions, candidate, failedLookupLocations, host); + return { + resolvedModule: resolvedFileName ? { resolvedFileName } : undefined, + failedLookupLocations + }; + } + } + + export function baseUrlResolveNonRelativeModuleName(moduleName: string, baseUrl: string, options: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations { + let longestMatchPrefixLength = -1; + let matchedPattern: string; + let matchedStar: string; + + const failedLookupLocations: string[] = []; + if (options.paths) { + for (const key in options.paths) { + const pattern: string = key; + const indexOfStar = pattern.indexOf("*"); + if (indexOfStar !== -1) { + const prefix = pattern.substr(0, indexOfStar); + const suffix = pattern.substr(indexOfStar + 1); + if (moduleName.length >= prefix.length + suffix.length && + startsWith(moduleName, prefix) && + endsWith(moduleName, suffix)) { + + // use length of prefix as betterness criteria + if (prefix.length > longestMatchPrefixLength) { + longestMatchPrefixLength = prefix.length; + matchedPattern = pattern; + matchedStar = moduleName.substr(prefix.length, moduleName.length - suffix.length); + } + } + } + else if (pattern === moduleName) { + // pattern was matched as is - no need to seatch further + matchedPattern = pattern; + matchedStar = undefined; + break; + } + } + } + + if (matchedPattern) { + for (const subst of options.paths[matchedPattern]) { + const path = matchedStar ? subst.replace("\*", matchedStar) : subst; + const candidate = normalizePath(combinePaths(baseUrl, path)); + const resolvedFileName = loadModuleFromFile(supportedExtensions, candidate, failedLookupLocations, host); + if (resolvedFileName) { + return { resolvedModule: { resolvedFileName }, failedLookupLocations }; + } + } + + return { resolvedModule: undefined, failedLookupLocations }; + } + else { + const candidate = normalizePath(combinePaths(baseUrl, moduleName)); + const resolvedFileName = loadModuleFromFile(supportedExtensions, candidate, failedLookupLocations, host); + return { + resolvedModule: resolvedFileName ? { resolvedFileName } : undefined, + failedLookupLocations + }; + } + } + + function startsWith(str: string, prefix: string): boolean { + return str.lastIndexOf(prefix, 0) === 0; + } + + function endsWith(str: string, suffix: string): boolean { + const expectedPos = str.length - suffix.length; + return str.indexOf(suffix, expectedPos) === expectedPos; + } + export function nodeModuleNameResolver(moduleName: string, containingFile: string, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations { const containingDirectory = getDirectoryPath(containingFile); - if (getRootLength(moduleName) !== 0 || nameStartsWithDotSlashOrDotDotSlash(moduleName)) { + if (isRootedDiskPath(moduleName) || nameStartsWithDotSlashOrDotDotSlash(moduleName)) { const failedLookupLocations: string[] = []; const candidate = normalizePath(combinePaths(containingDirectory, moduleName)); - let resolvedFileName = loadNodeModuleFromFile(supportedJsExtensions, candidate, failedLookupLocations, host); + let resolvedFileName = loadModuleFromFile(supportedJsExtensions, candidate, failedLookupLocations, host); if (resolvedFileName) { return { resolvedModule: { resolvedFileName }, failedLookupLocations }; @@ -69,7 +267,7 @@ namespace ts { } } - function loadNodeModuleFromFile(extensions: string[], candidate: string, failedLookupLocation: string[], host: ModuleResolutionHost): string { + function loadModuleFromFile(extensions: string[], candidate: string, failedLookupLocation: string[], host: ModuleResolutionHost): string { return forEach(extensions, tryLoad); function tryLoad(ext: string): string { @@ -100,7 +298,7 @@ namespace ts { } if (jsonContent.typings) { - const result = loadNodeModuleFromFile(extensions, normalizePath(combinePaths(candidate, jsonContent.typings)), failedLookupLocation, host); + const result = loadModuleFromFile(extensions, normalizePath(combinePaths(candidate, jsonContent.typings)), failedLookupLocation, host); if (result) { return result; } @@ -111,7 +309,7 @@ namespace ts { failedLookupLocation.push(packageJsonPath); } - return loadNodeModuleFromFile(extensions, combinePaths(candidate, "index"), failedLookupLocation, host); + return loadModuleFromFile(extensions, combinePaths(candidate, "index"), failedLookupLocation, host); } function loadModuleFromNodeModules(moduleName: string, directory: string, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations { @@ -122,7 +320,7 @@ namespace ts { if (baseName !== "node_modules") { const nodeModulesFolder = combinePaths(directory, "node_modules"); const candidate = normalizePath(combinePaths(nodeModulesFolder, moduleName)); - let result = loadNodeModuleFromFile(supportedExtensions, candidate, failedLookupLocations, host); + let result = loadModuleFromFile(supportedExtensions, candidate, failedLookupLocations, host); if (result) { return { resolvedModule: { resolvedFileName: result, isExternalLibraryImport: true }, failedLookupLocations }; } @@ -149,6 +347,22 @@ namespace ts { return i === 0 || (i === 1 && name.charCodeAt(0) === CharacterCodes.dot); } + function hasZeroOrOneAsteriskCharacter(str: string): boolean { + let seenAsterisk = false; + for (let i = 0; i < str.length; ++i) { + if (str.charCodeAt(i) === CharacterCodes.asterisk) { + if (!seenAsterisk) { + seenAsterisk = true; + } + else { + // have already seen asterisk + return false; + } + } + } + return true; + } + export function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations { // module names that contain '!' are used to reference resources and are not resolved to actual files on disk @@ -997,6 +1211,47 @@ namespace ts { } } + if (options.moduleResolution === ModuleResolutionKind.BaseUrl) { + if (options.baseUrl === undefined && options.inferredBaseUrl === undefined) { + programDiagnostics.add(createCompilerDiagnostic(Diagnostics.moduleResolution_kind_baseUrl_cannot_be_used_without_specifying_baseUrl_option)); + } + } + else if (options.moduleResolution === undefined) { + // if module resolution kind is not specified it is an error to have baseUrl\paths\rootDirs and module === CommonJs + // since the former one implies moduleResolutionKind to be BaseUrl and the latter one - Node + if (options.module === ModuleKind.CommonJS && (options.baseUrl || options.paths || options.rootDirs)) { + programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Module_resolution_kind_cannot_be_determined_automatically_Please_specify_module_resolution_explicitly_via_moduleResolution_option)); + } + } + else { + // here it is known that moduleResolution is not baseurl and is not undefined + if (options.baseUrl !== undefined) { + programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_can_only_be_used_when_option_moduleResolution_is_baseUrl, "baseUrl")); + } + if (options.paths) { + programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_can_only_be_used_when_option_moduleResolution_is_baseUrl, "paths")); + } + if (options.rootDirs) { + programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_can_only_be_used_when_option_moduleResolution_is_baseUrl, "rootDirs")); + } + } + + if (options.paths) { + for (const key in options.paths) { + if (!hasProperty(options.paths, key)) { + continue; + } + if (!hasZeroOrOneAsteriskCharacter(key)) { + programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Pattern_0_can_have_at_most_one_Asterisk_character, key)); + } + for (const subst of options.paths[key]) { + if (!hasZeroOrOneAsteriskCharacter(subst)) { + programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character, subst, key)); + } + } + } + } + if (options.inlineSources) { if (!options.sourceMap && !options.inlineSourceMap) { programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_inlineSources_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided)); diff --git a/src/compiler/tsc.ts b/src/compiler/tsc.ts index f560a15dfb9..12a538156f4 100644 --- a/src/compiler/tsc.ts +++ b/src/compiler/tsc.ts @@ -360,7 +360,7 @@ namespace ts { sys.exit(ExitStatus.DiagnosticsPresent_OutputsSkipped); return; } - const configParseResult = parseJsonConfigFileContent(configObject, sys, getDirectoryPath(configFileName)); + const configParseResult = parseJsonConfigFileContent(configObject, sys, getNormalizedAbsolutePath(getDirectoryPath(configFileName), sys.getCurrentDirectory())); if (configParseResult.errors.length > 0) { reportDiagnostics(configParseResult.errors, /* compilerHost */ undefined); sys.exit(ExitStatus.DiagnosticsPresent_OutputsSkipped); @@ -723,7 +723,9 @@ namespace ts { for (const name in options) { if (hasProperty(options, name)) { - const value = options[name]; + // tsconfig only options cannot be specified via command line, + // so we can assume that only types that can appear here string | number | boolean + const value = options[name]; switch (name) { case "init": case "watch": diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 34be02c5ba5..3cedb9b4123 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -2310,9 +2310,14 @@ namespace ts { export const enum ModuleResolutionKind { Classic = 1, - NodeJs = 2 + NodeJs = 2, + BaseUrl = 3 } + export type RootPaths = string[]; + export type PathSubstitutions = Map; + export type TsConfigOnlyOptions = RootPaths | PathSubstitutions; + export interface CompilerOptions { allowNonTsExtensions?: boolean; charset?: string; @@ -2360,12 +2365,17 @@ namespace ts { noImplicitReturns?: boolean; noFallthroughCasesInSwitch?: boolean; forceConsistentCasingInFileNames?: boolean; + baseUrl?: string; + paths?: PathSubstitutions; + rootDirs?: RootPaths; /* @internal */ stripInternal?: boolean; // Skip checking lib.d.ts to help speed up tests. /* @internal */ skipDefaultLibCheck?: boolean; + // inferred baseUrl - currently this will be set in 'parseJsonConfigFileContent' to 'baseDir' + /* @internal */ inferredBaseUrl?: string; - [option: string]: string | number | boolean; + [option: string]: string | number | boolean | TsConfigOnlyOptions; } export const enum ModuleKind { @@ -2425,12 +2435,13 @@ namespace ts { /* @internal */ export interface CommandLineOptionBase { name: string; - type: "string" | "number" | "boolean" | Map; // a value of a primitive type, or an object literal mapping named values to actual values + type: "string" | "number" | "boolean" | "object" | Map; // a value of a primitive type, or an object literal mapping named values to actual values isFilePath?: boolean; // True if option value is a path or fileName shortName?: string; // A short mnemonic for convenience - for instance, 'h' can be used in place of 'help' description?: DiagnosticMessage; // The message describing what the command line switch does paramType?: DiagnosticMessage; // The name to be used for a non-boolean option's parameter experimental?: boolean; + isTSConfigOnly?: boolean; // True if option can only be specified via tsconfig.json file } /* @internal */ @@ -2445,7 +2456,12 @@ namespace ts { } /* @internal */ - export type CommandLineOption = CommandLineOptionOfCustomType | CommandLineOptionOfPrimitiveType; + export interface TsConfigOnlyOption extends CommandLineOptionBase { + type: "object"; + } + + /* @internal */ + export type CommandLineOption = CommandLineOptionOfCustomType | CommandLineOptionOfPrimitiveType | TsConfigOnlyOption; /* @internal */ export const enum CharacterCodes { diff --git a/src/harness/compilerRunner.ts b/src/harness/compilerRunner.ts index 425fa888013..53e740db336 100644 --- a/src/harness/compilerRunner.ts +++ b/src/harness/compilerRunner.ts @@ -49,7 +49,6 @@ class CompilerBaselineRunner extends RunnerBase { // Mocha holds onto the closure environment of the describe callback even after the test is done. // Everything declared here should be cleared out in the "after" callback. let justName: string; - let lastUnit: Harness.TestCaseParser.TestUnitData; let harnessSettings: Harness.TestCaseParser.CompilerSettings; @@ -63,16 +62,30 @@ class CompilerBaselineRunner extends RunnerBase { before(() => { justName = fileName.replace(/^.*[\\\/]/, ""); // strips the fileName from the path. const content = Harness.IO.readFile(fileName); - const testCaseContent = Harness.TestCaseParser.makeUnitsFromTest(content, fileName); + const rootDir = fileName.indexOf("conformance") === -1 ? "tests/cases/compiler/" : ts.getDirectoryPath(fileName) + "/"; + const testCaseContent = Harness.TestCaseParser.makeUnitsFromTest(content, fileName, rootDir); const units = testCaseContent.testUnitData; harnessSettings = testCaseContent.settings; + let tsConfigOptions: ts.CompilerOptions; + if (testCaseContent.tsConfig) { + assert.equal(testCaseContent.tsConfig.fileNames.length, 0, `list of files in tsconfig is not currently supported`); + + tsConfigOptions = ts.clone(testCaseContent.tsConfig.options); + } + else { + const baseUrl = harnessSettings["baseUrl"]; + if (baseUrl !== undefined && !ts.isRootedDiskPath(baseUrl)) { + harnessSettings["baseUrl"] = ts.getNormalizedAbsolutePath(baseUrl, rootDir); + } + } + lastUnit = units[units.length - 1]; - const rootDir = lastUnit.originalFilePath.indexOf("conformance") === -1 ? "tests/cases/compiler/" : lastUnit.originalFilePath.substring(0, lastUnit.originalFilePath.lastIndexOf("/")) + "/"; // We need to assemble the list of input files for the compiler and other related files on the 'filesystem' (ie in a multi-file test) // If the last file in a test uses require or a triple slash reference we'll assume all other files will be brought in via references, // otherwise, assume all files are just meant to be in the same compilation session without explicit references to one another. toBeCompiled = []; otherFiles = []; + if (/require\(/.test(lastUnit.content) || /reference\spath/.test(lastUnit.content)) { toBeCompiled.push({ unitName: this.makeUnitName(lastUnit.name, rootDir), content: lastUnit.content }); units.forEach(unit => { @@ -88,7 +101,7 @@ class CompilerBaselineRunner extends RunnerBase { } const output = Harness.Compiler.compileFiles( - toBeCompiled, otherFiles, harnessSettings, /* options */ undefined, /* currentDirectory */ undefined); + toBeCompiled, otherFiles, harnessSettings, /*options*/ tsConfigOptions, /*currentDirectory*/ undefined); options = output.options; result = output.result; diff --git a/src/harness/harness.ts b/src/harness/harness.ts index ef0f2678e29..183852ad516 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -1000,6 +1000,9 @@ namespace Harness { if (options.useCaseSensitiveFileNames !== undefined) { useCaseSensitiveFileNames = options.useCaseSensitiveFileNames; } + if (options.inferredBaseUrl) { + options.inferredBaseUrl = ts.getNormalizedAbsolutePath(options.inferredBaseUrl, currentDirectory); + } const programFiles: TestFile[] = inputFiles.slice(); // Files from built\local that are requested by test "@includeBuiltFiles" to be in the context. @@ -1372,7 +1375,7 @@ namespace Harness { } /** Given a test file containing // @FileName directives, return an array of named units of code to be added to an existing compiler instance */ - export function makeUnitsFromTest(code: string, fileName: string): { settings: CompilerSettings; testUnitData: TestUnitData[]; } { + export function makeUnitsFromTest(code: string, fileName: string, rootDir?: string): { settings: CompilerSettings; testUnitData: TestUnitData[]; tsConfig: ts.ParsedCommandLine } { const settings = extractCompilerSettings(code); // List of all the subfiles we've parsed out @@ -1450,7 +1453,31 @@ namespace Harness { }; testUnitData.push(newTestFile2); - return { settings, testUnitData }; + // unit tests always list files explicitly + const parseConfigHost: ts.ParseConfigHost = { + readDirectory: (name) => [] + }; + + // check if project has tsconfig.json in the list of files + let tsConfig: ts.ParsedCommandLine; + for (let i = 0; i < testUnitData.length; ++i) { + const data = testUnitData[i]; + if (ts.getBaseFileName(data.name).toLowerCase() === "tsconfig.json") { + const configJson = ts.parseConfigFileTextToJson(data.name, data.content); + assert.isTrue(configJson.config !== undefined); + let baseDir = ts.normalizePath(ts.getDirectoryPath(data.name)); + if (rootDir) { + baseDir = ts.getNormalizedAbsolutePath(baseDir, rootDir); + } + tsConfig = ts.parseJsonConfigFileContent(configJson.config, parseConfigHost, baseDir); + + // delete entry from the list + testUnitData.splice(i, 1); + + break; + } + } + return { settings, testUnitData, tsConfig }; } } diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution1.js b/tests/baselines/reference/pathMappingBasedModuleResolution1.js new file mode 100644 index 00000000000..3a30893b5d1 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution1.js @@ -0,0 +1,27 @@ +//// [tests/cases/compiler/pathMappingBasedModuleResolution1.ts] //// + +//// [file1.ts] + +// user defined base url + +import {x} from "folder2/file2" + +declare function use(a: any): void; + +use(x.toExponential()); + +//// [file2.ts] +export {x} from "./file3" + +//// [file3.ts] +export var x = 1; + +//// [file3.js] +exports.x = 1; +//// [file2.js] +var file3_1 = require("./file3"); +exports.x = file3_1.x; +//// [file1.js] +// user defined base url +var file2_1 = require("folder2/file2"); +use(file2_1.x.toExponential()); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution1.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution1.symbols new file mode 100644 index 00000000000..377cd6a86dc --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution1.symbols @@ -0,0 +1,25 @@ +=== tests/cases/compiler/root/folder1/file1.ts === + +// user defined base url + +import {x} from "folder2/file2" +>x : Symbol(x, Decl(file1.ts, 3, 8)) + +declare function use(a: any): void; +>use : Symbol(use, Decl(file1.ts, 3, 31)) +>a : Symbol(a, Decl(file1.ts, 5, 21)) + +use(x.toExponential()); +>use : Symbol(use, Decl(file1.ts, 3, 31)) +>x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(file1.ts, 3, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +=== tests/cases/compiler/root/folder2/file2.ts === +export {x} from "./file3" +>x : Symbol(x, Decl(file2.ts, 0, 8)) + +=== tests/cases/compiler/root/folder2/file3.ts === +export var x = 1; +>x : Symbol(x, Decl(file3.ts, 0, 10)) + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution1.types b/tests/baselines/reference/pathMappingBasedModuleResolution1.types new file mode 100644 index 00000000000..68fc42a28f2 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution1.types @@ -0,0 +1,28 @@ +=== tests/cases/compiler/root/folder1/file1.ts === + +// user defined base url + +import {x} from "folder2/file2" +>x : number + +declare function use(a: any): void; +>use : (a: any) => void +>a : any + +use(x.toExponential()); +>use(x.toExponential()) : void +>use : (a: any) => void +>x.toExponential() : string +>x.toExponential : (fractionDigits?: number) => string +>x : number +>toExponential : (fractionDigits?: number) => string + +=== tests/cases/compiler/root/folder2/file2.ts === +export {x} from "./file3" +>x : number + +=== tests/cases/compiler/root/folder2/file3.ts === +export var x = 1; +>x : number +>1 : number + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution10.js b/tests/baselines/reference/pathMappingBasedModuleResolution10.js new file mode 100644 index 00000000000..0961ff87048 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution10.js @@ -0,0 +1,34 @@ +//// [tests/cases/compiler/pathMappingBasedModuleResolution10.ts] //// + +//// [file1.ts] +import {x} from "./file2" // should be resolved to 'generated/folder1/file2.ts' + +export var z = x.toExponential(); + +//// [file2.ts] +export {x} from "folder1/file3" // should be resolved to 'folder1/file3.ts' + +//// [file3.ts] +export var x = 1; + +//// [file3.ts] +import {z as y} from "../folder1/file1" // should be resolved to 'folder1/file1.ts' +let z = y.toLowerCase(); + + +//// [file3.js] +define(["require", "exports"], function (require, exports) { + exports.x = 1; +}); +//// [file2.js] +define(["require", "exports", "folder1/file3"], function (require, exports, file3_1) { + exports.x = file3_1.x; // should be resolved to 'folder1/file3.ts' +}); +//// [file1.js] +define(["require", "exports", "./file2"], function (require, exports, file2_1) { + exports.z = file2_1.x.toExponential(); +}); +//// [file3.js] +define(["require", "exports", "../folder1/file1"], function (require, exports, file1_1) { + var z = file1_1.z.toLowerCase(); +}); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution10.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution10.symbols new file mode 100644 index 00000000000..e01d12fc7e3 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution10.symbols @@ -0,0 +1,29 @@ +=== tests/cases/compiler/root/folder1/file1.ts === +import {x} from "./file2" // should be resolved to 'generated/folder1/file2.ts' +>x : Symbol(x, Decl(file1.ts, 0, 8)) + +export var z = x.toExponential(); +>z : Symbol(z, Decl(file1.ts, 2, 10)) +>x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(file1.ts, 0, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +=== tests/cases/compiler/root/generated/folder1/file2.ts === +export {x} from "folder1/file3" // should be resolved to 'folder1/file3.ts' +>x : Symbol(x, Decl(file2.ts, 0, 8)) + +=== tests/cases/compiler/root/folder1/file3.ts === +export var x = 1; +>x : Symbol(x, Decl(file3.ts, 0, 10)) + +=== tests/cases/compiler/root/generated/folder2/file3.ts === +import {z as y} from "../folder1/file1" // should be resolved to 'folder1/file1.ts' +>z : Symbol(y, Decl(file3.ts, 0, 8)) +>y : Symbol(y, Decl(file3.ts, 0, 8)) + +let z = y.toLowerCase(); +>z : Symbol(z, Decl(file3.ts, 1, 3)) +>y.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) +>y : Symbol(y, Decl(file3.ts, 0, 8)) +>toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution10.types b/tests/baselines/reference/pathMappingBasedModuleResolution10.types new file mode 100644 index 00000000000..ac3caa8b532 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution10.types @@ -0,0 +1,32 @@ +=== tests/cases/compiler/root/folder1/file1.ts === +import {x} from "./file2" // should be resolved to 'generated/folder1/file2.ts' +>x : number + +export var z = x.toExponential(); +>z : string +>x.toExponential() : string +>x.toExponential : (fractionDigits?: number) => string +>x : number +>toExponential : (fractionDigits?: number) => string + +=== tests/cases/compiler/root/generated/folder1/file2.ts === +export {x} from "folder1/file3" // should be resolved to 'folder1/file3.ts' +>x : number + +=== tests/cases/compiler/root/folder1/file3.ts === +export var x = 1; +>x : number +>1 : number + +=== tests/cases/compiler/root/generated/folder2/file3.ts === +import {z as y} from "../folder1/file1" // should be resolved to 'folder1/file1.ts' +>z : string +>y : string + +let z = y.toLowerCase(); +>z : string +>y.toLowerCase() : string +>y.toLowerCase : () => string +>y : string +>toLowerCase : () => string + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution10_1.js b/tests/baselines/reference/pathMappingBasedModuleResolution10_1.js new file mode 100644 index 00000000000..a7aa19bc304 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution10_1.js @@ -0,0 +1,34 @@ +//// [tests/cases/compiler/pathMappingBasedModuleResolution10_1.ts] //// + +//// [file2.ts] +export {x} from "folder1/file3" // should be resolved to 'folder1/file3.ts' + +//// [file3.ts] +export var x = 1; + +//// [file3.ts] +import {z as y} from "../folder1/file1" // should be resolved to 'folder1/file1.ts' +let z = y.toLowerCase(); + +//// [file1.ts] +import {x} from "./file2" // should be resolved to 'generated/folder1/file2.ts' + +export var z = x.toExponential(); + + +//// [file3.js] +define(["require", "exports"], function (require, exports) { + exports.x = 1; +}); +//// [file2.js] +define(["require", "exports", "folder1/file3"], function (require, exports, file3_1) { + exports.x = file3_1.x; // should be resolved to 'folder1/file3.ts' +}); +//// [file1.js] +define(["require", "exports", "./file2"], function (require, exports, file2_1) { + exports.z = file2_1.x.toExponential(); +}); +//// [file3.js] +define(["require", "exports", "../folder1/file1"], function (require, exports, file1_1) { + var z = file1_1.z.toLowerCase(); +}); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution10_1.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution10_1.symbols new file mode 100644 index 00000000000..dbc1fc792d4 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution10_1.symbols @@ -0,0 +1,29 @@ +=== c:/root/generated/folder1/file2.ts === +export {x} from "folder1/file3" // should be resolved to 'folder1/file3.ts' +>x : Symbol(x, Decl(file2.ts, 0, 8)) + +=== c:/root/folder1/file3.ts === +export var x = 1; +>x : Symbol(x, Decl(file3.ts, 0, 10)) + +=== c:/root/generated/folder2/file3.ts === +import {z as y} from "../folder1/file1" // should be resolved to 'folder1/file1.ts' +>z : Symbol(y, Decl(file3.ts, 0, 8)) +>y : Symbol(y, Decl(file3.ts, 0, 8)) + +let z = y.toLowerCase(); +>z : Symbol(z, Decl(file3.ts, 1, 3)) +>y.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) +>y : Symbol(y, Decl(file3.ts, 0, 8)) +>toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) + +=== c:/root/folder1/file1.ts === +import {x} from "./file2" // should be resolved to 'generated/folder1/file2.ts' +>x : Symbol(x, Decl(file1.ts, 0, 8)) + +export var z = x.toExponential(); +>z : Symbol(z, Decl(file1.ts, 2, 10)) +>x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(file1.ts, 0, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution10_1.types b/tests/baselines/reference/pathMappingBasedModuleResolution10_1.types new file mode 100644 index 00000000000..bf617b2b1a3 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution10_1.types @@ -0,0 +1,32 @@ +=== c:/root/generated/folder1/file2.ts === +export {x} from "folder1/file3" // should be resolved to 'folder1/file3.ts' +>x : number + +=== c:/root/folder1/file3.ts === +export var x = 1; +>x : number +>1 : number + +=== c:/root/generated/folder2/file3.ts === +import {z as y} from "../folder1/file1" // should be resolved to 'folder1/file1.ts' +>z : string +>y : string + +let z = y.toLowerCase(); +>z : string +>y.toLowerCase() : string +>y.toLowerCase : () => string +>y : string +>toLowerCase : () => string + +=== c:/root/folder1/file1.ts === +import {x} from "./file2" // should be resolved to 'generated/folder1/file2.ts' +>x : number + +export var z = x.toExponential(); +>z : string +>x.toExponential() : string +>x.toExponential : (fractionDigits?: number) => string +>x : number +>toExponential : (fractionDigits?: number) => string + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution10_2.js b/tests/baselines/reference/pathMappingBasedModuleResolution10_2.js new file mode 100644 index 00000000000..b1e7af6d834 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution10_2.js @@ -0,0 +1,34 @@ +//// [tests/cases/compiler/pathMappingBasedModuleResolution10_2.ts] //// + +//// [file2.ts] +export {x} from "folder1/file3" // should be resolved to 'folder1/file3.ts' + +//// [file3.ts] +export var x = 1; + +//// [file3.ts] +import {z as y} from "../folder1/file1" // should be resolved to 'folder1/file1.ts' +let z = y.toLowerCase(); + +//// [file1.ts] +import {x} from "./file2" // should be resolved to 'generated/folder1/file2.ts' + +export var z = x.toExponential(); + + +//// [file3.js] +define(["require", "exports"], function (require, exports) { + exports.x = 1; +}); +//// [file2.js] +define(["require", "exports", "folder1/file3"], function (require, exports, file3_1) { + exports.x = file3_1.x; // should be resolved to 'folder1/file3.ts' +}); +//// [file1.js] +define(["require", "exports", "./file2"], function (require, exports, file2_1) { + exports.z = file2_1.x.toExponential(); +}); +//// [file3.js] +define(["require", "exports", "../folder1/file1"], function (require, exports, file1_1) { + var z = file1_1.z.toLowerCase(); +}); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution10_2.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution10_2.symbols new file mode 100644 index 00000000000..64a308338c9 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution10_2.symbols @@ -0,0 +1,29 @@ +=== c:/root/src/generated/folder1/file2.ts === +export {x} from "folder1/file3" // should be resolved to 'folder1/file3.ts' +>x : Symbol(x, Decl(file2.ts, 0, 8)) + +=== c:/root/src/folder1/file3.ts === +export var x = 1; +>x : Symbol(x, Decl(file3.ts, 0, 10)) + +=== c:/root/src/generated/folder2/file3.ts === +import {z as y} from "../folder1/file1" // should be resolved to 'folder1/file1.ts' +>z : Symbol(y, Decl(file3.ts, 0, 8)) +>y : Symbol(y, Decl(file3.ts, 0, 8)) + +let z = y.toLowerCase(); +>z : Symbol(z, Decl(file3.ts, 1, 3)) +>y.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) +>y : Symbol(y, Decl(file3.ts, 0, 8)) +>toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) + +=== c:/root/src/folder1/file1.ts === +import {x} from "./file2" // should be resolved to 'generated/folder1/file2.ts' +>x : Symbol(x, Decl(file1.ts, 0, 8)) + +export var z = x.toExponential(); +>z : Symbol(z, Decl(file1.ts, 2, 10)) +>x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(file1.ts, 0, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution10_2.types b/tests/baselines/reference/pathMappingBasedModuleResolution10_2.types new file mode 100644 index 00000000000..0fc9270c667 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution10_2.types @@ -0,0 +1,32 @@ +=== c:/root/src/generated/folder1/file2.ts === +export {x} from "folder1/file3" // should be resolved to 'folder1/file3.ts' +>x : number + +=== c:/root/src/folder1/file3.ts === +export var x = 1; +>x : number +>1 : number + +=== c:/root/src/generated/folder2/file3.ts === +import {z as y} from "../folder1/file1" // should be resolved to 'folder1/file1.ts' +>z : string +>y : string + +let z = y.toLowerCase(); +>z : string +>y.toLowerCase() : string +>y.toLowerCase : () => string +>y : string +>toLowerCase : () => string + +=== c:/root/src/folder1/file1.ts === +import {x} from "./file2" // should be resolved to 'generated/folder1/file2.ts' +>x : number + +export var z = x.toExponential(); +>z : string +>x.toExponential() : string +>x.toExponential : (fractionDigits?: number) => string +>x : number +>toExponential : (fractionDigits?: number) => string + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution1_1.js b/tests/baselines/reference/pathMappingBasedModuleResolution1_1.js new file mode 100644 index 00000000000..889eacfca51 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution1_1.js @@ -0,0 +1,27 @@ +//// [tests/cases/compiler/pathMappingBasedModuleResolution1_1.ts] //// + +//// [file1.ts] + +// user defined base url + +import {x} from "folder2/file2" + +declare function use(a: any): void; + +use(x.toExponential()); + +//// [file2.ts] +export {x} from "./file3" + +//// [file3.ts] +export var x = 1; + +//// [file3.js] +exports.x = 1; +//// [file2.js] +var file3_1 = require("./file3"); +exports.x = file3_1.x; +//// [file1.js] +// user defined base url +var file2_1 = require("folder2/file2"); +use(file2_1.x.toExponential()); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution1_1.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution1_1.symbols new file mode 100644 index 00000000000..20f69963c76 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution1_1.symbols @@ -0,0 +1,25 @@ +=== c:/root/folder1/file1.ts === + +// user defined base url + +import {x} from "folder2/file2" +>x : Symbol(x, Decl(file1.ts, 3, 8)) + +declare function use(a: any): void; +>use : Symbol(use, Decl(file1.ts, 3, 31)) +>a : Symbol(a, Decl(file1.ts, 5, 21)) + +use(x.toExponential()); +>use : Symbol(use, Decl(file1.ts, 3, 31)) +>x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(file1.ts, 3, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +=== c:/root/folder2/file2.ts === +export {x} from "./file3" +>x : Symbol(x, Decl(file2.ts, 0, 8)) + +=== c:/root/folder2/file3.ts === +export var x = 1; +>x : Symbol(x, Decl(file3.ts, 0, 10)) + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution1_1.types b/tests/baselines/reference/pathMappingBasedModuleResolution1_1.types new file mode 100644 index 00000000000..5b0727157ac --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution1_1.types @@ -0,0 +1,28 @@ +=== c:/root/folder1/file1.ts === + +// user defined base url + +import {x} from "folder2/file2" +>x : number + +declare function use(a: any): void; +>use : (a: any) => void +>a : any + +use(x.toExponential()); +>use(x.toExponential()) : void +>use : (a: any) => void +>x.toExponential() : string +>x.toExponential : (fractionDigits?: number) => string +>x : number +>toExponential : (fractionDigits?: number) => string + +=== c:/root/folder2/file2.ts === +export {x} from "./file3" +>x : number + +=== c:/root/folder2/file3.ts === +export var x = 1; +>x : number +>1 : number + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution2.js b/tests/baselines/reference/pathMappingBasedModuleResolution2.js new file mode 100644 index 00000000000..0d32bf187fe --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution2.js @@ -0,0 +1,23 @@ +//// [tests/cases/compiler/pathMappingBasedModuleResolution2.ts] //// + +//// [file1.ts] +import {x} from "folder2/file2" + +declare function use(a: any): void; + +use(x.toExponential()); + +//// [file2.ts] +export {x} from "./file3" + +//// [file3.ts] +export var x = 1; + +//// [file3.js] +exports.x = 1; +//// [file2.js] +var file3_1 = require("./file3"); +exports.x = file3_1.x; +//// [file1.js] +var file2_1 = require("folder2/file2"); +use(file2_1.x.toExponential()); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution2.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution2.symbols new file mode 100644 index 00000000000..94f458ff1d3 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution2.symbols @@ -0,0 +1,22 @@ +=== tests/cases/compiler/root/folder1/file1.ts === +import {x} from "folder2/file2" +>x : Symbol(x, Decl(file1.ts, 0, 8)) + +declare function use(a: any): void; +>use : Symbol(use, Decl(file1.ts, 0, 31)) +>a : Symbol(a, Decl(file1.ts, 2, 21)) + +use(x.toExponential()); +>use : Symbol(use, Decl(file1.ts, 0, 31)) +>x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(file1.ts, 0, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +=== tests/cases/compiler/root/folder2/file2.ts === +export {x} from "./file3" +>x : Symbol(x, Decl(file2.ts, 0, 8)) + +=== tests/cases/compiler/root/folder2/file3.ts === +export var x = 1; +>x : Symbol(x, Decl(file3.ts, 0, 10)) + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution2.types b/tests/baselines/reference/pathMappingBasedModuleResolution2.types new file mode 100644 index 00000000000..ff6ef52f321 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution2.types @@ -0,0 +1,25 @@ +=== tests/cases/compiler/root/folder1/file1.ts === +import {x} from "folder2/file2" +>x : number + +declare function use(a: any): void; +>use : (a: any) => void +>a : any + +use(x.toExponential()); +>use(x.toExponential()) : void +>use : (a: any) => void +>x.toExponential() : string +>x.toExponential : (fractionDigits?: number) => string +>x : number +>toExponential : (fractionDigits?: number) => string + +=== tests/cases/compiler/root/folder2/file2.ts === +export {x} from "./file3" +>x : number + +=== tests/cases/compiler/root/folder2/file3.ts === +export var x = 1; +>x : number +>1 : number + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution2_1.js b/tests/baselines/reference/pathMappingBasedModuleResolution2_1.js new file mode 100644 index 00000000000..5e3e3820e5c --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution2_1.js @@ -0,0 +1,23 @@ +//// [tests/cases/compiler/pathMappingBasedModuleResolution2_1.ts] //// + +//// [file1.ts] +import {x} from "folder2/file2" + +declare function use(a: any): void; + +use(x.toExponential()); + +//// [file2.ts] +export {x} from "./file3" + +//// [file3.ts] +export var x = 1; + +//// [file3.js] +exports.x = 1; +//// [file2.js] +var file3_1 = require("./file3"); +exports.x = file3_1.x; +//// [file1.js] +var file2_1 = require("folder2/file2"); +use(file2_1.x.toExponential()); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution2_1.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution2_1.symbols new file mode 100644 index 00000000000..aa84fbf8cf9 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution2_1.symbols @@ -0,0 +1,22 @@ +=== c:/root/folder1/file1.ts === +import {x} from "folder2/file2" +>x : Symbol(x, Decl(file1.ts, 0, 8)) + +declare function use(a: any): void; +>use : Symbol(use, Decl(file1.ts, 0, 31)) +>a : Symbol(a, Decl(file1.ts, 2, 21)) + +use(x.toExponential()); +>use : Symbol(use, Decl(file1.ts, 0, 31)) +>x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(file1.ts, 0, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +=== c:/root/folder2/file2.ts === +export {x} from "./file3" +>x : Symbol(x, Decl(file2.ts, 0, 8)) + +=== c:/root/folder2/file3.ts === +export var x = 1; +>x : Symbol(x, Decl(file3.ts, 0, 10)) + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution2_1.types b/tests/baselines/reference/pathMappingBasedModuleResolution2_1.types new file mode 100644 index 00000000000..de76a17e406 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution2_1.types @@ -0,0 +1,25 @@ +=== c:/root/folder1/file1.ts === +import {x} from "folder2/file2" +>x : number + +declare function use(a: any): void; +>use : (a: any) => void +>a : any + +use(x.toExponential()); +>use(x.toExponential()) : void +>use : (a: any) => void +>x.toExponential() : string +>x.toExponential : (fractionDigits?: number) => string +>x : number +>toExponential : (fractionDigits?: number) => string + +=== c:/root/folder2/file2.ts === +export {x} from "./file3" +>x : number + +=== c:/root/folder2/file3.ts === +export var x = 1; +>x : number +>1 : number + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution3.js b/tests/baselines/reference/pathMappingBasedModuleResolution3.js new file mode 100644 index 00000000000..0c14be68978 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution3.js @@ -0,0 +1,23 @@ +//// [tests/cases/compiler/pathMappingBasedModuleResolution3.ts] //// + +//// [file1.ts] +import {x} from "folder2/file2" + +declare function use(a: any): void; + +use(x.toExponential()); + +//// [file2.ts] +export {x} from "./file3" + +//// [file3.ts] +export var x = 1; + +//// [file3.js] +exports.x = 1; +//// [file2.js] +var file3_1 = require("./file3"); +exports.x = file3_1.x; +//// [file1.js] +var file2_1 = require("folder2/file2"); +use(file2_1.x.toExponential()); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution3.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution3.symbols new file mode 100644 index 00000000000..b071ecec087 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution3.symbols @@ -0,0 +1,22 @@ +=== tests/cases/compiler/root/src/folder1/file1.ts === +import {x} from "folder2/file2" +>x : Symbol(x, Decl(file1.ts, 0, 8)) + +declare function use(a: any): void; +>use : Symbol(use, Decl(file1.ts, 0, 31)) +>a : Symbol(a, Decl(file1.ts, 2, 21)) + +use(x.toExponential()); +>use : Symbol(use, Decl(file1.ts, 0, 31)) +>x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(file1.ts, 0, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +=== tests/cases/compiler/root/src/folder2/file2.ts === +export {x} from "./file3" +>x : Symbol(x, Decl(file2.ts, 0, 8)) + +=== tests/cases/compiler/root/src/folder2/file3.ts === +export var x = 1; +>x : Symbol(x, Decl(file3.ts, 0, 10)) + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution3.types b/tests/baselines/reference/pathMappingBasedModuleResolution3.types new file mode 100644 index 00000000000..15428de5560 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution3.types @@ -0,0 +1,25 @@ +=== tests/cases/compiler/root/src/folder1/file1.ts === +import {x} from "folder2/file2" +>x : number + +declare function use(a: any): void; +>use : (a: any) => void +>a : any + +use(x.toExponential()); +>use(x.toExponential()) : void +>use : (a: any) => void +>x.toExponential() : string +>x.toExponential : (fractionDigits?: number) => string +>x : number +>toExponential : (fractionDigits?: number) => string + +=== tests/cases/compiler/root/src/folder2/file2.ts === +export {x} from "./file3" +>x : number + +=== tests/cases/compiler/root/src/folder2/file3.ts === +export var x = 1; +>x : number +>1 : number + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution3_1.js b/tests/baselines/reference/pathMappingBasedModuleResolution3_1.js new file mode 100644 index 00000000000..ee827d8fa7d --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution3_1.js @@ -0,0 +1,23 @@ +//// [tests/cases/compiler/pathMappingBasedModuleResolution3_1.ts] //// + +//// [file1.ts] +import {x} from "folder2/file2" + +declare function use(a: any): void; + +use(x.toExponential()); + +//// [file2.ts] +export {x} from "./file3" + +//// [file3.ts] +export var x = 1; + +//// [file3.js] +exports.x = 1; +//// [file2.js] +var file3_1 = require("./file3"); +exports.x = file3_1.x; +//// [file1.js] +var file2_1 = require("folder2/file2"); +use(file2_1.x.toExponential()); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution3_1.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution3_1.symbols new file mode 100644 index 00000000000..835d16d46f4 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution3_1.symbols @@ -0,0 +1,22 @@ +=== c:/root/src/folder1/file1.ts === +import {x} from "folder2/file2" +>x : Symbol(x, Decl(file1.ts, 0, 8)) + +declare function use(a: any): void; +>use : Symbol(use, Decl(file1.ts, 0, 31)) +>a : Symbol(a, Decl(file1.ts, 2, 21)) + +use(x.toExponential()); +>use : Symbol(use, Decl(file1.ts, 0, 31)) +>x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(file1.ts, 0, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +=== c:/root/src/folder2/file2.ts === +export {x} from "./file3" +>x : Symbol(x, Decl(file2.ts, 0, 8)) + +=== c:/root/src/folder2/file3.ts === +export var x = 1; +>x : Symbol(x, Decl(file3.ts, 0, 10)) + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution3_1.types b/tests/baselines/reference/pathMappingBasedModuleResolution3_1.types new file mode 100644 index 00000000000..8db89ab12b7 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution3_1.types @@ -0,0 +1,25 @@ +=== c:/root/src/folder1/file1.ts === +import {x} from "folder2/file2" +>x : number + +declare function use(a: any): void; +>use : (a: any) => void +>a : any + +use(x.toExponential()); +>use(x.toExponential()) : void +>use : (a: any) => void +>x.toExponential() : string +>x.toExponential : (fractionDigits?: number) => string +>x : number +>toExponential : (fractionDigits?: number) => string + +=== c:/root/src/folder2/file2.ts === +export {x} from "./file3" +>x : number + +=== c:/root/src/folder2/file3.ts === +export var x = 1; +>x : number +>1 : number + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution4.js b/tests/baselines/reference/pathMappingBasedModuleResolution4.js new file mode 100644 index 00000000000..5e66fabcd92 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution4.js @@ -0,0 +1,27 @@ +//// [tests/cases/compiler/pathMappingBasedModuleResolution4.ts] //// + +//// [file1.ts] +import {x} from "folder2/file2" + +declare function use(a: any): void; + +use(x.toExponential()); + +//// [file2.ts] +export {x} from "./file3" + +//// [file3.ts] +export var x = 1; + +//// [file3.js] +define(["require", "exports"], function (require, exports) { + exports.x = 1; +}); +//// [file2.js] +define(["require", "exports", "./file3"], function (require, exports, file3_1) { + exports.x = file3_1.x; +}); +//// [file1.js] +define(["require", "exports", "folder2/file2"], function (require, exports, file2_1) { + use(file2_1.x.toExponential()); +}); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution4.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution4.symbols new file mode 100644 index 00000000000..b071ecec087 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution4.symbols @@ -0,0 +1,22 @@ +=== tests/cases/compiler/root/src/folder1/file1.ts === +import {x} from "folder2/file2" +>x : Symbol(x, Decl(file1.ts, 0, 8)) + +declare function use(a: any): void; +>use : Symbol(use, Decl(file1.ts, 0, 31)) +>a : Symbol(a, Decl(file1.ts, 2, 21)) + +use(x.toExponential()); +>use : Symbol(use, Decl(file1.ts, 0, 31)) +>x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(file1.ts, 0, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +=== tests/cases/compiler/root/src/folder2/file2.ts === +export {x} from "./file3" +>x : Symbol(x, Decl(file2.ts, 0, 8)) + +=== tests/cases/compiler/root/src/folder2/file3.ts === +export var x = 1; +>x : Symbol(x, Decl(file3.ts, 0, 10)) + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution4.types b/tests/baselines/reference/pathMappingBasedModuleResolution4.types new file mode 100644 index 00000000000..15428de5560 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution4.types @@ -0,0 +1,25 @@ +=== tests/cases/compiler/root/src/folder1/file1.ts === +import {x} from "folder2/file2" +>x : number + +declare function use(a: any): void; +>use : (a: any) => void +>a : any + +use(x.toExponential()); +>use(x.toExponential()) : void +>use : (a: any) => void +>x.toExponential() : string +>x.toExponential : (fractionDigits?: number) => string +>x : number +>toExponential : (fractionDigits?: number) => string + +=== tests/cases/compiler/root/src/folder2/file2.ts === +export {x} from "./file3" +>x : number + +=== tests/cases/compiler/root/src/folder2/file3.ts === +export var x = 1; +>x : number +>1 : number + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution4_1.js b/tests/baselines/reference/pathMappingBasedModuleResolution4_1.js new file mode 100644 index 00000000000..ca2afc5bc59 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution4_1.js @@ -0,0 +1,27 @@ +//// [tests/cases/compiler/pathMappingBasedModuleResolution4_1.ts] //// + +//// [file1.ts] +import {x} from "folder2/file2" + +declare function use(a: any): void; + +use(x.toExponential()); + +//// [file2.ts] +export {x} from "./file3" + +//// [file3.ts] +export var x = 1; + +//// [file3.js] +define(["require", "exports"], function (require, exports) { + exports.x = 1; +}); +//// [file2.js] +define(["require", "exports", "./file3"], function (require, exports, file3_1) { + exports.x = file3_1.x; +}); +//// [file1.js] +define(["require", "exports", "folder2/file2"], function (require, exports, file2_1) { + use(file2_1.x.toExponential()); +}); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution4_1.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution4_1.symbols new file mode 100644 index 00000000000..835d16d46f4 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution4_1.symbols @@ -0,0 +1,22 @@ +=== c:/root/src/folder1/file1.ts === +import {x} from "folder2/file2" +>x : Symbol(x, Decl(file1.ts, 0, 8)) + +declare function use(a: any): void; +>use : Symbol(use, Decl(file1.ts, 0, 31)) +>a : Symbol(a, Decl(file1.ts, 2, 21)) + +use(x.toExponential()); +>use : Symbol(use, Decl(file1.ts, 0, 31)) +>x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(file1.ts, 0, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +=== c:/root/src/folder2/file2.ts === +export {x} from "./file3" +>x : Symbol(x, Decl(file2.ts, 0, 8)) + +=== c:/root/src/folder2/file3.ts === +export var x = 1; +>x : Symbol(x, Decl(file3.ts, 0, 10)) + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution4_1.types b/tests/baselines/reference/pathMappingBasedModuleResolution4_1.types new file mode 100644 index 00000000000..8db89ab12b7 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution4_1.types @@ -0,0 +1,25 @@ +=== c:/root/src/folder1/file1.ts === +import {x} from "folder2/file2" +>x : number + +declare function use(a: any): void; +>use : (a: any) => void +>a : any + +use(x.toExponential()); +>use(x.toExponential()) : void +>use : (a: any) => void +>x.toExponential() : string +>x.toExponential : (fractionDigits?: number) => string +>x : number +>toExponential : (fractionDigits?: number) => string + +=== c:/root/src/folder2/file2.ts === +export {x} from "./file3" +>x : number + +=== c:/root/src/folder2/file3.ts === +export var x = 1; +>x : number +>1 : number + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution5.errors.txt b/tests/baselines/reference/pathMappingBasedModuleResolution5.errors.txt new file mode 100644 index 00000000000..71dd19b48f2 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution5.errors.txt @@ -0,0 +1,6 @@ +error TS5059: Module resolution kind cannot be determined automatically. Please specify module resolution explicitly via 'moduleResolution' option. + + +!!! error TS5059: Module resolution kind cannot be determined automatically. Please specify module resolution explicitly via 'moduleResolution' option. +==== tests/cases/compiler/root/src/folder1/file1.ts (0 errors) ==== + export var x = 1; \ No newline at end of file diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution5.js b/tests/baselines/reference/pathMappingBasedModuleResolution5.js new file mode 100644 index 00000000000..66783980a0a --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution5.js @@ -0,0 +1,5 @@ +//// [file1.ts] +export var x = 1; + +//// [file1.js] +exports.x = 1; diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution6.errors.txt b/tests/baselines/reference/pathMappingBasedModuleResolution6.errors.txt new file mode 100644 index 00000000000..8b5760eaf60 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution6.errors.txt @@ -0,0 +1,8 @@ +error TS5056: Pattern '*1*' can have at most one '*' character +error TS5057: Substitution '*2*' in pattern '*1*' in can have at most one '*' character + + +!!! error TS5056: Pattern '*1*' can have at most one '*' character +!!! error TS5057: Substitution '*2*' in pattern '*1*' in can have at most one '*' character +==== tests/cases/compiler/root/src/folder1/file1.ts (0 errors) ==== + export var x = 1; \ No newline at end of file diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution6.js b/tests/baselines/reference/pathMappingBasedModuleResolution6.js new file mode 100644 index 00000000000..871b60535f1 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution6.js @@ -0,0 +1,7 @@ +//// [file1.ts] +export var x = 1; + +//// [file1.js] +define(["require", "exports"], function (require, exports) { + exports.x = 1; +}); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution7.js b/tests/baselines/reference/pathMappingBasedModuleResolution7.js new file mode 100644 index 00000000000..292d0854fe3 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution7.js @@ -0,0 +1,40 @@ +//// [tests/cases/compiler/pathMappingBasedModuleResolution7.ts] //// + +//// [file1.ts] +import {x} from "folder2/file1" +import {y} from "folder3/file2" +import {z} from "components/file3" + +declare function use(a: any): void; + +use(x.toExponential()); +use(y.toExponential()); +use(z.toExponential()); + +//// [file1.ts] +export var x = 1; + +//// [file2.ts] +export var y = 1; + +//// [file3.ts] +export var z = 1; + +//// [file1.js] +define(["require", "exports"], function (require, exports) { + exports.x = 1; +}); +//// [file2.js] +define(["require", "exports"], function (require, exports) { + exports.y = 1; +}); +//// [file3.js] +define(["require", "exports"], function (require, exports) { + exports.z = 1; +}); +//// [file1.js] +define(["require", "exports", "folder2/file1", "folder3/file2", "components/file3"], function (require, exports, file1_1, file2_1, file3_1) { + use(file1_1.x.toExponential()); + use(file2_1.y.toExponential()); + use(file3_1.z.toExponential()); +}); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution7.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution7.symbols new file mode 100644 index 00000000000..4b7b9c15739 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution7.symbols @@ -0,0 +1,44 @@ +=== tests/cases/compiler/root/folder1/file1.ts === +import {x} from "folder2/file1" +>x : Symbol(x, Decl(file1.ts, 0, 8)) + +import {y} from "folder3/file2" +>y : Symbol(y, Decl(file1.ts, 1, 8)) + +import {z} from "components/file3" +>z : Symbol(z, Decl(file1.ts, 2, 8)) + +declare function use(a: any): void; +>use : Symbol(use, Decl(file1.ts, 2, 34)) +>a : Symbol(a, Decl(file1.ts, 4, 21)) + +use(x.toExponential()); +>use : Symbol(use, Decl(file1.ts, 2, 34)) +>x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(file1.ts, 0, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +use(y.toExponential()); +>use : Symbol(use, Decl(file1.ts, 2, 34)) +>y.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>y : Symbol(y, Decl(file1.ts, 1, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +use(z.toExponential()); +>use : Symbol(use, Decl(file1.ts, 2, 34)) +>z.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>z : Symbol(z, Decl(file1.ts, 2, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +=== tests/cases/compiler/root/folder2/file1.ts === +export var x = 1; +>x : Symbol(x, Decl(file1.ts, 0, 10)) + +=== tests/cases/compiler/root/generated/folder3/file2.ts === +export var y = 1; +>y : Symbol(y, Decl(file2.ts, 0, 10)) + +=== tests/cases/compiler/root/shared/components/file3.ts === +export var z = 1; +>z : Symbol(z, Decl(file3.ts, 0, 10)) + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution7.types b/tests/baselines/reference/pathMappingBasedModuleResolution7.types new file mode 100644 index 00000000000..1bc1622b19f --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution7.types @@ -0,0 +1,53 @@ +=== tests/cases/compiler/root/folder1/file1.ts === +import {x} from "folder2/file1" +>x : number + +import {y} from "folder3/file2" +>y : number + +import {z} from "components/file3" +>z : number + +declare function use(a: any): void; +>use : (a: any) => void +>a : any + +use(x.toExponential()); +>use(x.toExponential()) : void +>use : (a: any) => void +>x.toExponential() : string +>x.toExponential : (fractionDigits?: number) => string +>x : number +>toExponential : (fractionDigits?: number) => string + +use(y.toExponential()); +>use(y.toExponential()) : void +>use : (a: any) => void +>y.toExponential() : string +>y.toExponential : (fractionDigits?: number) => string +>y : number +>toExponential : (fractionDigits?: number) => string + +use(z.toExponential()); +>use(z.toExponential()) : void +>use : (a: any) => void +>z.toExponential() : string +>z.toExponential : (fractionDigits?: number) => string +>z : number +>toExponential : (fractionDigits?: number) => string + +=== tests/cases/compiler/root/folder2/file1.ts === +export var x = 1; +>x : number +>1 : number + +=== tests/cases/compiler/root/generated/folder3/file2.ts === +export var y = 1; +>y : number +>1 : number + +=== tests/cases/compiler/root/shared/components/file3.ts === +export var z = 1; +>z : number +>1 : number + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution7_1.js b/tests/baselines/reference/pathMappingBasedModuleResolution7_1.js new file mode 100644 index 00000000000..6a384e27c43 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution7_1.js @@ -0,0 +1,40 @@ +//// [tests/cases/compiler/pathMappingBasedModuleResolution7_1.ts] //// + +//// [file1.ts] +import {x} from "folder2/file1" +import {y} from "folder3/file2" +import {z} from "components/file3" + +declare function use(a: any): void; + +use(x.toExponential()); +use(y.toExponential()); +use(z.toExponential()); + +//// [file1.ts] +export var x = 1; + +//// [file2.ts] +export var y = 1; + +//// [file3.ts] +export var z = 1; + +//// [file1.js] +define(["require", "exports"], function (require, exports) { + exports.x = 1; +}); +//// [file2.js] +define(["require", "exports"], function (require, exports) { + exports.y = 1; +}); +//// [file3.js] +define(["require", "exports"], function (require, exports) { + exports.z = 1; +}); +//// [file1.js] +define(["require", "exports", "folder2/file1", "folder3/file2", "components/file3"], function (require, exports, file1_1, file2_1, file3_1) { + use(file1_1.x.toExponential()); + use(file2_1.y.toExponential()); + use(file3_1.z.toExponential()); +}); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution7_1.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution7_1.symbols new file mode 100644 index 00000000000..097f0747b47 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution7_1.symbols @@ -0,0 +1,44 @@ +=== c:/root/folder1/file1.ts === +import {x} from "folder2/file1" +>x : Symbol(x, Decl(file1.ts, 0, 8)) + +import {y} from "folder3/file2" +>y : Symbol(y, Decl(file1.ts, 1, 8)) + +import {z} from "components/file3" +>z : Symbol(z, Decl(file1.ts, 2, 8)) + +declare function use(a: any): void; +>use : Symbol(use, Decl(file1.ts, 2, 34)) +>a : Symbol(a, Decl(file1.ts, 4, 21)) + +use(x.toExponential()); +>use : Symbol(use, Decl(file1.ts, 2, 34)) +>x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(file1.ts, 0, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +use(y.toExponential()); +>use : Symbol(use, Decl(file1.ts, 2, 34)) +>y.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>y : Symbol(y, Decl(file1.ts, 1, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +use(z.toExponential()); +>use : Symbol(use, Decl(file1.ts, 2, 34)) +>z.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>z : Symbol(z, Decl(file1.ts, 2, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +=== c:/root/folder2/file1.ts === +export var x = 1; +>x : Symbol(x, Decl(file1.ts, 0, 10)) + +=== c:/root/generated/folder3/file2.ts === +export var y = 1; +>y : Symbol(y, Decl(file2.ts, 0, 10)) + +=== c:/root/shared/components/file3.ts === +export var z = 1; +>z : Symbol(z, Decl(file3.ts, 0, 10)) + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution7_1.types b/tests/baselines/reference/pathMappingBasedModuleResolution7_1.types new file mode 100644 index 00000000000..9cc451eaa3b --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution7_1.types @@ -0,0 +1,53 @@ +=== c:/root/folder1/file1.ts === +import {x} from "folder2/file1" +>x : number + +import {y} from "folder3/file2" +>y : number + +import {z} from "components/file3" +>z : number + +declare function use(a: any): void; +>use : (a: any) => void +>a : any + +use(x.toExponential()); +>use(x.toExponential()) : void +>use : (a: any) => void +>x.toExponential() : string +>x.toExponential : (fractionDigits?: number) => string +>x : number +>toExponential : (fractionDigits?: number) => string + +use(y.toExponential()); +>use(y.toExponential()) : void +>use : (a: any) => void +>y.toExponential() : string +>y.toExponential : (fractionDigits?: number) => string +>y : number +>toExponential : (fractionDigits?: number) => string + +use(z.toExponential()); +>use(z.toExponential()) : void +>use : (a: any) => void +>z.toExponential() : string +>z.toExponential : (fractionDigits?: number) => string +>z : number +>toExponential : (fractionDigits?: number) => string + +=== c:/root/folder2/file1.ts === +export var x = 1; +>x : number +>1 : number + +=== c:/root/generated/folder3/file2.ts === +export var y = 1; +>y : number +>1 : number + +=== c:/root/shared/components/file3.ts === +export var z = 1; +>z : number +>1 : number + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution7_2.js b/tests/baselines/reference/pathMappingBasedModuleResolution7_2.js new file mode 100644 index 00000000000..123fc1f9658 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution7_2.js @@ -0,0 +1,50 @@ +//// [tests/cases/compiler/pathMappingBasedModuleResolution7_2.ts] //// + +//// [file1.ts] +import {x} from "folder2/file1" +import {y} from "folder3/file2" +import {z} from "components/file3" +import {z1} from "file4" + +declare function use(a: any): void; + +use(x.toExponential()); +use(y.toExponential()); +use(z.toExponential()); +use(z1.toExponential()); + +//// [file1.ts] +export var x = 1; + +//// [file2.ts] +export var y = 1; + +//// [file3.ts] +export var z = 1; + +//// [file4.ts] +export var z1 = 1; + +//// [file1.js] +define(["require", "exports"], function (require, exports) { + exports.x = 1; +}); +//// [file2.js] +define(["require", "exports"], function (require, exports) { + exports.y = 1; +}); +//// [file3.js] +define(["require", "exports"], function (require, exports) { + exports.z = 1; +}); +//// [file4.js] +define(["require", "exports"], function (require, exports) { + exports.z1 = 1; +}); +//// [file1.js] +define(["require", "exports", "folder2/file1", "folder3/file2", "components/file3", "file4"], function (require, exports, file1_1, file2_1, file3_1, file4_1) { + use(file1_1.x.toExponential()); + use(file2_1.y.toExponential()); + use(file3_1.z.toExponential()); + use(file4_1.z1.toExponential()); +}); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution7_2.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution7_2.symbols new file mode 100644 index 00000000000..a974a238200 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution7_2.symbols @@ -0,0 +1,57 @@ +=== c:/root/folder1/file1.ts === +import {x} from "folder2/file1" +>x : Symbol(x, Decl(file1.ts, 0, 8)) + +import {y} from "folder3/file2" +>y : Symbol(y, Decl(file1.ts, 1, 8)) + +import {z} from "components/file3" +>z : Symbol(z, Decl(file1.ts, 2, 8)) + +import {z1} from "file4" +>z1 : Symbol(z1, Decl(file1.ts, 3, 8)) + +declare function use(a: any): void; +>use : Symbol(use, Decl(file1.ts, 3, 24)) +>a : Symbol(a, Decl(file1.ts, 5, 21)) + +use(x.toExponential()); +>use : Symbol(use, Decl(file1.ts, 3, 24)) +>x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(file1.ts, 0, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +use(y.toExponential()); +>use : Symbol(use, Decl(file1.ts, 3, 24)) +>y.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>y : Symbol(y, Decl(file1.ts, 1, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +use(z.toExponential()); +>use : Symbol(use, Decl(file1.ts, 3, 24)) +>z.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>z : Symbol(z, Decl(file1.ts, 2, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +use(z1.toExponential()); +>use : Symbol(use, Decl(file1.ts, 3, 24)) +>z1.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>z1 : Symbol(z1, Decl(file1.ts, 3, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +=== c:/root/folder2/file1.ts === +export var x = 1; +>x : Symbol(x, Decl(file1.ts, 0, 10)) + +=== c:/root/generated/folder3/file2.ts === +export var y = 1; +>y : Symbol(y, Decl(file2.ts, 0, 10)) + +=== c:/root/shared/components/file3.ts === +export var z = 1; +>z : Symbol(z, Decl(file3.ts, 0, 10)) + +=== c:/sharedrepo/file4.ts === +export var z1 = 1; +>z1 : Symbol(z1, Decl(file4.ts, 0, 10)) + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution7_2.types b/tests/baselines/reference/pathMappingBasedModuleResolution7_2.types new file mode 100644 index 00000000000..9a88412b623 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution7_2.types @@ -0,0 +1,69 @@ +=== c:/root/folder1/file1.ts === +import {x} from "folder2/file1" +>x : number + +import {y} from "folder3/file2" +>y : number + +import {z} from "components/file3" +>z : number + +import {z1} from "file4" +>z1 : number + +declare function use(a: any): void; +>use : (a: any) => void +>a : any + +use(x.toExponential()); +>use(x.toExponential()) : void +>use : (a: any) => void +>x.toExponential() : string +>x.toExponential : (fractionDigits?: number) => string +>x : number +>toExponential : (fractionDigits?: number) => string + +use(y.toExponential()); +>use(y.toExponential()) : void +>use : (a: any) => void +>y.toExponential() : string +>y.toExponential : (fractionDigits?: number) => string +>y : number +>toExponential : (fractionDigits?: number) => string + +use(z.toExponential()); +>use(z.toExponential()) : void +>use : (a: any) => void +>z.toExponential() : string +>z.toExponential : (fractionDigits?: number) => string +>z : number +>toExponential : (fractionDigits?: number) => string + +use(z1.toExponential()); +>use(z1.toExponential()) : void +>use : (a: any) => void +>z1.toExponential() : string +>z1.toExponential : (fractionDigits?: number) => string +>z1 : number +>toExponential : (fractionDigits?: number) => string + +=== c:/root/folder2/file1.ts === +export var x = 1; +>x : number +>1 : number + +=== c:/root/generated/folder3/file2.ts === +export var y = 1; +>y : number +>1 : number + +=== c:/root/shared/components/file3.ts === +export var z = 1; +>z : number +>1 : number + +=== c:/sharedrepo/file4.ts === +export var z1 = 1; +>z1 : number +>1 : number + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution8.js b/tests/baselines/reference/pathMappingBasedModuleResolution8.js new file mode 100644 index 00000000000..99c3a4932c7 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution8.js @@ -0,0 +1,40 @@ +//// [tests/cases/compiler/pathMappingBasedModuleResolution8.ts] //// + +//// [file1.ts] +import {x} from "folder2/file1" +import {y} from "folder3/file2" +import {z} from "components/file3" + +declare function use(a: any): void; + +use(x.toExponential()); +use(y.toExponential()); +use(z.toExponential()); + +//// [file1.ts] +export var x = 1; + +//// [file2.ts] +export var y = 1; + +//// [file3.ts] +export var z = 1; + +//// [file1.js] +define(["require", "exports"], function (require, exports) { + exports.x = 1; +}); +//// [file2.js] +define(["require", "exports"], function (require, exports) { + exports.y = 1; +}); +//// [file3.js] +define(["require", "exports"], function (require, exports) { + exports.z = 1; +}); +//// [file1.js] +define(["require", "exports", "folder2/file1", "folder3/file2", "components/file3"], function (require, exports, file1_1, file2_1, file3_1) { + use(file1_1.x.toExponential()); + use(file2_1.y.toExponential()); + use(file3_1.z.toExponential()); +}); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution8.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution8.symbols new file mode 100644 index 00000000000..214b1d30ba8 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution8.symbols @@ -0,0 +1,44 @@ +=== tests/cases/compiler/root/folder1/file1.ts === +import {x} from "folder2/file1" +>x : Symbol(x, Decl(file1.ts, 0, 8)) + +import {y} from "folder3/file2" +>y : Symbol(y, Decl(file1.ts, 1, 8)) + +import {z} from "components/file3" +>z : Symbol(z, Decl(file1.ts, 2, 8)) + +declare function use(a: any): void; +>use : Symbol(use, Decl(file1.ts, 2, 34)) +>a : Symbol(a, Decl(file1.ts, 4, 21)) + +use(x.toExponential()); +>use : Symbol(use, Decl(file1.ts, 2, 34)) +>x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(file1.ts, 0, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +use(y.toExponential()); +>use : Symbol(use, Decl(file1.ts, 2, 34)) +>y.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>y : Symbol(y, Decl(file1.ts, 1, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +use(z.toExponential()); +>use : Symbol(use, Decl(file1.ts, 2, 34)) +>z.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>z : Symbol(z, Decl(file1.ts, 2, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +=== tests/cases/compiler/root/src/folder2/file1.ts === +export var x = 1; +>x : Symbol(x, Decl(file1.ts, 0, 10)) + +=== tests/cases/compiler/root/src/generated/folder3/file2.ts === +export var y = 1; +>y : Symbol(y, Decl(file2.ts, 0, 10)) + +=== tests/cases/compiler/root/src/shared/components/file3.ts === +export var z = 1; +>z : Symbol(z, Decl(file3.ts, 0, 10)) + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution8.types b/tests/baselines/reference/pathMappingBasedModuleResolution8.types new file mode 100644 index 00000000000..5938d95ee03 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution8.types @@ -0,0 +1,53 @@ +=== tests/cases/compiler/root/folder1/file1.ts === +import {x} from "folder2/file1" +>x : number + +import {y} from "folder3/file2" +>y : number + +import {z} from "components/file3" +>z : number + +declare function use(a: any): void; +>use : (a: any) => void +>a : any + +use(x.toExponential()); +>use(x.toExponential()) : void +>use : (a: any) => void +>x.toExponential() : string +>x.toExponential : (fractionDigits?: number) => string +>x : number +>toExponential : (fractionDigits?: number) => string + +use(y.toExponential()); +>use(y.toExponential()) : void +>use : (a: any) => void +>y.toExponential() : string +>y.toExponential : (fractionDigits?: number) => string +>y : number +>toExponential : (fractionDigits?: number) => string + +use(z.toExponential()); +>use(z.toExponential()) : void +>use : (a: any) => void +>z.toExponential() : string +>z.toExponential : (fractionDigits?: number) => string +>z : number +>toExponential : (fractionDigits?: number) => string + +=== tests/cases/compiler/root/src/folder2/file1.ts === +export var x = 1; +>x : number +>1 : number + +=== tests/cases/compiler/root/src/generated/folder3/file2.ts === +export var y = 1; +>y : number +>1 : number + +=== tests/cases/compiler/root/src/shared/components/file3.ts === +export var z = 1; +>z : number +>1 : number + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution8_1.js b/tests/baselines/reference/pathMappingBasedModuleResolution8_1.js new file mode 100644 index 00000000000..ca3a1f8c388 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution8_1.js @@ -0,0 +1,50 @@ +//// [tests/cases/compiler/pathMappingBasedModuleResolution8_1.ts] //// + +//// [file1.ts] +import {x} from "folder2/file1" +import {y} from "folder3/file2" +import {z} from "components/file3" +import {z1} from "file4" + +declare function use(a: any): void; + +use(x.toExponential()); +use(y.toExponential()); +use(z.toExponential()); +use(z1.toExponential()); + +//// [file1.ts] +export var x = 1; + +//// [file2.ts] +export var y = 1; + +//// [file3.ts] +export var z = 1; + +//// [file4.ts] +export var z1 = 1; + +//// [file1.js] +define(["require", "exports"], function (require, exports) { + exports.x = 1; +}); +//// [file2.js] +define(["require", "exports"], function (require, exports) { + exports.y = 1; +}); +//// [file3.js] +define(["require", "exports"], function (require, exports) { + exports.z = 1; +}); +//// [file4.js] +define(["require", "exports"], function (require, exports) { + exports.z1 = 1; +}); +//// [file1.js] +define(["require", "exports", "folder2/file1", "folder3/file2", "components/file3", "file4"], function (require, exports, file1_1, file2_1, file3_1, file4_1) { + use(file1_1.x.toExponential()); + use(file2_1.y.toExponential()); + use(file3_1.z.toExponential()); + use(file4_1.z1.toExponential()); +}); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution8_1.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution8_1.symbols new file mode 100644 index 00000000000..553112dde95 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution8_1.symbols @@ -0,0 +1,57 @@ +=== c:/root/folder1/file1.ts === +import {x} from "folder2/file1" +>x : Symbol(x, Decl(file1.ts, 0, 8)) + +import {y} from "folder3/file2" +>y : Symbol(y, Decl(file1.ts, 1, 8)) + +import {z} from "components/file3" +>z : Symbol(z, Decl(file1.ts, 2, 8)) + +import {z1} from "file4" +>z1 : Symbol(z1, Decl(file1.ts, 3, 8)) + +declare function use(a: any): void; +>use : Symbol(use, Decl(file1.ts, 3, 24)) +>a : Symbol(a, Decl(file1.ts, 5, 21)) + +use(x.toExponential()); +>use : Symbol(use, Decl(file1.ts, 3, 24)) +>x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(file1.ts, 0, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +use(y.toExponential()); +>use : Symbol(use, Decl(file1.ts, 3, 24)) +>y.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>y : Symbol(y, Decl(file1.ts, 1, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +use(z.toExponential()); +>use : Symbol(use, Decl(file1.ts, 3, 24)) +>z.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>z : Symbol(z, Decl(file1.ts, 2, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +use(z1.toExponential()); +>use : Symbol(use, Decl(file1.ts, 3, 24)) +>z1.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>z1 : Symbol(z1, Decl(file1.ts, 3, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +=== c:/root/src/folder2/file1.ts === +export var x = 1; +>x : Symbol(x, Decl(file1.ts, 0, 10)) + +=== c:/root/src/generated/folder3/file2.ts === +export var y = 1; +>y : Symbol(y, Decl(file2.ts, 0, 10)) + +=== c:/root/src/shared/components/file3.ts === +export var z = 1; +>z : Symbol(z, Decl(file3.ts, 0, 10)) + +=== c:/sharedrepo/file4.ts === +export var z1 = 1; +>z1 : Symbol(z1, Decl(file4.ts, 0, 10)) + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution8_1.types b/tests/baselines/reference/pathMappingBasedModuleResolution8_1.types new file mode 100644 index 00000000000..61da62d4ee6 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution8_1.types @@ -0,0 +1,69 @@ +=== c:/root/folder1/file1.ts === +import {x} from "folder2/file1" +>x : number + +import {y} from "folder3/file2" +>y : number + +import {z} from "components/file3" +>z : number + +import {z1} from "file4" +>z1 : number + +declare function use(a: any): void; +>use : (a: any) => void +>a : any + +use(x.toExponential()); +>use(x.toExponential()) : void +>use : (a: any) => void +>x.toExponential() : string +>x.toExponential : (fractionDigits?: number) => string +>x : number +>toExponential : (fractionDigits?: number) => string + +use(y.toExponential()); +>use(y.toExponential()) : void +>use : (a: any) => void +>y.toExponential() : string +>y.toExponential : (fractionDigits?: number) => string +>y : number +>toExponential : (fractionDigits?: number) => string + +use(z.toExponential()); +>use(z.toExponential()) : void +>use : (a: any) => void +>z.toExponential() : string +>z.toExponential : (fractionDigits?: number) => string +>z : number +>toExponential : (fractionDigits?: number) => string + +use(z1.toExponential()); +>use(z1.toExponential()) : void +>use : (a: any) => void +>z1.toExponential() : string +>z1.toExponential : (fractionDigits?: number) => string +>z1 : number +>toExponential : (fractionDigits?: number) => string + +=== c:/root/src/folder2/file1.ts === +export var x = 1; +>x : number +>1 : number + +=== c:/root/src/generated/folder3/file2.ts === +export var y = 1; +>y : number +>1 : number + +=== c:/root/src/shared/components/file3.ts === +export var z = 1; +>z : number +>1 : number + +=== c:/sharedrepo/file4.ts === +export var z1 = 1; +>z1 : number +>1 : number + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution9.js b/tests/baselines/reference/pathMappingBasedModuleResolution9.js new file mode 100644 index 00000000000..8611ed02a90 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution9.js @@ -0,0 +1,47 @@ +//// [tests/cases/compiler/pathMappingBasedModuleResolution9.ts] //// + +//// [file1.ts] +import {x} from "folder2/file1" +import {y} from "folder3/file2" +import {z} from "components/file3" + +declare function use(a: any): void; + +use(x.toExponential()); +use(y.toExponential()); +use(z.toExponential()); + +//// [file1.ts] +export var x = 1; + +//// [file2.ts] +export var y = 1; + +//// [file3.ts] +export {z} from "./file4" + +//// [file4.ts] +export var z = 1; + +//// [file1.js] +define(["require", "exports"], function (require, exports) { + exports.x = 1; +}); +//// [file2.js] +define(["require", "exports"], function (require, exports) { + exports.y = 1; +}); +//// [file4.js] +define(["require", "exports"], function (require, exports) { + exports.z = 1; +}); +//// [file3.js] +define(["require", "exports", "./file4"], function (require, exports, file4_1) { + exports.z = file4_1.z; +}); +//// [file1.js] +define(["require", "exports", "folder2/file1", "folder3/file2", "components/file3"], function (require, exports, file1_1, file2_1, file3_1) { + use(file1_1.x.toExponential()); + use(file2_1.y.toExponential()); + use(file3_1.z.toExponential()); +}); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution9.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution9.symbols new file mode 100644 index 00000000000..764f878b293 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution9.symbols @@ -0,0 +1,48 @@ +=== tests/cases/compiler/root/folder1/file1.ts === +import {x} from "folder2/file1" +>x : Symbol(x, Decl(file1.ts, 0, 8)) + +import {y} from "folder3/file2" +>y : Symbol(y, Decl(file1.ts, 1, 8)) + +import {z} from "components/file3" +>z : Symbol(z, Decl(file1.ts, 2, 8)) + +declare function use(a: any): void; +>use : Symbol(use, Decl(file1.ts, 2, 34)) +>a : Symbol(a, Decl(file1.ts, 4, 21)) + +use(x.toExponential()); +>use : Symbol(use, Decl(file1.ts, 2, 34)) +>x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(file1.ts, 0, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +use(y.toExponential()); +>use : Symbol(use, Decl(file1.ts, 2, 34)) +>y.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>y : Symbol(y, Decl(file1.ts, 1, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +use(z.toExponential()); +>use : Symbol(use, Decl(file1.ts, 2, 34)) +>z.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>z : Symbol(z, Decl(file1.ts, 2, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +=== tests/cases/compiler/root/src/folder2/file1.ts === +export var x = 1; +>x : Symbol(x, Decl(file1.ts, 0, 10)) + +=== tests/cases/compiler/root/src/generated/folder3/file2.ts === +export var y = 1; +>y : Symbol(y, Decl(file2.ts, 0, 10)) + +=== tests/cases/compiler/root/src/shared/components/file3.ts === +export {z} from "./file4" +>z : Symbol(z, Decl(file3.ts, 0, 8)) + +=== tests/cases/compiler/root/src/shared/components/file4.ts === +export var z = 1; +>z : Symbol(z, Decl(file4.ts, 0, 10)) + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution9.types b/tests/baselines/reference/pathMappingBasedModuleResolution9.types new file mode 100644 index 00000000000..789e8d050b1 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution9.types @@ -0,0 +1,57 @@ +=== tests/cases/compiler/root/folder1/file1.ts === +import {x} from "folder2/file1" +>x : number + +import {y} from "folder3/file2" +>y : number + +import {z} from "components/file3" +>z : number + +declare function use(a: any): void; +>use : (a: any) => void +>a : any + +use(x.toExponential()); +>use(x.toExponential()) : void +>use : (a: any) => void +>x.toExponential() : string +>x.toExponential : (fractionDigits?: number) => string +>x : number +>toExponential : (fractionDigits?: number) => string + +use(y.toExponential()); +>use(y.toExponential()) : void +>use : (a: any) => void +>y.toExponential() : string +>y.toExponential : (fractionDigits?: number) => string +>y : number +>toExponential : (fractionDigits?: number) => string + +use(z.toExponential()); +>use(z.toExponential()) : void +>use : (a: any) => void +>z.toExponential() : string +>z.toExponential : (fractionDigits?: number) => string +>z : number +>toExponential : (fractionDigits?: number) => string + +=== tests/cases/compiler/root/src/folder2/file1.ts === +export var x = 1; +>x : number +>1 : number + +=== tests/cases/compiler/root/src/generated/folder3/file2.ts === +export var y = 1; +>y : number +>1 : number + +=== tests/cases/compiler/root/src/shared/components/file3.ts === +export {z} from "./file4" +>z : number + +=== tests/cases/compiler/root/src/shared/components/file4.ts === +export var z = 1; +>z : number +>1 : number + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution9_1.js b/tests/baselines/reference/pathMappingBasedModuleResolution9_1.js new file mode 100644 index 00000000000..a7b6dbc0ec2 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution9_1.js @@ -0,0 +1,57 @@ +//// [tests/cases/compiler/pathMappingBasedModuleResolution9_1.ts] //// + +//// [file1.ts] +import {x} from "folder2/file1" +import {y} from "folder3/file2" +import {z} from "components/file3" +import {z1} from "my/file4" + +declare function use(a: any): void; + +use(x.toExponential()); +use(y.toExponential()); +use(z.toExponential()); +use(z1.toExponential()); + +//// [file1.ts] +export var x = 1; + +//// [file2.ts] +export var y = 1; + +//// [file3.ts] +export {z} from "./file4" + +//// [file4.ts] +export var z = 1; + +//// [file4.ts] +export var z1 = 1; + +//// [file1.js] +define(["require", "exports"], function (require, exports) { + exports.x = 1; +}); +//// [file2.js] +define(["require", "exports"], function (require, exports) { + exports.y = 1; +}); +//// [file4.js] +define(["require", "exports"], function (require, exports) { + exports.z = 1; +}); +//// [file3.js] +define(["require", "exports", "./file4"], function (require, exports, file4_1) { + exports.z = file4_1.z; +}); +//// [file4.js] +define(["require", "exports"], function (require, exports) { + exports.z1 = 1; +}); +//// [file1.js] +define(["require", "exports", "folder2/file1", "folder3/file2", "components/file3", "my/file4"], function (require, exports, file1_1, file2_1, file3_1, file4_1) { + use(file1_1.x.toExponential()); + use(file2_1.y.toExponential()); + use(file3_1.z.toExponential()); + use(file4_1.z1.toExponential()); +}); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution9_1.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution9_1.symbols new file mode 100644 index 00000000000..6f244cf026e --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution9_1.symbols @@ -0,0 +1,61 @@ +=== c:/root/folder1/file1.ts === +import {x} from "folder2/file1" +>x : Symbol(x, Decl(file1.ts, 0, 8)) + +import {y} from "folder3/file2" +>y : Symbol(y, Decl(file1.ts, 1, 8)) + +import {z} from "components/file3" +>z : Symbol(z, Decl(file1.ts, 2, 8)) + +import {z1} from "my/file4" +>z1 : Symbol(z1, Decl(file1.ts, 3, 8)) + +declare function use(a: any): void; +>use : Symbol(use, Decl(file1.ts, 3, 27)) +>a : Symbol(a, Decl(file1.ts, 5, 21)) + +use(x.toExponential()); +>use : Symbol(use, Decl(file1.ts, 3, 27)) +>x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(file1.ts, 0, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +use(y.toExponential()); +>use : Symbol(use, Decl(file1.ts, 3, 27)) +>y.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>y : Symbol(y, Decl(file1.ts, 1, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +use(z.toExponential()); +>use : Symbol(use, Decl(file1.ts, 3, 27)) +>z.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>z : Symbol(z, Decl(file1.ts, 2, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +use(z1.toExponential()); +>use : Symbol(use, Decl(file1.ts, 3, 27)) +>z1.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>z1 : Symbol(z1, Decl(file1.ts, 3, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +=== c:/root/src/folder2/file1.ts === +export var x = 1; +>x : Symbol(x, Decl(file1.ts, 0, 10)) + +=== c:/root/src/generated/folder3/file2.ts === +export var y = 1; +>y : Symbol(y, Decl(file2.ts, 0, 10)) + +=== c:/root/src/shared/components/file3.ts === +export {z} from "./file4" +>z : Symbol(z, Decl(file3.ts, 0, 8)) + +=== c:/root/src/shared/components/file4.ts === +export var z = 1; +>z : Symbol(z, Decl(file4.ts, 0, 10)) + +=== c:/sharedrepo/my/file4.ts === +export var z1 = 1; +>z1 : Symbol(z1, Decl(file4.ts, 0, 10)) + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution9_1.types b/tests/baselines/reference/pathMappingBasedModuleResolution9_1.types new file mode 100644 index 00000000000..24e70346d2a --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution9_1.types @@ -0,0 +1,73 @@ +=== c:/root/folder1/file1.ts === +import {x} from "folder2/file1" +>x : number + +import {y} from "folder3/file2" +>y : number + +import {z} from "components/file3" +>z : number + +import {z1} from "my/file4" +>z1 : number + +declare function use(a: any): void; +>use : (a: any) => void +>a : any + +use(x.toExponential()); +>use(x.toExponential()) : void +>use : (a: any) => void +>x.toExponential() : string +>x.toExponential : (fractionDigits?: number) => string +>x : number +>toExponential : (fractionDigits?: number) => string + +use(y.toExponential()); +>use(y.toExponential()) : void +>use : (a: any) => void +>y.toExponential() : string +>y.toExponential : (fractionDigits?: number) => string +>y : number +>toExponential : (fractionDigits?: number) => string + +use(z.toExponential()); +>use(z.toExponential()) : void +>use : (a: any) => void +>z.toExponential() : string +>z.toExponential : (fractionDigits?: number) => string +>z : number +>toExponential : (fractionDigits?: number) => string + +use(z1.toExponential()); +>use(z1.toExponential()) : void +>use : (a: any) => void +>z1.toExponential() : string +>z1.toExponential : (fractionDigits?: number) => string +>z1 : number +>toExponential : (fractionDigits?: number) => string + +=== c:/root/src/folder2/file1.ts === +export var x = 1; +>x : number +>1 : number + +=== c:/root/src/generated/folder3/file2.ts === +export var y = 1; +>y : number +>1 : number + +=== c:/root/src/shared/components/file3.ts === +export {z} from "./file4" +>z : number + +=== c:/root/src/shared/components/file4.ts === +export var z = 1; +>z : number +>1 : number + +=== c:/sharedrepo/my/file4.ts === +export var z1 = 1; +>z1 : number +>1 : number + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution9_2.js b/tests/baselines/reference/pathMappingBasedModuleResolution9_2.js new file mode 100644 index 00000000000..375c151f3e2 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution9_2.js @@ -0,0 +1,57 @@ +//// [tests/cases/compiler/pathMappingBasedModuleResolution9_2.ts] //// + +//// [file1.ts] +import {x} from "folder2/file1" +import {y} from "folder3/file2" +import {z} from "components/file3" +import {z1} from "my/file4" + +declare function use(a: any): void; + +use(x.toExponential()); +use(y.toExponential()); +use(z.toExponential()); +use(z1.toExponential()); + +//// [file1.ts] +export var x = 1; + +//// [file2.ts] +export var y = 1; + +//// [file3.ts] +export {z} from "./file4" + +//// [file4.ts] +export var z = 1; + +//// [file4.ts] +export var z1 = 1; + +//// [file1.js] +define(["require", "exports"], function (require, exports) { + exports.x = 1; +}); +//// [file2.js] +define(["require", "exports"], function (require, exports) { + exports.y = 1; +}); +//// [file4.js] +define(["require", "exports"], function (require, exports) { + exports.z = 1; +}); +//// [file3.js] +define(["require", "exports", "./file4"], function (require, exports, file4_1) { + exports.z = file4_1.z; +}); +//// [file4.js] +define(["require", "exports"], function (require, exports) { + exports.z1 = 1; +}); +//// [file1.js] +define(["require", "exports", "folder2/file1", "folder3/file2", "components/file3", "my/file4"], function (require, exports, file1_1, file2_1, file3_1, file4_1) { + use(file1_1.x.toExponential()); + use(file2_1.y.toExponential()); + use(file3_1.z.toExponential()); + use(file4_1.z1.toExponential()); +}); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution9_2.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution9_2.symbols new file mode 100644 index 00000000000..f9f5bc671ab --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution9_2.symbols @@ -0,0 +1,61 @@ +=== c:/root/folder1/file1.ts === +import {x} from "folder2/file1" +>x : Symbol(x, Decl(file1.ts, 0, 8)) + +import {y} from "folder3/file2" +>y : Symbol(y, Decl(file1.ts, 1, 8)) + +import {z} from "components/file3" +>z : Symbol(z, Decl(file1.ts, 2, 8)) + +import {z1} from "my/file4" +>z1 : Symbol(z1, Decl(file1.ts, 3, 8)) + +declare function use(a: any): void; +>use : Symbol(use, Decl(file1.ts, 3, 27)) +>a : Symbol(a, Decl(file1.ts, 5, 21)) + +use(x.toExponential()); +>use : Symbol(use, Decl(file1.ts, 3, 27)) +>x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(file1.ts, 0, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +use(y.toExponential()); +>use : Symbol(use, Decl(file1.ts, 3, 27)) +>y.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>y : Symbol(y, Decl(file1.ts, 1, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +use(z.toExponential()); +>use : Symbol(use, Decl(file1.ts, 3, 27)) +>z.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>z : Symbol(z, Decl(file1.ts, 2, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +use(z1.toExponential()); +>use : Symbol(use, Decl(file1.ts, 3, 27)) +>z1.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>z1 : Symbol(z1, Decl(file1.ts, 3, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +=== c:/base/folder2/file1.ts === +export var x = 1; +>x : Symbol(x, Decl(file1.ts, 0, 10)) + +=== c:/base/generated/folder3/file2.ts === +export var y = 1; +>y : Symbol(y, Decl(file2.ts, 0, 10)) + +=== c:/base/shared/components/file3.ts === +export {z} from "./file4" +>z : Symbol(z, Decl(file3.ts, 0, 8)) + +=== c:/base/shared/components/file4.ts === +export var z = 1; +>z : Symbol(z, Decl(file4.ts, 0, 10)) + +=== c:/sharedrepo/my/file4.ts === +export var z1 = 1; +>z1 : Symbol(z1, Decl(file4.ts, 0, 10)) + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution9_2.types b/tests/baselines/reference/pathMappingBasedModuleResolution9_2.types new file mode 100644 index 00000000000..e84babf0a79 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution9_2.types @@ -0,0 +1,73 @@ +=== c:/root/folder1/file1.ts === +import {x} from "folder2/file1" +>x : number + +import {y} from "folder3/file2" +>y : number + +import {z} from "components/file3" +>z : number + +import {z1} from "my/file4" +>z1 : number + +declare function use(a: any): void; +>use : (a: any) => void +>a : any + +use(x.toExponential()); +>use(x.toExponential()) : void +>use : (a: any) => void +>x.toExponential() : string +>x.toExponential : (fractionDigits?: number) => string +>x : number +>toExponential : (fractionDigits?: number) => string + +use(y.toExponential()); +>use(y.toExponential()) : void +>use : (a: any) => void +>y.toExponential() : string +>y.toExponential : (fractionDigits?: number) => string +>y : number +>toExponential : (fractionDigits?: number) => string + +use(z.toExponential()); +>use(z.toExponential()) : void +>use : (a: any) => void +>z.toExponential() : string +>z.toExponential : (fractionDigits?: number) => string +>z : number +>toExponential : (fractionDigits?: number) => string + +use(z1.toExponential()); +>use(z1.toExponential()) : void +>use : (a: any) => void +>z1.toExponential() : string +>z1.toExponential : (fractionDigits?: number) => string +>z1 : number +>toExponential : (fractionDigits?: number) => string + +=== c:/base/folder2/file1.ts === +export var x = 1; +>x : number +>1 : number + +=== c:/base/generated/folder3/file2.ts === +export var y = 1; +>y : number +>1 : number + +=== c:/base/shared/components/file3.ts === +export {z} from "./file4" +>z : number + +=== c:/base/shared/components/file4.ts === +export var z = 1; +>z : number +>1 : number + +=== c:/sharedrepo/my/file4.ts === +export var z1 = 1; +>z1 : number +>1 : number + diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution1.ts b/tests/cases/compiler/pathMappingBasedModuleResolution1.ts new file mode 100644 index 00000000000..d6c24d75f96 --- /dev/null +++ b/tests/cases/compiler/pathMappingBasedModuleResolution1.ts @@ -0,0 +1,18 @@ +// @moduleResolution: baseUrl +// @module: commonjs +// @baseUrl: root + +// user defined base url + +// @filename: root/folder1/file1.ts +import {x} from "folder2/file2" + +declare function use(a: any): void; + +use(x.toExponential()); + +// @filename: root/folder2/file2.ts +export {x} from "./file3" + +// @filename: root/folder2/file3.ts +export var x = 1; \ No newline at end of file diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution10.ts b/tests/cases/compiler/pathMappingBasedModuleResolution10.ts new file mode 100644 index 00000000000..2f32cf3e7cd --- /dev/null +++ b/tests/cases/compiler/pathMappingBasedModuleResolution10.ts @@ -0,0 +1,34 @@ +// @module: amd + +// paths\rootDirs is defined in tsconfig.json +// baseUrl is inferred from tsconfig.json + +// @filename: root/tsconfig.json +{ + "compilerOptions": { + "paths": { + "*": [ + "*", + "generated/*" + ] + }, + "rootDirs": [ + ".", + "./generated" + ] + } +} +// @filename: root/folder1/file1.ts +import {x} from "./file2" // should be resolved to 'generated/folder1/file2.ts' + +export var z = x.toExponential(); + +// @filename: root/generated/folder1/file2.ts +export {x} from "folder1/file3" // should be resolved to 'folder1/file3.ts' + +// @filename: root/folder1/file3.ts +export var x = 1; + +// @filename: root/generated/folder2/file3.ts +import {z as y} from "../folder1/file1" // should be resolved to 'folder1/file1.ts' +let z = y.toLowerCase(); diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution10_1.ts b/tests/cases/compiler/pathMappingBasedModuleResolution10_1.ts new file mode 100644 index 00000000000..6cc6f8e32d9 --- /dev/null +++ b/tests/cases/compiler/pathMappingBasedModuleResolution10_1.ts @@ -0,0 +1,35 @@ +// @module: amd + +// paths\rootDirs is defined in tsconfig.json +// baseUrl is inferred from tsconfig.json + +// @filename: c:/root/tsconfig.json +{ + "compilerOptions": { + "paths": { + "*": [ + "*", + "generated/*" + ] + }, + "rootDirs": [ + ".", + "./generated" + ] + } +} + +// @filename: c:/root/generated/folder1/file2.ts +export {x} from "folder1/file3" // should be resolved to 'folder1/file3.ts' + +// @filename: c:/root/folder1/file3.ts +export var x = 1; + +// @filename: c:/root/generated/folder2/file3.ts +import {z as y} from "../folder1/file1" // should be resolved to 'folder1/file1.ts' +let z = y.toLowerCase(); + +// @filename: c:/root/folder1/file1.ts +import {x} from "./file2" // should be resolved to 'generated/folder1/file2.ts' + +export var z = x.toExponential(); diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution10_2.ts b/tests/cases/compiler/pathMappingBasedModuleResolution10_2.ts new file mode 100644 index 00000000000..bd8942e1df1 --- /dev/null +++ b/tests/cases/compiler/pathMappingBasedModuleResolution10_2.ts @@ -0,0 +1,36 @@ +// @module: amd + +// paths\rootDirs is defined in tsconfig.json +// baseUrl is defined in tsconfig.json + +// @filename: c:/root/tsconfig.json +{ + "compilerOptions": { + "baseUrl": "./src", + "paths": { + "*": [ + "*", + "generated/*" + ] + }, + "rootDirs": [ + ".", + "./generated" + ] + } +} + +// @filename: c:/root/src/generated/folder1/file2.ts +export {x} from "folder1/file3" // should be resolved to 'folder1/file3.ts' + +// @filename: c:/root/src/folder1/file3.ts +export var x = 1; + +// @filename: c:/root/src/generated/folder2/file3.ts +import {z as y} from "../folder1/file1" // should be resolved to 'folder1/file1.ts' +let z = y.toLowerCase(); + +// @filename: c:/root/src/folder1/file1.ts +import {x} from "./file2" // should be resolved to 'generated/folder1/file2.ts' + +export var z = x.toExponential(); diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution1_1.ts b/tests/cases/compiler/pathMappingBasedModuleResolution1_1.ts new file mode 100644 index 00000000000..fa987961cd2 --- /dev/null +++ b/tests/cases/compiler/pathMappingBasedModuleResolution1_1.ts @@ -0,0 +1,18 @@ +// @moduleResolution: baseUrl +// @module: commonjs +// @baseUrl: c:/root + +// user defined base url + +// @filename: c:/root/folder1/file1.ts +import {x} from "folder2/file2" + +declare function use(a: any): void; + +use(x.toExponential()); + +// @filename: c:/root/folder2/file2.ts +export {x} from "./file3" + +// @filename: c:/root/folder2/file3.ts +export var x = 1; \ No newline at end of file diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution2.ts b/tests/cases/compiler/pathMappingBasedModuleResolution2.ts new file mode 100644 index 00000000000..84bfc36b8d1 --- /dev/null +++ b/tests/cases/compiler/pathMappingBasedModuleResolution2.ts @@ -0,0 +1,22 @@ +// @module: commonjs + +// location of tsconfig.json as baseurl + +// @filename: root/tsconfig.json +{ + "compilerOptions": { + "moduleResolution": "baseUrl" + } +} +// @filename: root/folder1/file1.ts +import {x} from "folder2/file2" + +declare function use(a: any): void; + +use(x.toExponential()); + +// @filename: root/folder2/file2.ts +export {x} from "./file3" + +// @filename: root/folder2/file3.ts +export var x = 1; \ No newline at end of file diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution2_1.ts b/tests/cases/compiler/pathMappingBasedModuleResolution2_1.ts new file mode 100644 index 00000000000..4b94e352879 --- /dev/null +++ b/tests/cases/compiler/pathMappingBasedModuleResolution2_1.ts @@ -0,0 +1,22 @@ +// @module: commonjs + +// location of tsconfig.json as baseurl + +// @filename: c:/root/tsconfig.json +{ + "compilerOptions": { + "moduleResolution": "baseUrl" + } +} +// @filename: c:/root/folder1/file1.ts +import {x} from "folder2/file2" + +declare function use(a: any): void; + +use(x.toExponential()); + +// @filename: c:/root/folder2/file2.ts +export {x} from "./file3" + +// @filename: c:/root/folder2/file3.ts +export var x = 1; \ No newline at end of file diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution3.ts b/tests/cases/compiler/pathMappingBasedModuleResolution3.ts new file mode 100644 index 00000000000..466e8c90d77 --- /dev/null +++ b/tests/cases/compiler/pathMappingBasedModuleResolution3.ts @@ -0,0 +1,23 @@ +// @module: commonjs + +// baseurl is defined in tsconfig.json + +// @filename: root/tsconfig.json +{ + "compilerOptions": { + "moduleResolution": "baseUrl", + "baseUrl": "./src" + } +} +// @filename: root/src/folder1/file1.ts +import {x} from "folder2/file2" + +declare function use(a: any): void; + +use(x.toExponential()); + +// @filename: root/src/folder2/file2.ts +export {x} from "./file3" + +// @filename: root/src/folder2/file3.ts +export var x = 1; \ No newline at end of file diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution3_1.ts b/tests/cases/compiler/pathMappingBasedModuleResolution3_1.ts new file mode 100644 index 00000000000..f3a8ccaf0a8 --- /dev/null +++ b/tests/cases/compiler/pathMappingBasedModuleResolution3_1.ts @@ -0,0 +1,23 @@ +// @module: commonjs + +// baseurl is defined in tsconfig.json + +// @filename: c:/root/tsconfig.json +{ + "compilerOptions": { + "moduleResolution": "baseUrl", + "baseUrl": "./src" + } +} +// @filename: c:/root/src/folder1/file1.ts +import {x} from "folder2/file2" + +declare function use(a: any): void; + +use(x.toExponential()); + +// @filename: c:/root/src/folder2/file2.ts +export {x} from "./file3" + +// @filename: c:/root/src/folder2/file3.ts +export var x = 1; \ No newline at end of file diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution4.ts b/tests/cases/compiler/pathMappingBasedModuleResolution4.ts new file mode 100644 index 00000000000..17f8258e763 --- /dev/null +++ b/tests/cases/compiler/pathMappingBasedModuleResolution4.ts @@ -0,0 +1,23 @@ +// @module: amd + +// baseurl is defined in tsconfig.json +// module resolution kind is inferred from settings (baseurl is specified) + +// @filename: root/tsconfig.json +{ + "compilerOptions": { + "baseUrl": "./src" + } +} +// @filename: root/src/folder1/file1.ts +import {x} from "folder2/file2" + +declare function use(a: any): void; + +use(x.toExponential()); + +// @filename: root/src/folder2/file2.ts +export {x} from "./file3" + +// @filename: root/src/folder2/file3.ts +export var x = 1; \ No newline at end of file diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution4_1.ts b/tests/cases/compiler/pathMappingBasedModuleResolution4_1.ts new file mode 100644 index 00000000000..df6f267da65 --- /dev/null +++ b/tests/cases/compiler/pathMappingBasedModuleResolution4_1.ts @@ -0,0 +1,23 @@ +// @module: amd + +// baseurl is defined in tsconfig.json +// module resolution kind is inferred from settings (baseurl is specified) + +// @filename: c:/root/tsconfig.json +{ + "compilerOptions": { + "baseUrl": "./src" + } +} +// @filename: c:/root/src/folder1/file1.ts +import {x} from "folder2/file2" + +declare function use(a: any): void; + +use(x.toExponential()); + +// @filename: c:/root/src/folder2/file2.ts +export {x} from "./file3" + +// @filename: c:/root/src/folder2/file3.ts +export var x = 1; \ No newline at end of file diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution5.ts b/tests/cases/compiler/pathMappingBasedModuleResolution5.ts new file mode 100644 index 00000000000..305f7aa9c3f --- /dev/null +++ b/tests/cases/compiler/pathMappingBasedModuleResolution5.ts @@ -0,0 +1,13 @@ +// @module: commonjs + +// baseurl is defined in tsconfig.json +// module resolution kind is ambiguous - error should be reported + +// @filename: root/tsconfig.json +{ + "compilerOptions": { + "baseUrl": "./src" + } +} +// @filename: root/src/folder1/file1.ts +export var x = 1; \ No newline at end of file diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution6.ts b/tests/cases/compiler/pathMappingBasedModuleResolution6.ts new file mode 100644 index 00000000000..f1e51afc805 --- /dev/null +++ b/tests/cases/compiler/pathMappingBasedModuleResolution6.ts @@ -0,0 +1,17 @@ +// @module: amd + +// baseurl is defined in tsconfig.json +// paths has errors + +// @filename: root/tsconfig.json +{ + "compilerOptions": { + "baseUrl": "./src", + "paths": { + "*1*": [ "*2*" ] + } + } +} + +// @filename: root/src/folder1/file1.ts +export var x = 1; \ No newline at end of file diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution7.ts b/tests/cases/compiler/pathMappingBasedModuleResolution7.ts new file mode 100644 index 00000000000..f59f0701a33 --- /dev/null +++ b/tests/cases/compiler/pathMappingBasedModuleResolution7.ts @@ -0,0 +1,38 @@ +// @module: amd + +// paths is defined in tsconfig.json +// module resolution kind is inferred from the presence of 'paths' + +// @filename: root/tsconfig.json +{ + "compilerOptions": { + "paths": { + "*": [ + "*", + "generated/*" + ], + "components/*": [ + "shared/components/*" + ] + } + } +} +// @filename: root/folder1/file1.ts +import {x} from "folder2/file1" +import {y} from "folder3/file2" +import {z} from "components/file3" + +declare function use(a: any): void; + +use(x.toExponential()); +use(y.toExponential()); +use(z.toExponential()); + +// @filename: root/folder2/file1.ts +export var x = 1; + +// @filename: root/generated/folder3/file2.ts +export var y = 1; + +// @filename: root/shared/components/file3.ts +export var z = 1; \ No newline at end of file diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution7_1.ts b/tests/cases/compiler/pathMappingBasedModuleResolution7_1.ts new file mode 100644 index 00000000000..c64eb687764 --- /dev/null +++ b/tests/cases/compiler/pathMappingBasedModuleResolution7_1.ts @@ -0,0 +1,38 @@ +// @module: amd + +// paths is defined in tsconfig.json +// module resolution kind is inferred from the presence of 'paths' + +// @filename: c:/root/tsconfig.json +{ + "compilerOptions": { + "paths": { + "*": [ + "*", + "generated/*" + ], + "components/*": [ + "shared/components/*" + ] + } + } +} +// @filename: c:/root/folder1/file1.ts +import {x} from "folder2/file1" +import {y} from "folder3/file2" +import {z} from "components/file3" + +declare function use(a: any): void; + +use(x.toExponential()); +use(y.toExponential()); +use(z.toExponential()); + +// @filename: c:/root/folder2/file1.ts +export var x = 1; + +// @filename: c:/root/generated/folder3/file2.ts +export var y = 1; + +// @filename: c:/root/shared/components/file3.ts +export var z = 1; \ No newline at end of file diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution7_2.ts b/tests/cases/compiler/pathMappingBasedModuleResolution7_2.ts new file mode 100644 index 00000000000..16284349643 --- /dev/null +++ b/tests/cases/compiler/pathMappingBasedModuleResolution7_2.ts @@ -0,0 +1,44 @@ +// @module: amd + +// paths is defined in tsconfig.json +// module resolution kind is inferred from the presence of 'paths' + +// @filename: c:/root/tsconfig.json +{ + "compilerOptions": { + "paths": { + "*": [ + "*", + "generated/*", + "c:/sharedrepo/*" + ], + "components/*": [ + "shared/components/*" + ] + } + } +} +// @filename: c:/root/folder1/file1.ts +import {x} from "folder2/file1" +import {y} from "folder3/file2" +import {z} from "components/file3" +import {z1} from "file4" + +declare function use(a: any): void; + +use(x.toExponential()); +use(y.toExponential()); +use(z.toExponential()); +use(z1.toExponential()); + +// @filename: c:/root/folder2/file1.ts +export var x = 1; + +// @filename: c:/root/generated/folder3/file2.ts +export var y = 1; + +// @filename: c:/root/shared/components/file3.ts +export var z = 1; + +// @filename: c:/sharedrepo/file4.ts +export var z1 = 1; \ No newline at end of file diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution8.ts b/tests/cases/compiler/pathMappingBasedModuleResolution8.ts new file mode 100644 index 00000000000..dc2be22c4ca --- /dev/null +++ b/tests/cases/compiler/pathMappingBasedModuleResolution8.ts @@ -0,0 +1,39 @@ +// @module: amd + +// paths is defined in tsconfig.json +// baseUrl is specified in tsconfig.json + +// @filename: root/tsconfig.json +{ + "compilerOptions": { + "baseUrl": "./src", + "paths": { + "*": [ + "*", + "generated/*" + ], + "components/*": [ + "shared/components/*" + ] + } + } +} +// @filename: root/folder1/file1.ts +import {x} from "folder2/file1" +import {y} from "folder3/file2" +import {z} from "components/file3" + +declare function use(a: any): void; + +use(x.toExponential()); +use(y.toExponential()); +use(z.toExponential()); + +// @filename: root/src/folder2/file1.ts +export var x = 1; + +// @filename: root/src/generated/folder3/file2.ts +export var y = 1; + +// @filename: root/src/shared/components/file3.ts +export var z = 1; \ No newline at end of file diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution8_1.ts b/tests/cases/compiler/pathMappingBasedModuleResolution8_1.ts new file mode 100644 index 00000000000..b858be9455d --- /dev/null +++ b/tests/cases/compiler/pathMappingBasedModuleResolution8_1.ts @@ -0,0 +1,45 @@ +// @module: amd + +// paths is defined in tsconfig.json +// baseUrl is specified in tsconfig.json + +// @filename: c:/root/tsconfig.json +{ + "compilerOptions": { + "baseUrl": "./src", + "paths": { + "*": [ + "*", + "generated/*", + "c:/sharedrepo/*" + ], + "components/*": [ + "shared/components/*" + ] + } + } +} +// @filename: c:/root/folder1/file1.ts +import {x} from "folder2/file1" +import {y} from "folder3/file2" +import {z} from "components/file3" +import {z1} from "file4" + +declare function use(a: any): void; + +use(x.toExponential()); +use(y.toExponential()); +use(z.toExponential()); +use(z1.toExponential()); + +// @filename: c:/root/src/folder2/file1.ts +export var x = 1; + +// @filename: c:/root/src/generated/folder3/file2.ts +export var y = 1; + +// @filename: c:/root/src/shared/components/file3.ts +export var z = 1; + +// @filename: c:/sharedrepo/file4.ts +export var z1 = 1; \ No newline at end of file diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution9.ts b/tests/cases/compiler/pathMappingBasedModuleResolution9.ts new file mode 100644 index 00000000000..1b104a27251 --- /dev/null +++ b/tests/cases/compiler/pathMappingBasedModuleResolution9.ts @@ -0,0 +1,42 @@ +// @module: amd + +// paths is defined in tsconfig.json +// baseUrl is specified in tsconfig.json + +// @filename: root/tsconfig.json +{ + "compilerOptions": { + "baseUrl": "./src", + "paths": { + "*": [ + "*", + "generated/*" + ], + "components/*": [ + "shared/components/*" + ] + } + } +} +// @filename: root/folder1/file1.ts +import {x} from "folder2/file1" +import {y} from "folder3/file2" +import {z} from "components/file3" + +declare function use(a: any): void; + +use(x.toExponential()); +use(y.toExponential()); +use(z.toExponential()); + +// @filename: root/src/folder2/file1.ts +export var x = 1; + +// @filename: root/src/generated/folder3/file2.ts +export var y = 1; + +// @filename: root/src/shared/components/file3.ts +export {z} from "./file4" + +// @filename: root/src/shared/components/file4.ts +export var z = 1; \ No newline at end of file diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution9_1.ts b/tests/cases/compiler/pathMappingBasedModuleResolution9_1.ts new file mode 100644 index 00000000000..68a0898229c --- /dev/null +++ b/tests/cases/compiler/pathMappingBasedModuleResolution9_1.ts @@ -0,0 +1,48 @@ +// @module: amd + +// paths is defined in tsconfig.json +// baseUrl is specified in tsconfig.json + +// @filename: c:/root/tsconfig.json +{ + "compilerOptions": { + "baseUrl": "./src", + "paths": { + "*": [ + "*", + "generated/*", + "c:/sharedrepo/*" + ], + "components/*": [ + "shared/components/*" + ] + } + } +} +// @filename: c:/root/folder1/file1.ts +import {x} from "folder2/file1" +import {y} from "folder3/file2" +import {z} from "components/file3" +import {z1} from "my/file4" + +declare function use(a: any): void; + +use(x.toExponential()); +use(y.toExponential()); +use(z.toExponential()); +use(z1.toExponential()); + +// @filename: c:/root/src/folder2/file1.ts +export var x = 1; + +// @filename: c:/root/src/generated/folder3/file2.ts +export var y = 1; + +// @filename: c:/root/src/shared/components/file3.ts +export {z} from "./file4" + +// @filename: c:/root/src/shared/components/file4.ts +export var z = 1; + +// @filename: c:/sharedrepo/my/file4.ts +export var z1 = 1; \ No newline at end of file diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution9_2.ts b/tests/cases/compiler/pathMappingBasedModuleResolution9_2.ts new file mode 100644 index 00000000000..83990d3c5ad --- /dev/null +++ b/tests/cases/compiler/pathMappingBasedModuleResolution9_2.ts @@ -0,0 +1,48 @@ +// @module: amd + +// paths is defined in tsconfig.json +// baseUrl is specified in tsconfig.json and it is absolute + +// @filename: c:/root/tsconfig.json +{ + "compilerOptions": { + "baseUrl": "c:/base", + "paths": { + "*": [ + "*", + "generated/*", + "c:/sharedrepo/*" + ], + "components/*": [ + "shared/components/*" + ] + } + } +} +// @filename: c:/root/folder1/file1.ts +import {x} from "folder2/file1" +import {y} from "folder3/file2" +import {z} from "components/file3" +import {z1} from "my/file4" + +declare function use(a: any): void; + +use(x.toExponential()); +use(y.toExponential()); +use(z.toExponential()); +use(z1.toExponential()); + +// @filename: c:/base/folder2/file1.ts +export var x = 1; + +// @filename: c:/base/generated/folder3/file2.ts +export var y = 1; + +// @filename: c:/base/shared/components/file3.ts +export {z} from "./file4" + +// @filename: c:/base/shared/components/file4.ts +export var z = 1; + +// @filename: c:/sharedrepo/my/file4.ts +export var z1 = 1; \ No newline at end of file diff --git a/tests/cases/unittests/moduleResolution.ts b/tests/cases/unittests/moduleResolution.ts index 9e316266bf6..277d71dca0e 100644 --- a/tests/cases/unittests/moduleResolution.ts +++ b/tests/cases/unittests/moduleResolution.ts @@ -381,4 +381,132 @@ import b = require("./moduleB.ts"); test(files, { module: ts.ModuleKind.CommonJS, forceConsistentCasingInFileNames: true }, "/a/B/c", /* useCaseSensitiveFileNames */ false, ["moduleD.ts"], []); }) }); + + describe("baseUrl module resolution", () => { + it("module resolution without path mappings/rootDirs", () => { + const file1: File = { name: "/root/folder1/file1.ts" }; + const file2: File = { name: "/root/folder2/file2.ts" }; + const file3: File = { name: "/root/folder2/file3.ts" }; + const host = createModuleResolutionHost(file1, file2, file3); + const options: CompilerOptions = { moduleResolution: ModuleResolutionKind.BaseUrl, baseUrl: "/root" }; + { + const result = baseUrlModuleNameResolver("folder2/file2", file1.name, options, host); + assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); + assert.equal(result.resolvedModule.resolvedFileName, file2.name); + assert.deepEqual(result.failedLookupLocations, []); + } + { + const result = baseUrlModuleNameResolver("./file3", file2.name, options, host); + assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); + assert.equal(result.resolvedModule.resolvedFileName, file3.name); + assert.deepEqual(result.failedLookupLocations, []); + } + { + const result = baseUrlModuleNameResolver(file1.name, file2.name, options, host); + assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); + assert.equal(result.resolvedModule.resolvedFileName, file1.name); + assert.deepEqual(result.failedLookupLocations, []); + } + // add failure tests + }); + + it("module resolution with path mappings", () => { + const file1: File = { name: "/root/folder1/file1.ts" }; + const file2: File = { name: "/root/folder1/file2.ts" } + const file3: File = { name: "/root/generated/folder1/file3.ts" } + const file4: File = { name: "/root/generated/folder2/file4.ts" } + const file5: File = { name: "/root/someanotherfolder/file5.ts" } + const host = createModuleResolutionHost(file1, file2, file3, file4, file5); + const options: CompilerOptions = { + moduleResolution: ModuleResolutionKind.BaseUrl, + baseUrl: "/root", + paths: { + "*": [ + "*", + "generated/*" + ], + "somefolder/*": [ + "someanotherfolder/*" + ] + } + }; + { + const result = baseUrlModuleNameResolver("folder1/file2", file1.name, options, host); + assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); + assert.equal(result.resolvedModule.resolvedFileName, file2.name); + assert.deepEqual(result.failedLookupLocations, []); + } + { + const result = baseUrlModuleNameResolver("./file2", file1.name, options, host); + assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); + assert.equal(result.resolvedModule.resolvedFileName, file2.name); + assert.deepEqual(result.failedLookupLocations, []); + } + { + const result = baseUrlModuleNameResolver("folder1/file3", file1.name, options, host); + assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); + assert.equal(result.resolvedModule.resolvedFileName, file3.name); + // non-empty because it tries to use '*' match first + assert.deepEqual(result.failedLookupLocations, [ + "/root/folder1/file3.ts", + "/root/folder1/file3.tsx", + "/root/folder1/file3.d.ts", + ]); + } + { + const result = baseUrlModuleNameResolver("folder2/file4", file1.name, options, host); + assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); + assert.equal(result.resolvedModule.resolvedFileName, file4.name); + assert.deepEqual(result.failedLookupLocations, [ + "/root/folder2/file4.ts", + "/root/folder2/file4.tsx", + "/root/folder2/file4.d.ts", + ]); + } + { + const result = baseUrlModuleNameResolver("somefolder/file5", file1.name, options, host); + assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); + assert.equal(result.resolvedModule.resolvedFileName, file5.name); + assert.deepEqual(result.failedLookupLocations, []); + } + // add failure tests + }); + + it ("module resolution with path mappings and root dirs", () => { + let file1: File = { name: "/root/folder1/file1.ts" }; + let file2: File = { name: "/root/generated/folder1/file2.ts" }; + let file3: File = { name: "/root/generated/folder2/file3.ts" }; + const host = createModuleResolutionHost(file1, file2, file3); + const options: CompilerOptions = { + moduleResolution: ModuleResolutionKind.BaseUrl, + baseUrl: "/root", + paths: { + "*": [ + "*", + "generated/*" + ] + }, + rootDirs: [ + ".", + "./generated/" + ] + }; + { + const result = baseUrlModuleNameResolver("./file2", file1.name, options, host); + assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); + assert.equal(result.resolvedModule.resolvedFileName, file2.name); + assert.deepEqual(result.failedLookupLocations, [ + "/root/folder1/file2.ts", + "/root/folder1/file2.tsx", + "/root/folder1/file2.d.ts", + ]); + } + { + const result = baseUrlModuleNameResolver("../folder1/file1", file3.name, options, host); + assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); + assert.equal(result.resolvedModule.resolvedFileName, file1.name); + assert.deepEqual(result.failedLookupLocations, []); + } + }); + }) } \ No newline at end of file From 6844285782edca96d9591678580aeb8a4423205e Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Thu, 19 Nov 2015 21:33:33 -0800 Subject: [PATCH 002/160] verbose module resolution --- src/compiler/commandLineParser.ts | 5 + src/compiler/core.ts | 13 +- src/compiler/diagnosticMessages.json | 114 +++++++++++++++- src/compiler/program.ts | 189 +++++++++++++++++++++++---- src/compiler/types.ts | 6 +- src/services/shims.ts | 2 + 6 files changed, 292 insertions(+), 37 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 4fd29de142d..f462c7c1e91 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -302,6 +302,11 @@ namespace ts { type: "object", isTSConfigOnly: true }, + { + name: "traceModuleResolution", + type: "boolean", + description: Diagnostics.Enable_tracing_of_the_module_resolution_process + }, { name: "allowJs", type: "boolean", diff --git a/src/compiler/core.ts b/src/compiler/core.ts index c93f3aebc2d..50b10ac5a90 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -410,6 +410,17 @@ namespace ts { }; } + /* internal */ + export function formatMessage(dummy: any, message: DiagnosticMessage): string { + let text = getLocaleSpecificMessage(message); + + if (arguments.length > 2) { + text = formatStringFromArgs(text, arguments, 2); + } + + return text; + } + export function createCompilerDiagnostic(message: DiagnosticMessage, ...args: any[]): Diagnostic; export function createCompilerDiagnostic(message: DiagnosticMessage): Diagnostic { let text = getLocaleSpecificMessage(message); @@ -860,4 +871,4 @@ namespace ts { } return copiedList; } -} +} diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 96e48766f71..3d696ff8172 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -2220,10 +2220,10 @@ "category": "Error", "code": 6046 }, - "Argument for '--target' option must be 'ES3', 'ES5', or 'ES2015'.": { - "category": "Error", - "code": 6047 - }, + "Argument for '--target' option must be 'ES3', 'ES5', or 'ES2015'.": { + "category": "Error", + "code": 6047 + }, "Locale must be of the form or -. For example '{0}' or '{1}'.": { "category": "Error", "code": 6048 @@ -2353,14 +2353,114 @@ "category": "Error", "code": 6082 }, - "Allow javascript files to be compiled.": { + "Base directory to resolve relative module names.": { "category": "Message", "code": 6083 }, - "Base directory to resolve relative module names.": { + "Enable tracing of the module resolution process.": { "category": "Message", "code": 6084 - }, + }, + "======== Resolving module '{0}' from '{1}'. ========": { + "category": "Message", + "code": 6085 + }, + "Explicitly specified module resolution kind: '{0}'.": { + "category": "Message", + "code": 6086 + }, + "Module resolution kind is not specified, using '{0}'.": { + "category": "Message", + "code": 6087 + }, + "======== Module name '{0}' was successfully resolved to '{1}'. ========": { + "category": "Message", + "code": 6088 + }, + "======== Module name '{0}' was not resolved. ========": { + "category": "Message", + "code": 6089 + }, + "Resolving rooted module name '{0}' - use it as a candidate location.": { + "category": "Message", + "code": 6090 + }, + "Resolving relative module name '{0}'.": { + "category": "Message", + "code": 6091 + }, + "Resolving non-relative module name '{0}'.": { + "category": "Message", + "code": 6092 + }, + "Converting relative module name '{0}' to absolute using '{1}' as a base directory => '{2}'.": { + "category": "Message", + "code": 6093 + }, + "'rootDirs' option is specified, searching for a longest matching prefix...": { + "category": "Message", + "code": 6094 + }, + "Found longest matching rootDir '{0}', 'converted relative path '{1}', to non-relative path '{2}'": { + "category": "Message", + "code": 6095 + }, + "'rootDirs' option is not specified, using '{0}' as candidate location.": { + "category": "Message", + "code": 6096 + }, + "'paths' option is specified, looking for a pattern to match module name '{0}'.": { + "category": "Message", + "code": 6097 + }, + "Module name '{0}', matched pattern '{1}'.": { + "category": "Message", + "code": 6098 + }, + "Trying substitution '{0}', candidate module location: '{1}'.": { + "category": "Message", + "code": 6099 + }, + "Resolving module name '{0}' relative to base url '{1}' - '{2}'.": { + "category": "Message", + "code": 6100 + }, + "Loading module '{0}' as file / folder, candidate module location '{1}'.": { + "category": "Message", + "code": 6101 + }, + "File '{0}' does not exist.": { + "category": "Message", + "code": 6102 + }, + "File '{0}' exist - use it as a module resolution result.": { + "category": "Message", + "code": 6103 + }, + "Loading module '{0}' from 'node_modules' folder.": { + "category": "Message", + "code": 6104 + }, + "Found 'package.json' at '{0}'.": { + "category": "Message", + "code": 6105 + }, + "'package.json' does not have 'typings' field.": { + "category": "Message", + "code": 6106 + }, + "'package.json' has 'typings' field '{0}' that references '{1}'.": { + "category": "Message", + "code": 6107 + }, + "Module name '{0}' contains '!' character.": { + "category": "Message", + "code": 6108 + }, + "Allow javascript files to be compiled.": { + "category": "Message", + "code": 6109 + }, "Variable '{0}' implicitly has an '{1}' type.": { "category": "Error", "code": 7005 diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 6d99b6e1dda..b9ebef7c27f 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -36,7 +36,21 @@ namespace ts { return normalizePath(referencedFileName); } + function trace(host: ModuleResolutionHost, message: DiagnosticMessage, ...args: any[]): void; + function trace(host: ModuleResolutionHost, message: DiagnosticMessage): void { + host.trace(formatMessage.apply(undefined, arguments)); + } + + function isTraceEnabled(compilerOptions: CompilerOptions, host: ModuleResolutionHost): boolean { + return compilerOptions.traceModuleResolution && host.trace !== undefined; + } + export function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations { + const traceEnabled = isTraceEnabled(compilerOptions, host); + if (traceEnabled) { + trace(host, Diagnostics.Resolving_module_0_from_1, moduleName, containingFile); + } + let moduleResolution = compilerOptions.moduleResolution; if (moduleResolution === undefined) { if (compilerOptions.module === ModuleKind.CommonJS) { @@ -48,13 +62,40 @@ namespace ts { else { moduleResolution = ModuleResolutionKind.Classic; } + + if (traceEnabled) { + trace(host, Diagnostics.Module_resolution_kind_is_not_specified_using_0, ModuleResolutionKind[moduleResolution]); + } + } + else { + if (traceEnabled) { + trace(host, Diagnostics.Explicitly_specified_module_resolution_kind_Colon_0, ModuleResolutionKind[moduleResolution]); + } } + let result: ResolvedModuleWithFailedLookupLocations; switch (moduleResolution) { - case ModuleResolutionKind.NodeJs: return nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host); - case ModuleResolutionKind.Classic: return classicNameResolver(moduleName, containingFile, compilerOptions, host); - case ModuleResolutionKind.BaseUrl: return baseUrlModuleNameResolver(moduleName, containingFile, compilerOptions, host); + case ModuleResolutionKind.NodeJs: + result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host); + break; + case ModuleResolutionKind.Classic: + result = classicNameResolver(moduleName, containingFile, compilerOptions, host); + break; + case ModuleResolutionKind.BaseUrl: + result = baseUrlModuleNameResolver(moduleName, containingFile, compilerOptions, host); + break; } + + if (traceEnabled) { + if (result.resolvedModule) { + trace(host, Diagnostics.Module_name_0_was_successfully_resolved_to_1, moduleName, result.resolvedModule.resolvedFileName); + } + else { + trace(host, Diagnostics.Module_name_0_was_not_resolved, moduleName); + } + } + + return result; } // Path mapping based module resolution strategy uses base url to resolve relative file names. This resolution strategy can be enabled @@ -135,28 +176,52 @@ namespace ts { Debug.assert(baseUrl !== undefined); const supportedExtensions = getSupportedExtensions(compilerOptions); + const traceEnabled = isTraceEnabled(compilerOptions, host); + if (isRootedDiskPath(moduleName)) { - return { resolvedModule: { resolvedFileName: moduleName }, failedLookupLocations: emptyArray }; + if (traceEnabled) { + trace(host, Diagnostics.Resolving_rooted_module_name_0_use_it_as_a_candidate_location, moduleName); + } + + const failedLookupLocations: string[] = []; + const resolvedFileName = loadModuleFromFile(supportedExtensions, moduleName, failedLookupLocations, host, traceEnabled); + return { + resolvedModule: resolvedFileName ? { resolvedFileName } : undefined, + failedLookupLocations + }; } if (nameStartsWithDotSlashOrDotDotSlash(moduleName)) { // relative name - return baseUrlResolveRelativeModuleName(moduleName, containingFile, baseUrl, compilerOptions, host); + if (traceEnabled) { + trace(host, Diagnostics.Resolving_relative_module_name_0, moduleName); + } + return baseUrlResolveRelativeModuleName(moduleName, containingFile, baseUrl, supportedExtensions, compilerOptions, host, traceEnabled); } else { // non-relative name - return baseUrlResolveNonRelativeModuleName(moduleName, baseUrl, supportedExtensions, compilerOptions, host); + if (traceEnabled) { + trace(host, Diagnostics.Resolving_non_relative_module_name_0, moduleName); + } + return baseUrlResolveNonRelativeModuleName(moduleName, baseUrl, supportedExtensions, compilerOptions, host, traceEnabled); } } - export function baseUrlResolveRelativeModuleName(moduleName: string, containingFile: string, baseUrl: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations { + function baseUrlResolveRelativeModuleName(moduleName: string, containingFile: string, baseUrl: string, supportedExtensions: string[], compilerOptions: CompilerOptions, host: ModuleResolutionHost, traceEnabled: boolean): ResolvedModuleWithFailedLookupLocations { const failedLookupLocations: string[] = []; const containingDirectory = getDirectoryPath(containingFile); const candidate = normalizePath(combinePaths(containingDirectory, moduleName)); - const supportedExtensions = getSupportedExtensions(compilerOptions); + + if (traceEnabled) { + trace(host, Diagnostics.Converting_relative_module_name_0_to_absolute_using_1_as_a_base_directory_2, moduleName, containingDirectory, candidate); + } if (compilerOptions.rootDirs) { + if (traceEnabled) { + trace(host, Diagnostics.rootDirs_option_is_specified_searching_for_a_longest_matching_prefix); + } + let matchedPrefix: string; for (const rootDir of compilerOptions.rootDirs) { let normalizedRoot = getNormalizedAbsolutePath(rootDir, baseUrl); @@ -169,12 +234,20 @@ namespace ts { } if (matchedPrefix) { const suffix = candidate.substr(matchedPrefix.length); - return baseUrlResolveNonRelativeModuleName(suffix, baseUrl, supportedExtensions, compilerOptions, host); + if (traceEnabled) { + trace(host, Diagnostics.Found_longest_matching_rootDir_0_converted_relative_path_1_to_non_relative_path_2, matchedPrefix, moduleName, suffix); + } + + return baseUrlResolveNonRelativeModuleName(suffix, baseUrl, supportedExtensions, compilerOptions, host, traceEnabled); } return { resolvedModule: undefined, failedLookupLocations }; } else { - const resolvedFileName = loadModuleFromFile(supportedExtensions, candidate, failedLookupLocations, host); + if (traceEnabled) { + trace(host, Diagnostics.rootDirs_option_is_not_specified_using_0_as_candidate_location, candidate); + } + + const resolvedFileName = loadModuleFromFile(supportedExtensions, candidate, failedLookupLocations, host, traceEnabled); return { resolvedModule: resolvedFileName ? { resolvedFileName } : undefined, failedLookupLocations @@ -182,14 +255,18 @@ namespace ts { } } - export function baseUrlResolveNonRelativeModuleName(moduleName: string, baseUrl: string, supportedExtensions: string[], options: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations { + function baseUrlResolveNonRelativeModuleName(moduleName: string, baseUrl: string, supportedExtensions: string[], compilerOptions: CompilerOptions, host: ModuleResolutionHost, traceEnabled: boolean): ResolvedModuleWithFailedLookupLocations { let longestMatchPrefixLength = -1; let matchedPattern: string; let matchedStar: string; const failedLookupLocations: string[] = []; - if (options.paths) { - for (const key in options.paths) { + if (compilerOptions.paths) { + if (traceEnabled) { + trace(host, Diagnostics.paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0, moduleName); + } + + for (const key in compilerOptions.paths) { const pattern: string = key; const indexOfStar = pattern.indexOf("*"); if (indexOfStar !== -1) { @@ -217,10 +294,19 @@ namespace ts { } if (matchedPattern) { - for (const subst of options.paths[matchedPattern]) { + if (traceEnabled) { + trace(host, Diagnostics.Module_name_0_matched_pattern_1, moduleName, matchedPattern); + } + + for (const subst of compilerOptions.paths[matchedPattern]) { const path = matchedStar ? subst.replace("\*", matchedStar) : subst; const candidate = normalizePath(combinePaths(baseUrl, path)); - const resolvedFileName = loadModuleFromFile(supportedExtensions, candidate, failedLookupLocations, host); + + if (traceEnabled) { + trace(host, Diagnostics.Trying_substitution_0_candidate_module_location_Colon_1, subst, path); + } + + const resolvedFileName = loadModuleFromFile(supportedExtensions, candidate, failedLookupLocations, host, traceEnabled); if (resolvedFileName) { return { resolvedModule: { resolvedFileName }, failedLookupLocations }; } @@ -230,7 +316,12 @@ namespace ts { } else { const candidate = normalizePath(combinePaths(baseUrl, moduleName)); - const resolvedFileName = loadModuleFromFile(supportedExtensions, candidate, failedLookupLocations, host); + + if (traceEnabled) { + trace(host, Diagnostics.Resolving_module_name_0_relative_to_base_url_1_2, moduleName, baseUrl, candidate); + } + + const resolvedFileName = loadModuleFromFile(supportedExtensions, candidate, failedLookupLocations, host, traceEnabled); return { resolvedModule: resolvedFileName ? { resolvedFileName } : undefined, failedLookupLocations @@ -250,44 +341,64 @@ namespace ts { export function nodeModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations { const containingDirectory = getDirectoryPath(containingFile); const supportedExtensions = getSupportedExtensions(compilerOptions); + const traceEnabled = isTraceEnabled(compilerOptions, host); if (isRootedDiskPath(moduleName) || nameStartsWithDotSlashOrDotDotSlash(moduleName)) { const failedLookupLocations: string[] = []; const candidate = normalizePath(combinePaths(containingDirectory, moduleName)); - let resolvedFileName = loadModuleFromFile(supportedExtensions, candidate, failedLookupLocations, host); + + if (traceEnabled) { + trace(host, Diagnostics.Loading_module_0_as_file_Slash_folder_candidate_module_location_1, moduleName, candidate); + } + + let resolvedFileName = loadModuleFromFile(supportedExtensions, candidate, failedLookupLocations, host, traceEnabled); if (resolvedFileName) { return { resolvedModule: { resolvedFileName }, failedLookupLocations }; } - resolvedFileName = loadNodeModuleFromDirectory(supportedExtensions, candidate, failedLookupLocations, host); + resolvedFileName = loadNodeModuleFromDirectory(supportedExtensions, candidate, failedLookupLocations, host, traceEnabled); return resolvedFileName ? { resolvedModule: { resolvedFileName }, failedLookupLocations } : { resolvedModule: undefined, failedLookupLocations }; } else { - return loadModuleFromNodeModules(moduleName, containingDirectory, host); + if (traceEnabled) { + trace(host, Diagnostics.Loading_module_0_from_node_modules_folder, moduleName); + } + + return loadModuleFromNodeModules(moduleName, containingDirectory, host, traceEnabled); } } - function loadModuleFromFile(extensions: string[], candidate: string, failedLookupLocation: string[], host: ModuleResolutionHost): string { + function loadModuleFromFile(extensions: string[], candidate: string, failedLookupLocation: string[], host: ModuleResolutionHost, traceEnabled: boolean): string { return forEach(extensions, tryLoad); function tryLoad(ext: string): string { const fileName = fileExtensionIs(candidate, ext) ? candidate : candidate + ext; + if (host.fileExists(fileName)) { + if (traceEnabled) { + trace(host, Diagnostics.File_0_exist_use_it_as_a_module_resolution_result, fileName); + } return fileName; } else { + if (traceEnabled) { + trace(host, Diagnostics.File_0_does_not_exist, fileName); + } failedLookupLocation.push(fileName); return undefined; } } } - function loadNodeModuleFromDirectory(extensions: string[], candidate: string, failedLookupLocation: string[], host: ModuleResolutionHost): string { + function loadNodeModuleFromDirectory(extensions: string[], candidate: string, failedLookupLocation: string[], host: ModuleResolutionHost, traceEnabled: boolean): string { const packageJsonPath = combinePaths(candidate, "package.json"); if (host.fileExists(packageJsonPath)) { + if (traceEnabled) { + trace(host, Diagnostics.Found_package_json_at_0, packageJsonPath); + } let jsonContent: { typings?: string }; @@ -301,21 +412,33 @@ namespace ts { } if (jsonContent.typings) { - const result = loadModuleFromFile(extensions, normalizePath(combinePaths(candidate, jsonContent.typings)), failedLookupLocation, host); + const typingsFile = normalizePath(combinePaths(candidate, jsonContent.typings)); + if (traceEnabled) { + trace(host, Diagnostics.package_json_has_typings_field_0_that_references_1, jsonContent.typings, typingsFile); + } + const result = loadModuleFromFile(extensions, typingsFile , failedLookupLocation, host, traceEnabled); if (result) { return result; } } + else { + if (traceEnabled) { + trace(host, Diagnostics.package_json_does_not_have_typings_field); + } + } } else { + if (traceEnabled) { + trace(host, Diagnostics.package_json_does_not_have_typings_field); + } // record package json as one of failed lookup locations - in the future if this file will appear it will invalidate resolution results failedLookupLocation.push(packageJsonPath); } - return loadModuleFromFile(extensions, combinePaths(candidate, "index"), failedLookupLocation, host); + return loadModuleFromFile(extensions, combinePaths(candidate, "index"), failedLookupLocation, host, traceEnabled); } - function loadModuleFromNodeModules(moduleName: string, directory: string, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations { + function loadModuleFromNodeModules(moduleName: string, directory: string, host: ModuleResolutionHost, traceEnabled: boolean): ResolvedModuleWithFailedLookupLocations { const failedLookupLocations: string[] = []; directory = normalizeSlashes(directory); while (true) { @@ -324,12 +447,12 @@ namespace ts { const nodeModulesFolder = combinePaths(directory, "node_modules"); const candidate = normalizePath(combinePaths(nodeModulesFolder, moduleName)); // Load only typescript files irrespective of allowJs option if loading from node modules - let result = loadModuleFromFile(supportedTypeScriptExtensions, candidate, failedLookupLocations, host); + let result = loadModuleFromFile(supportedTypeScriptExtensions, candidate, failedLookupLocations, host, traceEnabled); if (result) { return { resolvedModule: { resolvedFileName: result, isExternalLibraryImport: true }, failedLookupLocations }; } - result = loadNodeModuleFromDirectory(supportedTypeScriptExtensions, candidate, failedLookupLocations, host); + result = loadNodeModuleFromDirectory(supportedTypeScriptExtensions, candidate, failedLookupLocations, host, traceEnabled); if (result) { return { resolvedModule: { resolvedFileName: result, isExternalLibraryImport: true }, failedLookupLocations }; } @@ -369,8 +492,13 @@ namespace ts { export function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations { + const traceEnabled = isTraceEnabled(compilerOptions, host); + // module names that contain '!' are used to reference resources and are not resolved to actual files on disk if (moduleName.indexOf("!") != -1) { + if (traceEnabled) { + trace(host, Diagnostics.Module_name_0_contains_character, moduleName); + } return { resolvedModule: undefined, failedLookupLocations: [] }; } @@ -392,9 +520,15 @@ namespace ts { const candidate = searchName + extension; if (host.fileExists(candidate)) { + if (traceEnabled) { + trace(host, Diagnostics.File_0_exist_use_it_as_a_module_resolution_result, candidate); + } return candidate; } else { + if (traceEnabled) { + trace(host, Diagnostics.File_0_does_not_exist, candidate); + } failedLookupLocations.push(candidate); } }); @@ -498,7 +632,8 @@ namespace ts { getCanonicalFileName, getNewLine: () => newLine, fileExists: fileName => sys.fileExists(fileName), - readFile: fileName => sys.readFile(fileName) + readFile: fileName => sys.readFile(fileName), + trace: (s: string) => sys.write(s + newLine) }; } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 8dc0b48e781..288532c27e6 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -2308,7 +2308,7 @@ namespace ts { Message, } - export const enum ModuleResolutionKind { + export enum ModuleResolutionKind { Classic = 1, NodeJs = 2, BaseUrl = 3 @@ -2368,6 +2368,7 @@ namespace ts { baseUrl?: string; paths?: PathSubstitutions; rootDirs?: RootPaths; + traceModuleResolution?: boolean; allowJs?: boolean; /* @internal */ stripInternal?: boolean; @@ -2379,7 +2380,7 @@ namespace ts { [option: string]: string | number | boolean | TsConfigOnlyOptions; } - export const enum ModuleKind { + export enum ModuleKind { None = 0, CommonJS = 1, AMD = 2, @@ -2606,6 +2607,7 @@ namespace ts { // readFile function is used to read arbitrary text files on disk, i.e. when resolution procedure needs the content of 'package.json' // to determine location of bundled typings for node module readFile(fileName: string): string; + trace?(s: string): void; } export interface ResolvedModule { diff --git a/src/services/shims.ts b/src/services/shims.ts index 6b656ea2738..2f0f0de3e5d 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -73,6 +73,8 @@ namespace ts { * when enumerating the directory. */ readDirectory(rootDir: string, extension: string, exclude?: string): string; + + trace(s: string): void; } /// From 25cc97bb755d973b047dd258838505a993a573bc Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Tue, 24 Nov 2015 16:41:41 -0800 Subject: [PATCH 003/160] addressed PR feedback --- src/compiler/commandLineParser.ts | 2 +- src/compiler/diagnosticMessages.json | 2 +- src/compiler/program.ts | 9 +++-- .../pathMappingBasedModuleResolution11.js | 38 +++++++++++++++++++ ...pathMappingBasedModuleResolution11.symbols | 29 ++++++++++++++ .../pathMappingBasedModuleResolution11.types | 32 ++++++++++++++++ .../pathMappingBasedModuleResolution11.ts | 34 +++++++++++++++++ 7 files changed, 140 insertions(+), 6 deletions(-) create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution11.js create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution11.symbols create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution11.types create mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution11.ts diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index f462c7c1e91..249e2f30c29 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -286,7 +286,7 @@ namespace ts { name: "baseUrl", type: "string", isFilePath: true, - description: Diagnostics.Base_directory_to_resolve_relative_module_names + description: Diagnostics.Base_directory_to_resolve_non_absolute_module_names }, { // this option can only be specified in tsconfig.json diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 3fd364f0fa5..e8fd0d2a069 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -2361,7 +2361,7 @@ "category": "Error", "code": 6082 }, - "Base directory to resolve relative module names.": { + "Base directory to resolve non-absolute module names.": { "category": "Message", "code": 6083 }, diff --git a/src/compiler/program.ts b/src/compiler/program.ts index b9ebef7c27f..66944354c40 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -98,7 +98,7 @@ namespace ts { return result; } - // Path mapping based module resolution strategy uses base url to resolve relative file names. This resolution strategy can be enabled + // Path mapping based module resolution strategy uses base url to resolve non-absolute file names. This resolution strategy can be enabled // by setting 'moduleResolution' option to 'baseUrl' and as it implied by the name it uses base url to resolve module names. // Base url can be specified: // - explicitly via command line option 'baseUrl'. If this value is relative it will be computed relative to current directory. @@ -161,12 +161,12 @@ namespace ts { // ] // @file: /a/b/c/src/form1.ts // import {x} from "./form.content.ts" - // @file: /a/b/c/generated/form1.content.ts + // @file: /a/b/c/generated/form.content.ts // export var x = ... // first './form.content.ts' needs to be converted to non-relative name. - // 1. convert it to absolute name '/a/b/c/src/form1.content.ts' -> + // 1. convert it to absolute name '/a/b/c/src/form.content.ts' -> // find longest prefix in rootDirs that match this path, it will be './src' (after expansion '/a/b/c/src/') -> - // suffix is form1.content.ts + // suffix is form.content.ts // 2. apply path mappings to 'form1.content.ts' -> // '*' pattern will be matched -> // '*' substitution yields '/a/b/c/form1.content.ts' - file does not exists @@ -176,6 +176,7 @@ namespace ts { Debug.assert(baseUrl !== undefined); const supportedExtensions = getSupportedExtensions(compilerOptions); + // NOTE: traceEnabled check is delibirately no inside the 'trace' at evert callside to avoid runtime impact of calling vararg function const traceEnabled = isTraceEnabled(compilerOptions, host); if (isRootedDiskPath(moduleName)) { diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution11.js b/tests/baselines/reference/pathMappingBasedModuleResolution11.js new file mode 100644 index 00000000000..614357ec53f --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution11.js @@ -0,0 +1,38 @@ +//// [tests/cases/compiler/pathMappingBasedModuleResolution11.ts] //// + +//// [file1.ts] +import {x} from "./file2" // should be resolved to 'generated/folder1/file2/file.ts' + +export var z = x.toExponential(); + +//// [file.ts] +export {x} from "folder1/file3" // should be resolved to 'folder1/file3.ts' + +//// [file3.ts] +export var x = 1; + +//// [file3.ts] +import {z as y} from "../folder1/file1" // should be resolved to 'folder1/file1.ts' +let z = y.toLowerCase(); + + +//// [file3.js] +define(["require", "exports"], function (require, exports) { + "use strict"; + exports.x = 1; +}); +//// [file.js] +define(["require", "exports", "folder1/file3"], function (require, exports, file3_1) { + "use strict"; + exports.x = file3_1.x; // should be resolved to 'folder1/file3.ts' +}); +//// [file1.js] +define(["require", "exports", "./file2"], function (require, exports, file2_1) { + "use strict"; + exports.z = file2_1.x.toExponential(); +}); +//// [file3.js] +define(["require", "exports", "../folder1/file1"], function (require, exports, file1_1) { + "use strict"; + var z = file1_1.z.toLowerCase(); +}); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution11.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution11.symbols new file mode 100644 index 00000000000..f453dafe2a2 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution11.symbols @@ -0,0 +1,29 @@ +=== tests/cases/compiler/root/folder1/file1.ts === +import {x} from "./file2" // should be resolved to 'generated/folder1/file2/file.ts' +>x : Symbol(x, Decl(file1.ts, 0, 8)) + +export var z = x.toExponential(); +>z : Symbol(z, Decl(file1.ts, 2, 10)) +>x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(file1.ts, 0, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +=== tests/cases/compiler/root/generated/folder1/file2/file.ts === +export {x} from "folder1/file3" // should be resolved to 'folder1/file3.ts' +>x : Symbol(x, Decl(file.ts, 0, 8)) + +=== tests/cases/compiler/root/folder1/file3.ts === +export var x = 1; +>x : Symbol(x, Decl(file3.ts, 0, 10)) + +=== tests/cases/compiler/root/generated/folder2/file3.ts === +import {z as y} from "../folder1/file1" // should be resolved to 'folder1/file1.ts' +>z : Symbol(y, Decl(file3.ts, 0, 8)) +>y : Symbol(y, Decl(file3.ts, 0, 8)) + +let z = y.toLowerCase(); +>z : Symbol(z, Decl(file3.ts, 1, 3)) +>y.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) +>y : Symbol(y, Decl(file3.ts, 0, 8)) +>toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution11.types b/tests/baselines/reference/pathMappingBasedModuleResolution11.types new file mode 100644 index 00000000000..45717088577 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution11.types @@ -0,0 +1,32 @@ +=== tests/cases/compiler/root/folder1/file1.ts === +import {x} from "./file2" // should be resolved to 'generated/folder1/file2/file.ts' +>x : number + +export var z = x.toExponential(); +>z : string +>x.toExponential() : string +>x.toExponential : (fractionDigits?: number) => string +>x : number +>toExponential : (fractionDigits?: number) => string + +=== tests/cases/compiler/root/generated/folder1/file2/file.ts === +export {x} from "folder1/file3" // should be resolved to 'folder1/file3.ts' +>x : number + +=== tests/cases/compiler/root/folder1/file3.ts === +export var x = 1; +>x : number +>1 : number + +=== tests/cases/compiler/root/generated/folder2/file3.ts === +import {z as y} from "../folder1/file1" // should be resolved to 'folder1/file1.ts' +>z : string +>y : string + +let z = y.toLowerCase(); +>z : string +>y.toLowerCase() : string +>y.toLowerCase : () => string +>y : string +>toLowerCase : () => string + diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution11.ts b/tests/cases/compiler/pathMappingBasedModuleResolution11.ts new file mode 100644 index 00000000000..e0504126ca1 --- /dev/null +++ b/tests/cases/compiler/pathMappingBasedModuleResolution11.ts @@ -0,0 +1,34 @@ +// @module: amd + +// paths\rootDirs is defined in tsconfig.json +// baseUrl is inferred from tsconfig.json + +// @filename: root/tsconfig.json +{ + "compilerOptions": { + "paths": { + "*": [ + "*", + "generated/*/file" + ] + }, + "rootDirs": [ + ".", + "./generated" + ] + } +} +// @filename: root/folder1/file1.ts +import {x} from "./file2" // should be resolved to 'generated/folder1/file2/file.ts' + +export var z = x.toExponential(); + +// @filename: root/generated/folder1/file2/file.ts +export {x} from "folder1/file3" // should be resolved to 'folder1/file3.ts' + +// @filename: root/folder1/file3.ts +export var x = 1; + +// @filename: root/generated/folder2/file3.ts +import {z as y} from "../folder1/file1" // should be resolved to 'folder1/file1.ts' +let z = y.toLowerCase(); From 62370a0d08a6c20c2250d0f808fbfaec4c12a663 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Wed, 25 Nov 2015 16:41:09 -0800 Subject: [PATCH 004/160] addressed PR feedback --- src/compiler/commandLineParser.ts | 34 +++++++++++++++++-- src/compiler/core.ts | 5 ++- src/compiler/diagnosticMessages.json | 13 ++++++- src/compiler/program.ts | 34 ++++++++++++++----- src/harness/harness.ts | 3 ++ .../pathMappingBasedModuleResolution10_2.ts | 4 +-- tests/cases/unittests/moduleResolution.ts | 4 +-- 7 files changed, 80 insertions(+), 17 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 249e2f30c29..6ed27aeb3bf 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -300,7 +300,8 @@ namespace ts { // use type = object to copy the value as-is name: "rootDirs", type: "object", - isTSConfigOnly: true + isTSConfigOnly: true, + isFilePath: true }, { name: "traceModuleResolution", @@ -595,7 +596,36 @@ namespace ts { } } if (opt.isFilePath) { - value = normalizePath(combinePaths(basePath, value)); + switch (typeof value) { + case "string": + value = normalizePath(combinePaths(basePath, value)); + break; + case "object": + // "object" options with 'isFilePath' = true expected to be string arrays + let paths: string[] = []; + let invalidOptionType = false; + if (!isArray(value)) { + invalidOptionType = true; + } + else { + for (const element of value) { + if (typeof element === "string") { + paths.push(normalizePath(combinePaths(basePath, element))); + } + else { + invalidOptionType = true; + break; + } + } + } + if (invalidOptionType) { + errors.push(createCompilerDiagnostic(Diagnostics.Option_0_should_have_array_of_strings_as_a_value, opt.name)); + } + else { + value = paths; + } + break; + } if (value === "") { value = "."; } diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 50b10ac5a90..df6158b9887 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -74,7 +74,10 @@ namespace ts { GreaterThan = 1 } - export interface StringSet extends Map { } + /* @internal */ + export function isArray(obj: any): boolean { + return Array.isArray ? Array.isArray(obj) : typeof obj === "object" && obj instanceof Array; + } /** * Iterates through 'array' by index and performs the callback on each element of array until the callback diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index e8fd0d2a069..331ada0cbe0 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -2296,7 +2296,6 @@ "category": "Error", "code": 6064 }, - "Enables experimental support for ES7 decorators.": { "category": "Message", "code": 6065 @@ -2469,6 +2468,18 @@ "category": "Message", "code": 6109 }, + "Base url: '{0}'.": { + "category": "Message", + "code": 6110 + }, + "Option '{0}' should have array of strings as a value.": { + "category": "Error", + "code": 6111 + }, + "Checking if '{0}' is the longest matching prefix for '{1}' - '{2}'.": { + "category": "Message", + "code": 6112 + }, "Variable '{0}' implicitly has an '{1}' type.": { "category": "Error", "code": 7005 diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 66944354c40..50c6b05963d 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -179,6 +179,10 @@ namespace ts { // NOTE: traceEnabled check is delibirately no inside the 'trace' at evert callside to avoid runtime impact of calling vararg function const traceEnabled = isTraceEnabled(compilerOptions, host); + if (traceEnabled) { + trace(host, Diagnostics.Base_url_Colon_0, baseUrl); + } + if (isRootedDiskPath(moduleName)) { if (traceEnabled) { trace(host, Diagnostics.Resolving_rooted_module_name_0_use_it_as_a_candidate_location, moduleName); @@ -211,6 +215,7 @@ namespace ts { function baseUrlResolveRelativeModuleName(moduleName: string, containingFile: string, baseUrl: string, supportedExtensions: string[], compilerOptions: CompilerOptions, host: ModuleResolutionHost, traceEnabled: boolean): ResolvedModuleWithFailedLookupLocations { const failedLookupLocations: string[] = []; + // we always pass absolute path to containing file so candidate location is also absolute const containingDirectory = getDirectoryPath(containingFile); const candidate = normalizePath(combinePaths(containingDirectory, moduleName)); @@ -225,14 +230,24 @@ namespace ts { let matchedPrefix: string; for (const rootDir of compilerOptions.rootDirs) { - let normalizedRoot = getNormalizedAbsolutePath(rootDir, baseUrl); + // rootDirs are expected to be absolute + let normalizedRoot = normalizePath(rootDir); if (!endsWith(normalizedRoot, directorySeparator)) { normalizedRoot += directorySeparator; } - if (startsWith(candidate, normalizedRoot) && (matchedPrefix === undefined || matchedPrefix.length < normalizedRoot.length)) { + const isLongestMatchingPrefix = + startsWith(candidate, normalizedRoot) && + (matchedPrefix === undefined || matchedPrefix.length < normalizedRoot.length); + + if (traceEnabled) { + trace(host, Diagnostics.Checking_if_0_is_the_longest_matching_prefix_for_1_2, normalizedRoot, candidate, isLongestMatchingPrefix); + } + + if (isLongestMatchingPrefix) { matchedPrefix = normalizedRoot; } } + if (matchedPrefix) { const suffix = candidate.substr(matchedPrefix.length); if (traceEnabled) { @@ -241,19 +256,20 @@ namespace ts { return baseUrlResolveNonRelativeModuleName(suffix, baseUrl, supportedExtensions, compilerOptions, host, traceEnabled); } - return { resolvedModule: undefined, failedLookupLocations }; + + // rootDirs does not contain prefix for candidate - fallthrough to load file from candidate location. } else { if (traceEnabled) { trace(host, Diagnostics.rootDirs_option_is_not_specified_using_0_as_candidate_location, candidate); } - - const resolvedFileName = loadModuleFromFile(supportedExtensions, candidate, failedLookupLocations, host, traceEnabled); - return { - resolvedModule: resolvedFileName ? { resolvedFileName } : undefined, - failedLookupLocations - }; } + + const resolvedFileName = loadModuleFromFile(supportedExtensions, candidate, failedLookupLocations, host, traceEnabled); + return { + resolvedModule: resolvedFileName ? { resolvedFileName } : undefined, + failedLookupLocations + }; } function baseUrlResolveNonRelativeModuleName(moduleName: string, baseUrl: string, supportedExtensions: string[], compilerOptions: CompilerOptions, host: ModuleResolutionHost, traceEnabled: boolean): ResolvedModuleWithFailedLookupLocations { diff --git a/src/harness/harness.ts b/src/harness/harness.ts index 97344f4242e..7167d1e8f9a 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -1005,6 +1005,9 @@ namespace Harness { if (options.inferredBaseUrl) { options.inferredBaseUrl = ts.getNormalizedAbsolutePath(options.inferredBaseUrl, currentDirectory); } + if (options.rootDirs) { + options.rootDirs = ts.map(options.rootDirs, d => ts.getNormalizedAbsolutePath(d, currentDirectory)); + } const programFiles: TestFile[] = inputFiles.slice(); // Files from built\local that are requested by test "@includeBuiltFiles" to be in the context. diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution10_2.ts b/tests/cases/compiler/pathMappingBasedModuleResolution10_2.ts index bd8942e1df1..754df23f4bf 100644 --- a/tests/cases/compiler/pathMappingBasedModuleResolution10_2.ts +++ b/tests/cases/compiler/pathMappingBasedModuleResolution10_2.ts @@ -14,8 +14,8 @@ ] }, "rootDirs": [ - ".", - "./generated" + "./src/", + "./src/generated" ] } } diff --git a/tests/cases/unittests/moduleResolution.ts b/tests/cases/unittests/moduleResolution.ts index 4bb076108eb..b6ee19f6de2 100644 --- a/tests/cases/unittests/moduleResolution.ts +++ b/tests/cases/unittests/moduleResolution.ts @@ -485,8 +485,8 @@ import b = require("./moduleB.ts"); ] }, rootDirs: [ - ".", - "./generated/" + "/root", + "/root/generated/" ] }; { From e15eab9d9961cbd978389e2e0504e366e648f020 Mon Sep 17 00:00:00 2001 From: Yui T Date: Tue, 15 Sep 2015 15:11:04 -0700 Subject: [PATCH 005/160] Add basic check for use super before this Conflicts: src/compiler/diagnosticInformationMap.generated.ts src/compiler/diagnosticMessages.json src/compiler/types.ts --- src/compiler/checker.ts | 13 +++++++++++++ src/compiler/diagnosticMessages.json | 4 ++++ src/compiler/types.ts | 1 + 3 files changed, 18 insertions(+) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 7f20c542128..5238a4780e2 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -6866,6 +6866,11 @@ namespace ts { // do not return here so in case if lexical this is captured - it will be reflected in flags on NodeLinks break; case SyntaxKind.Constructor: + // TODO(yuisu): Comments + if ((container).hasSeenSuperBeforeThis === undefined) { + (container).hasSeenSuperBeforeThis = false; + } + if (isInConstructorArgumentInitializer(node, container)) { error(node, Diagnostics.this_cannot_be_referenced_in_constructor_arguments); // do not return here so in case if lexical this is captured - it will be reflected in flags on NodeLinks @@ -9588,6 +9593,10 @@ namespace ts { const signature = getResolvedSignature(node); if (node.expression.kind === SyntaxKind.SuperKeyword) { + let containgFunction = getContainingFunction(node.expression); + if (containgFunction && containgFunction.kind === SyntaxKind.Constructor && (containgFunction).hasSeenSuperBeforeThis === undefined) { + (containgFunction).hasSeenSuperBeforeThis = true; + } return voidType; } if (node.kind === SyntaxKind.NewExpression) { @@ -11182,6 +11191,10 @@ namespace ts { markThisReferencesAsErrors(superCallStatement.expression); } } + else if (!node.hasSeenSuperBeforeThis) { + // TODO: comment + error(node, Diagnostics.super_has_to_be_called_before_this_accessing); + } } else if (baseConstructorType !== nullType) { error(node, Diagnostics.Constructors_for_derived_classes_must_contain_a_super_call); diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 62661706373..51a4e2c6c8f 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -2539,5 +2539,9 @@ "A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses.": { "category": "Error", "code": 17007 + }, + "'super' has to be called before 'this' accessing.": { + "category": "Error", + "code": 17006 } } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index f8b26ddaa6d..5a216f8bbcd 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -695,6 +695,7 @@ namespace ts { // @kind(SyntaxKind.Constructor) export interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement { body?: FunctionBody; + hasSeenSuperBeforeThis: boolean; // TODDO (yuisu): comment } // For when we encounter a semicolon in a class declaration. ES6 allows these as class elements. From 653deaa2e207b7f4f3e996483a1b6ab61a3fcb65 Mon Sep 17 00:00:00 2001 From: Yui T Date: Tue, 15 Sep 2015 16:42:04 -0700 Subject: [PATCH 006/160] Fix where to report on error. Move from constructor node to just super node Conflicts: src/compiler/checker.ts --- src/compiler/checker.ts | 59 ++++++++++++++++++++++++++--------------- 1 file changed, 38 insertions(+), 21 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 5238a4780e2..b328a4c8366 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -6848,6 +6848,22 @@ namespace ts { let container = getThisContainer(node, /* includeArrowFunctions */ true); let needToCaptureLexicalThis = false; + + if (container.kind === SyntaxKind.Constructor) { + // Keep track of whether we have seen "super" before encounter "this" so that + // we can report appropriate error later in checkConstructorDeclaration + // We have to do the check here to make sure we won't give false error when + // "this" is used in arrow functions + // For example: + // constructor() { + // (()=>this); // No Error + // super(); + // } + if ((container).hasSeenSuperBeforeThis === undefined) { + (container).hasSeenSuperBeforeThis = false; + } + } + // Now skip arrow functions to get the "real" owner of 'this'. if (container.kind === SyntaxKind.ArrowFunction) { container = getThisContainer(container, /* includeArrowFunctions */ false); @@ -6866,11 +6882,6 @@ namespace ts { // do not return here so in case if lexical this is captured - it will be reflected in flags on NodeLinks break; case SyntaxKind.Constructor: - // TODO(yuisu): Comments - if ((container).hasSeenSuperBeforeThis === undefined) { - (container).hasSeenSuperBeforeThis = false; - } - if (isInConstructorArgumentInitializer(node, container)) { error(node, Diagnostics.this_cannot_be_referenced_in_constructor_arguments); // do not return here so in case if lexical this is captured - it will be reflected in flags on NodeLinks @@ -11154,8 +11165,25 @@ namespace ts { const containingClassSymbol = getSymbolOfNode(containingClassDecl); const containingClassInstanceType = getDeclaredTypeOfSymbol(containingClassSymbol); const baseConstructorType = getBaseConstructorTypeOfClass(containingClassInstanceType); + const statements = (node.body).statements; + let superCallStatement: ExpressionStatement; + let isSuperCallFirstStatment: boolean; - if (containsSuperCall(node.body)) { + for (const statement of statements) { + if (statement.kind === SyntaxKind.ExpressionStatement && isSuperCallExpression((statement).expression)) { + superCallStatement = statement; + if (isSuperCallFirstStatment === undefined) { + isSuperCallFirstStatment = true; + } + } + else if (isSuperCallFirstStatment === undefined && !isPrologueDirective(statement)) { + isSuperCallFirstStatment = false; + } + } + + // The main different between looping through each statement in constructor and calling containsSuperCall is that, + // containsSuperCall will consider "super" inside computed-property for inner class declaration + if (superCallStatement || containsSuperCall(node.body)) { if (baseConstructorType === nullType) { error(node, Diagnostics.A_constructor_cannot_contain_a_super_call_when_its_class_extends_null); } @@ -11172,19 +11200,8 @@ namespace ts { // Skip past any prologue directives to find the first statement // to ensure that it was a super call. if (superCallShouldBeFirst) { - const statements = (node.body).statements; - let superCallStatement: ExpressionStatement; - for (const statement of statements) { - if (statement.kind === SyntaxKind.ExpressionStatement && isSuperCallExpression((statement).expression)) { - superCallStatement = statement; - break; - } - if (!isPrologueDirective(statement)) { - break; - } - } - if (!superCallStatement) { - error(node, Diagnostics.A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_or_has_parameter_properties); + if (!isSuperCallFirstStatment) { + error(superCallStatement, Diagnostics.A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_or_has_parameter_properties); } else { // In such a required super call, it is a compile-time error for argument expressions to reference this. @@ -11192,8 +11209,8 @@ namespace ts { } } else if (!node.hasSeenSuperBeforeThis) { - // TODO: comment - error(node, Diagnostics.super_has_to_be_called_before_this_accessing); + // In ES6, super inside constructor of class-declaration has to precede "this" accessing + error(superCallStatement, Diagnostics.super_has_to_be_called_before_this_accessing); } } else if (baseConstructorType !== nullType) { From eaa2846348c82d69caf78a50b2efa58e660bdea9 Mon Sep 17 00:00:00 2001 From: Yui T Date: Tue, 15 Sep 2015 17:17:30 -0700 Subject: [PATCH 007/160] Add tests --- .../checkSuperCallBeforeThisAccessing1.ts | 10 ++++++++++ .../checkSuperCallBeforeThisAccessing2.ts | 10 ++++++++++ .../checkSuperCallBeforeThisAccessing3.ts | 15 +++++++++++++++ .../checkSuperCallBeforeThisAccessing4.ts | 19 +++++++++++++++++++ .../checkSuperCallBeforeThisAccessing5.ts | 7 +++++++ .../checkSuperCallBeforeThisAccessing6.ts | 10 ++++++++++ .../checkSuperCallBeforeThisAccessing7.ts | 9 +++++++++ 7 files changed, 80 insertions(+) create mode 100644 tests/cases/compiler/checkSuperCallBeforeThisAccessing1.ts create mode 100644 tests/cases/compiler/checkSuperCallBeforeThisAccessing2.ts create mode 100644 tests/cases/compiler/checkSuperCallBeforeThisAccessing3.ts create mode 100644 tests/cases/compiler/checkSuperCallBeforeThisAccessing4.ts create mode 100644 tests/cases/compiler/checkSuperCallBeforeThisAccessing5.ts create mode 100644 tests/cases/compiler/checkSuperCallBeforeThisAccessing6.ts create mode 100644 tests/cases/compiler/checkSuperCallBeforeThisAccessing7.ts diff --git a/tests/cases/compiler/checkSuperCallBeforeThisAccessing1.ts b/tests/cases/compiler/checkSuperCallBeforeThisAccessing1.ts new file mode 100644 index 00000000000..e8dd78ef546 --- /dev/null +++ b/tests/cases/compiler/checkSuperCallBeforeThisAccessing1.ts @@ -0,0 +1,10 @@ +class Based { } +class Derived extends Based { + public x: number; + constructor() { + super(); + this; + this.x = 10; + var that = this; + } +} \ No newline at end of file diff --git a/tests/cases/compiler/checkSuperCallBeforeThisAccessing2.ts b/tests/cases/compiler/checkSuperCallBeforeThisAccessing2.ts new file mode 100644 index 00000000000..e6545f24288 --- /dev/null +++ b/tests/cases/compiler/checkSuperCallBeforeThisAccessing2.ts @@ -0,0 +1,10 @@ +class Based { } +class Derived extends Based { + public x: number; + constructor() { + this.x = 100; + super(); + this.x = 10; + var that = this; + } +} \ No newline at end of file diff --git a/tests/cases/compiler/checkSuperCallBeforeThisAccessing3.ts b/tests/cases/compiler/checkSuperCallBeforeThisAccessing3.ts new file mode 100644 index 00000000000..fd9de120b05 --- /dev/null +++ b/tests/cases/compiler/checkSuperCallBeforeThisAccessing3.ts @@ -0,0 +1,15 @@ +class Based { } +class Derived extends Based { + public x: number; + constructor() { + class innver { + public y: boolean; + constructor() { + this.y = true; + } + } + super(); + this.x = 10; + var that = this; + } +} \ No newline at end of file diff --git a/tests/cases/compiler/checkSuperCallBeforeThisAccessing4.ts b/tests/cases/compiler/checkSuperCallBeforeThisAccessing4.ts new file mode 100644 index 00000000000..1fdee00c2f8 --- /dev/null +++ b/tests/cases/compiler/checkSuperCallBeforeThisAccessing4.ts @@ -0,0 +1,19 @@ +class Based { } +class Derived extends Based { + public x: number; + constructor() { + (() => { + this; // No error + }); + () => { + this; // No error + }; + (() => { + this; // No error + })(); + super(); + super(); + this.x = 10; + var that = this; + } +} \ No newline at end of file diff --git a/tests/cases/compiler/checkSuperCallBeforeThisAccessing5.ts b/tests/cases/compiler/checkSuperCallBeforeThisAccessing5.ts new file mode 100644 index 00000000000..65d1db6df75 --- /dev/null +++ b/tests/cases/compiler/checkSuperCallBeforeThisAccessing5.ts @@ -0,0 +1,7 @@ +class Based { constructor(...arg) { } } +class Derived extends Based { + public x: number; + constructor() { + super(this.x); + } +} \ No newline at end of file diff --git a/tests/cases/compiler/checkSuperCallBeforeThisAccessing6.ts b/tests/cases/compiler/checkSuperCallBeforeThisAccessing6.ts new file mode 100644 index 00000000000..2cdcb9ad3a8 --- /dev/null +++ b/tests/cases/compiler/checkSuperCallBeforeThisAccessing6.ts @@ -0,0 +1,10 @@ +class Base { + constructor(...arg) { + } +} +class Super extends Base { + constructor() { + (() => this); // No Error + super(); + } +} \ No newline at end of file diff --git a/tests/cases/compiler/checkSuperCallBeforeThisAccessing7.ts b/tests/cases/compiler/checkSuperCallBeforeThisAccessing7.ts new file mode 100644 index 00000000000..1c4af98f0a2 --- /dev/null +++ b/tests/cases/compiler/checkSuperCallBeforeThisAccessing7.ts @@ -0,0 +1,9 @@ +class Base { + constructor(func: ()=>Base) { + } +} +class Super extends Base { + constructor() { + super((() => this)); // No error + } +} \ No newline at end of file From c2fb6944041c5d5d3c05cd041518059782839d30 Mon Sep 17 00:00:00 2001 From: Yui T Date: Tue, 15 Sep 2015 17:19:03 -0700 Subject: [PATCH 008/160] Update baselines --- .../checkSuperCallBeforeThisAccessing1.js | 33 +++++++++++ ...checkSuperCallBeforeThisAccessing1.symbols | 28 ++++++++++ .../checkSuperCallBeforeThisAccessing1.types | 31 ++++++++++ ...ckSuperCallBeforeThisAccessing2.errors.txt | 16 ++++++ .../checkSuperCallBeforeThisAccessing2.js | 33 +++++++++++ .../checkSuperCallBeforeThisAccessing3.js | 43 ++++++++++++++ ...checkSuperCallBeforeThisAccessing3.symbols | 38 +++++++++++++ .../checkSuperCallBeforeThisAccessing3.types | 43 ++++++++++++++ .../checkSuperCallBeforeThisAccessing4.js | 52 +++++++++++++++++ ...checkSuperCallBeforeThisAccessing4.symbols | 43 ++++++++++++++ .../checkSuperCallBeforeThisAccessing4.types | 56 +++++++++++++++++++ ...ckSuperCallBeforeThisAccessing5.errors.txt | 13 +++++ .../checkSuperCallBeforeThisAccessing5.js | 31 ++++++++++ .../checkSuperCallBeforeThisAccessing6.js | 36 ++++++++++++ ...checkSuperCallBeforeThisAccessing6.symbols | 20 +++++++ .../checkSuperCallBeforeThisAccessing6.types | 23 ++++++++ .../checkSuperCallBeforeThisAccessing7.js | 30 ++++++++++ ...checkSuperCallBeforeThisAccessing7.symbols | 19 +++++++ .../checkSuperCallBeforeThisAccessing7.types | 22 ++++++++ ...ckSuperCallBeforeThisAccessing8.errors.txt | 16 ++++++ .../checkSuperCallBeforeThisAccessing8.js | 35 ++++++++++++ .../reference/classUpdateTests.errors.txt | 18 ++---- ...derivedClassParameterProperties.errors.txt | 45 ++++++--------- .../derivedClassParameterProperties.js | 4 +- ...rivedClassSuperCallsWithThisArg.errors.txt | 5 +- .../strictModeInConstructor.errors.txt | 12 ++-- .../thisInInvalidContexts.errors.txt | 5 +- .../reference/thisInInvalidContexts.js | 4 +- ...InInvalidContextsExternalModule.errors.txt | 5 +- .../thisInInvalidContextsExternalModule.js | 4 +- .../reference/thisInSuperCall.errors.txt | 7 ++- tests/baselines/reference/thisInSuperCall.js | 4 +- .../reference/thisInSuperCall2.errors.txt | 7 ++- tests/baselines/reference/thisInSuperCall2.js | 4 +- tests/cases/compiler/thisInSuperCall.ts | 2 +- tests/cases/compiler/thisInSuperCall2.ts | 2 +- .../derivedClassParameterProperties.ts | 2 +- .../thisKeyword/thisInInvalidContexts.ts | 2 +- .../thisInInvalidContextsExternalModule.ts | 2 +- 39 files changed, 725 insertions(+), 70 deletions(-) create mode 100644 tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js create mode 100644 tests/baselines/reference/checkSuperCallBeforeThisAccessing1.symbols create mode 100644 tests/baselines/reference/checkSuperCallBeforeThisAccessing1.types create mode 100644 tests/baselines/reference/checkSuperCallBeforeThisAccessing2.errors.txt create mode 100644 tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js create mode 100644 tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js create mode 100644 tests/baselines/reference/checkSuperCallBeforeThisAccessing3.symbols create mode 100644 tests/baselines/reference/checkSuperCallBeforeThisAccessing3.types create mode 100644 tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js create mode 100644 tests/baselines/reference/checkSuperCallBeforeThisAccessing4.symbols create mode 100644 tests/baselines/reference/checkSuperCallBeforeThisAccessing4.types create mode 100644 tests/baselines/reference/checkSuperCallBeforeThisAccessing5.errors.txt create mode 100644 tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js create mode 100644 tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js create mode 100644 tests/baselines/reference/checkSuperCallBeforeThisAccessing6.symbols create mode 100644 tests/baselines/reference/checkSuperCallBeforeThisAccessing6.types create mode 100644 tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js create mode 100644 tests/baselines/reference/checkSuperCallBeforeThisAccessing7.symbols create mode 100644 tests/baselines/reference/checkSuperCallBeforeThisAccessing7.types create mode 100644 tests/baselines/reference/checkSuperCallBeforeThisAccessing8.errors.txt create mode 100644 tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js new file mode 100644 index 00000000000..ec6e6e39ee8 --- /dev/null +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js @@ -0,0 +1,33 @@ +//// [checkSuperCallBeforeThisAccessing1.ts] +class Based { } +class Derived extends Based { + public x: number; + constructor() { + super(); + this; + this.x = 10; + var that = this; + } +} + +//// [checkSuperCallBeforeThisAccessing1.js] +var __extends = (this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +}; +var Based = (function () { + function Based() { + } + return Based; +})(); +var Derived = (function (_super) { + __extends(Derived, _super); + function Derived() { + _super.call(this); + this; + this.x = 10; + var that = this; + } + return Derived; +})(Based); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.symbols b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.symbols new file mode 100644 index 00000000000..008d1156b56 --- /dev/null +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.symbols @@ -0,0 +1,28 @@ +=== tests/cases/compiler/checkSuperCallBeforeThisAccessing1.ts === +class Based { } +>Based : Symbol(Based, Decl(checkSuperCallBeforeThisAccessing1.ts, 0, 0)) + +class Derived extends Based { +>Derived : Symbol(Derived, Decl(checkSuperCallBeforeThisAccessing1.ts, 0, 15)) +>Based : Symbol(Based, Decl(checkSuperCallBeforeThisAccessing1.ts, 0, 0)) + + public x: number; +>x : Symbol(x, Decl(checkSuperCallBeforeThisAccessing1.ts, 1, 29)) + + constructor() { + super(); +>super : Symbol(Based, Decl(checkSuperCallBeforeThisAccessing1.ts, 0, 0)) + + this; +>this : Symbol(Derived, Decl(checkSuperCallBeforeThisAccessing1.ts, 0, 15)) + + this.x = 10; +>this.x : Symbol(x, Decl(checkSuperCallBeforeThisAccessing1.ts, 1, 29)) +>this : Symbol(Derived, Decl(checkSuperCallBeforeThisAccessing1.ts, 0, 15)) +>x : Symbol(x, Decl(checkSuperCallBeforeThisAccessing1.ts, 1, 29)) + + var that = this; +>that : Symbol(that, Decl(checkSuperCallBeforeThisAccessing1.ts, 7, 11)) +>this : Symbol(Derived, Decl(checkSuperCallBeforeThisAccessing1.ts, 0, 15)) + } +} diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.types b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.types new file mode 100644 index 00000000000..f6114d28997 --- /dev/null +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.types @@ -0,0 +1,31 @@ +=== tests/cases/compiler/checkSuperCallBeforeThisAccessing1.ts === +class Based { } +>Based : Based + +class Derived extends Based { +>Derived : Derived +>Based : Based + + public x: number; +>x : number + + constructor() { + super(); +>super() : void +>super : typeof Based + + this; +>this : Derived + + this.x = 10; +>this.x = 10 : number +>this.x : number +>this : Derived +>x : number +>10 : number + + var that = this; +>that : Derived +>this : Derived + } +} diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.errors.txt b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.errors.txt new file mode 100644 index 00000000000..2c9473976a4 --- /dev/null +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.errors.txt @@ -0,0 +1,16 @@ +tests/cases/compiler/checkSuperCallBeforeThisAccessing2.ts(6,9): error TS17006: 'super' has to be called before 'this' accessing. + + +==== tests/cases/compiler/checkSuperCallBeforeThisAccessing2.ts (1 errors) ==== + class Based { } + class Derived extends Based { + public x: number; + constructor() { + this.x = 100; + super(); + ~~~~~~~~ +!!! error TS17006: 'super' has to be called before 'this' accessing. + this.x = 10; + var that = this; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js new file mode 100644 index 00000000000..eb58afd820b --- /dev/null +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js @@ -0,0 +1,33 @@ +//// [checkSuperCallBeforeThisAccessing2.ts] +class Based { } +class Derived extends Based { + public x: number; + constructor() { + this.x = 100; + super(); + this.x = 10; + var that = this; + } +} + +//// [checkSuperCallBeforeThisAccessing2.js] +var __extends = (this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +}; +var Based = (function () { + function Based() { + } + return Based; +})(); +var Derived = (function (_super) { + __extends(Derived, _super); + function Derived() { + this.x = 100; + _super.call(this); + this.x = 10; + var that = this; + } + return Derived; +})(Based); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js new file mode 100644 index 00000000000..2c5652cf95f --- /dev/null +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js @@ -0,0 +1,43 @@ +//// [checkSuperCallBeforeThisAccessing3.ts] +class Based { } +class Derived extends Based { + public x: number; + constructor() { + class innver { + public y: boolean; + constructor() { + this.y = true; + } + } + super(); + this.x = 10; + var that = this; + } +} + +//// [checkSuperCallBeforeThisAccessing3.js] +var __extends = (this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +}; +var Based = (function () { + function Based() { + } + return Based; +})(); +var Derived = (function (_super) { + __extends(Derived, _super); + function Derived() { + var innver = (function () { + function innver() { + this.y = true; + } + return innver; + })(); + _super.call(this); + this.x = 10; + var that = this; + } + return Derived; +})(Based); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.symbols b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.symbols new file mode 100644 index 00000000000..8dd68fc3b74 --- /dev/null +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.symbols @@ -0,0 +1,38 @@ +=== tests/cases/compiler/checkSuperCallBeforeThisAccessing3.ts === +class Based { } +>Based : Symbol(Based, Decl(checkSuperCallBeforeThisAccessing3.ts, 0, 0)) + +class Derived extends Based { +>Derived : Symbol(Derived, Decl(checkSuperCallBeforeThisAccessing3.ts, 0, 15)) +>Based : Symbol(Based, Decl(checkSuperCallBeforeThisAccessing3.ts, 0, 0)) + + public x: number; +>x : Symbol(x, Decl(checkSuperCallBeforeThisAccessing3.ts, 1, 29)) + + constructor() { + class innver { +>innver : Symbol(innver, Decl(checkSuperCallBeforeThisAccessing3.ts, 3, 19)) + + public y: boolean; +>y : Symbol(y, Decl(checkSuperCallBeforeThisAccessing3.ts, 4, 22)) + + constructor() { + this.y = true; +>this.y : Symbol(y, Decl(checkSuperCallBeforeThisAccessing3.ts, 4, 22)) +>this : Symbol(innver, Decl(checkSuperCallBeforeThisAccessing3.ts, 3, 19)) +>y : Symbol(y, Decl(checkSuperCallBeforeThisAccessing3.ts, 4, 22)) + } + } + super(); +>super : Symbol(Based, Decl(checkSuperCallBeforeThisAccessing3.ts, 0, 0)) + + this.x = 10; +>this.x : Symbol(x, Decl(checkSuperCallBeforeThisAccessing3.ts, 1, 29)) +>this : Symbol(Derived, Decl(checkSuperCallBeforeThisAccessing3.ts, 0, 15)) +>x : Symbol(x, Decl(checkSuperCallBeforeThisAccessing3.ts, 1, 29)) + + var that = this; +>that : Symbol(that, Decl(checkSuperCallBeforeThisAccessing3.ts, 12, 11)) +>this : Symbol(Derived, Decl(checkSuperCallBeforeThisAccessing3.ts, 0, 15)) + } +} diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.types b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.types new file mode 100644 index 00000000000..45077a6fe5e --- /dev/null +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.types @@ -0,0 +1,43 @@ +=== tests/cases/compiler/checkSuperCallBeforeThisAccessing3.ts === +class Based { } +>Based : Based + +class Derived extends Based { +>Derived : Derived +>Based : Based + + public x: number; +>x : number + + constructor() { + class innver { +>innver : innver + + public y: boolean; +>y : boolean + + constructor() { + this.y = true; +>this.y = true : boolean +>this.y : boolean +>this : innver +>y : boolean +>true : boolean + } + } + super(); +>super() : void +>super : typeof Based + + this.x = 10; +>this.x = 10 : number +>this.x : number +>this : Derived +>x : number +>10 : number + + var that = this; +>that : Derived +>this : Derived + } +} diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js new file mode 100644 index 00000000000..eacec00c438 --- /dev/null +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js @@ -0,0 +1,52 @@ +//// [checkSuperCallBeforeThisAccessing4.ts] +class Based { } +class Derived extends Based { + public x: number; + constructor() { + (() => { + this; // No error + }); + () => { + this; // No error + }; + (() => { + this; // No error + })(); + super(); + super(); + this.x = 10; + var that = this; + } +} + +//// [checkSuperCallBeforeThisAccessing4.js] +var __extends = (this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +}; +var Based = (function () { + function Based() { + } + return Based; +})(); +var Derived = (function (_super) { + __extends(Derived, _super); + function Derived() { + var _this = this; + (function () { + _this; // No error + }); + (function () { + _this; // No error + }); + (function () { + _this; // No error + })(); + _super.call(this); + _super.call(this); + this.x = 10; + var that = this; + } + return Derived; +})(Based); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.symbols b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.symbols new file mode 100644 index 00000000000..7101280358d --- /dev/null +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.symbols @@ -0,0 +1,43 @@ +=== tests/cases/compiler/checkSuperCallBeforeThisAccessing4.ts === +class Based { } +>Based : Symbol(Based, Decl(checkSuperCallBeforeThisAccessing4.ts, 0, 0)) + +class Derived extends Based { +>Derived : Symbol(Derived, Decl(checkSuperCallBeforeThisAccessing4.ts, 0, 15)) +>Based : Symbol(Based, Decl(checkSuperCallBeforeThisAccessing4.ts, 0, 0)) + + public x: number; +>x : Symbol(x, Decl(checkSuperCallBeforeThisAccessing4.ts, 1, 29)) + + constructor() { + (() => { + this; // No error +>this : Symbol(Derived, Decl(checkSuperCallBeforeThisAccessing4.ts, 0, 15)) + + }); + () => { + this; // No error +>this : Symbol(Derived, Decl(checkSuperCallBeforeThisAccessing4.ts, 0, 15)) + + }; + (() => { + this; // No error +>this : Symbol(Derived, Decl(checkSuperCallBeforeThisAccessing4.ts, 0, 15)) + + })(); + super(); +>super : Symbol(Based, Decl(checkSuperCallBeforeThisAccessing4.ts, 0, 0)) + + super(); +>super : Symbol(Based, Decl(checkSuperCallBeforeThisAccessing4.ts, 0, 0)) + + this.x = 10; +>this.x : Symbol(x, Decl(checkSuperCallBeforeThisAccessing4.ts, 1, 29)) +>this : Symbol(Derived, Decl(checkSuperCallBeforeThisAccessing4.ts, 0, 15)) +>x : Symbol(x, Decl(checkSuperCallBeforeThisAccessing4.ts, 1, 29)) + + var that = this; +>that : Symbol(that, Decl(checkSuperCallBeforeThisAccessing4.ts, 16, 11)) +>this : Symbol(Derived, Decl(checkSuperCallBeforeThisAccessing4.ts, 0, 15)) + } +} diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.types b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.types new file mode 100644 index 00000000000..965d09a4109 --- /dev/null +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.types @@ -0,0 +1,56 @@ +=== tests/cases/compiler/checkSuperCallBeforeThisAccessing4.ts === +class Based { } +>Based : Based + +class Derived extends Based { +>Derived : Derived +>Based : Based + + public x: number; +>x : number + + constructor() { + (() => { +>(() => { this; // No error }) : () => void +>() => { this; // No error } : () => void + + this; // No error +>this : Derived + + }); + () => { +>() => { this; // No error } : () => void + + this; // No error +>this : Derived + + }; + (() => { +>(() => { this; // No error })() : void +>(() => { this; // No error }) : () => void +>() => { this; // No error } : () => void + + this; // No error +>this : Derived + + })(); + super(); +>super() : void +>super : typeof Based + + super(); +>super() : void +>super : typeof Based + + this.x = 10; +>this.x = 10 : number +>this.x : number +>this : Derived +>x : number +>10 : number + + var that = this; +>that : Derived +>this : Derived + } +} diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.errors.txt b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.errors.txt new file mode 100644 index 00000000000..fa5cfd524cb --- /dev/null +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.errors.txt @@ -0,0 +1,13 @@ +tests/cases/compiler/checkSuperCallBeforeThisAccessing5.ts(5,9): error TS17006: 'super' has to be called before 'this' accessing. + + +==== tests/cases/compiler/checkSuperCallBeforeThisAccessing5.ts (1 errors) ==== + class Based { constructor(...arg) { } } + class Derived extends Based { + public x: number; + constructor() { + super(this.x); + ~~~~~~~~~~~~~~ +!!! error TS17006: 'super' has to be called before 'this' accessing. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js new file mode 100644 index 00000000000..489c7200050 --- /dev/null +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js @@ -0,0 +1,31 @@ +//// [checkSuperCallBeforeThisAccessing5.ts] +class Based { constructor(...arg) { } } +class Derived extends Based { + public x: number; + constructor() { + super(this.x); + } +} + +//// [checkSuperCallBeforeThisAccessing5.js] +var __extends = (this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +}; +var Based = (function () { + function Based() { + var arg = []; + for (var _i = 0; _i < arguments.length; _i++) { + arg[_i - 0] = arguments[_i]; + } + } + return Based; +})(); +var Derived = (function (_super) { + __extends(Derived, _super); + function Derived() { + _super.call(this, this.x); + } + return Derived; +})(Based); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js new file mode 100644 index 00000000000..6ad9773bc5f --- /dev/null +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js @@ -0,0 +1,36 @@ +//// [checkSuperCallBeforeThisAccessing6.ts] +class Base { + constructor(...arg) { + } +} +class Super extends Base { + constructor() { + (() => this); // No Error + super(); + } +} + +//// [checkSuperCallBeforeThisAccessing6.js] +var __extends = (this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +}; +var Base = (function () { + function Base() { + var arg = []; + for (var _i = 0; _i < arguments.length; _i++) { + arg[_i - 0] = arguments[_i]; + } + } + return Base; +})(); +var Super = (function (_super) { + __extends(Super, _super); + function Super() { + var _this = this; + (function () { return _this; }); // No Error + _super.call(this); + } + return Super; +})(Base); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.symbols b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.symbols new file mode 100644 index 00000000000..84bac5775ec --- /dev/null +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.symbols @@ -0,0 +1,20 @@ +=== tests/cases/compiler/checkSuperCallBeforeThisAccessing6.ts === +class Base { +>Base : Symbol(Base, Decl(checkSuperCallBeforeThisAccessing6.ts, 0, 0)) + + constructor(...arg) { +>arg : Symbol(arg, Decl(checkSuperCallBeforeThisAccessing6.ts, 1, 16)) + } +} +class Super extends Base { +>Super : Symbol(Super, Decl(checkSuperCallBeforeThisAccessing6.ts, 3, 1)) +>Base : Symbol(Base, Decl(checkSuperCallBeforeThisAccessing6.ts, 0, 0)) + + constructor() { + (() => this); // No Error +>this : Symbol(Super, Decl(checkSuperCallBeforeThisAccessing6.ts, 3, 1)) + + super(); +>super : Symbol(Base, Decl(checkSuperCallBeforeThisAccessing6.ts, 0, 0)) + } +} diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.types b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.types new file mode 100644 index 00000000000..8e2d285d85b --- /dev/null +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.types @@ -0,0 +1,23 @@ +=== tests/cases/compiler/checkSuperCallBeforeThisAccessing6.ts === +class Base { +>Base : Base + + constructor(...arg) { +>arg : any[] + } +} +class Super extends Base { +>Super : Super +>Base : Base + + constructor() { + (() => this); // No Error +>(() => this) : () => Super +>() => this : () => Super +>this : Super + + super(); +>super() : void +>super : typeof Base + } +} diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js new file mode 100644 index 00000000000..eafc662085f --- /dev/null +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js @@ -0,0 +1,30 @@ +//// [checkSuperCallBeforeThisAccessing7.ts] +class Base { + constructor(func: ()=>Base) { + } +} +class Super extends Base { + constructor() { + super((() => this)); // No error + } +} + +//// [checkSuperCallBeforeThisAccessing7.js] +var __extends = (this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +}; +var Base = (function () { + function Base(func) { + } + return Base; +})(); +var Super = (function (_super) { + __extends(Super, _super); + function Super() { + var _this = this; + _super.call(this, (function () { return _this; })); // No error + } + return Super; +})(Base); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.symbols b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.symbols new file mode 100644 index 00000000000..3611429d2b2 --- /dev/null +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.symbols @@ -0,0 +1,19 @@ +=== tests/cases/compiler/checkSuperCallBeforeThisAccessing7.ts === +class Base { +>Base : Symbol(Base, Decl(checkSuperCallBeforeThisAccessing7.ts, 0, 0)) + + constructor(func: ()=>Base) { +>func : Symbol(func, Decl(checkSuperCallBeforeThisAccessing7.ts, 1, 16)) +>Base : Symbol(Base, Decl(checkSuperCallBeforeThisAccessing7.ts, 0, 0)) + } +} +class Super extends Base { +>Super : Symbol(Super, Decl(checkSuperCallBeforeThisAccessing7.ts, 3, 1)) +>Base : Symbol(Base, Decl(checkSuperCallBeforeThisAccessing7.ts, 0, 0)) + + constructor() { + super((() => this)); // No error +>super : Symbol(Base, Decl(checkSuperCallBeforeThisAccessing7.ts, 0, 0)) +>this : Symbol(Super, Decl(checkSuperCallBeforeThisAccessing7.ts, 3, 1)) + } +} diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.types b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.types new file mode 100644 index 00000000000..fa5e7dbe857 --- /dev/null +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.types @@ -0,0 +1,22 @@ +=== tests/cases/compiler/checkSuperCallBeforeThisAccessing7.ts === +class Base { +>Base : Base + + constructor(func: ()=>Base) { +>func : () => Base +>Base : Base + } +} +class Super extends Base { +>Super : Super +>Base : Base + + constructor() { + super((() => this)); // No error +>super((() => this)) : void +>super : typeof Base +>(() => this) : () => Super +>() => this : () => Super +>this : Super + } +} diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.errors.txt b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.errors.txt new file mode 100644 index 00000000000..f7c763ee708 --- /dev/null +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.errors.txt @@ -0,0 +1,16 @@ +tests/cases/compiler/checkSuperCallBeforeThisAccessing8.ts(8,9): error TS17006: 'super' has to be called before 'this' accessing. + + +==== tests/cases/compiler/checkSuperCallBeforeThisAccessing8.ts (1 errors) ==== + class Base { + constructor(...arg) { + } + } + class Super extends Base { + constructor() { + var that = this; + super(); + ~~~~~~~~ +!!! error TS17006: 'super' has to be called before 'this' accessing. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js new file mode 100644 index 00000000000..4675d328b38 --- /dev/null +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js @@ -0,0 +1,35 @@ +//// [checkSuperCallBeforeThisAccessing8.ts] +class Base { + constructor(...arg) { + } +} +class Super extends Base { + constructor() { + var that = this; + super(); + } +} + +//// [checkSuperCallBeforeThisAccessing8.js] +var __extends = (this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +}; +var Base = (function () { + function Base() { + var arg = []; + for (var _i = 0; _i < arguments.length; _i++) { + arg[_i - 0] = arguments[_i]; + } + } + return Base; +})(); +var Super = (function (_super) { + __extends(Super, _super); + function Super() { + var that = this; + _super.call(this); + } + return Super; +})(Base); diff --git a/tests/baselines/reference/classUpdateTests.errors.txt b/tests/baselines/reference/classUpdateTests.errors.txt index 59e9bc9ced1..55965756410 100644 --- a/tests/baselines/reference/classUpdateTests.errors.txt +++ b/tests/baselines/reference/classUpdateTests.errors.txt @@ -1,11 +1,11 @@ tests/cases/compiler/classUpdateTests.ts(34,2): error TS2377: Constructors for derived classes must contain a 'super' call. tests/cases/compiler/classUpdateTests.ts(43,18): error TS2335: 'super' can only be referenced in a derived class. -tests/cases/compiler/classUpdateTests.ts(57,2): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. +tests/cases/compiler/classUpdateTests.ts(59,3): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. tests/cases/compiler/classUpdateTests.ts(63,7): error TS2415: Class 'L' incorrectly extends base class 'G'. Property 'p1' is private in type 'L' but not in type 'G'. tests/cases/compiler/classUpdateTests.ts(69,7): error TS2415: Class 'M' incorrectly extends base class 'G'. Property 'p1' is private in type 'M' but not in type 'G'. -tests/cases/compiler/classUpdateTests.ts(70,2): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. +tests/cases/compiler/classUpdateTests.ts(72,3): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. tests/cases/compiler/classUpdateTests.ts(93,3): error TS1128: Declaration or statement expected. tests/cases/compiler/classUpdateTests.ts(95,1): error TS1128: Declaration or statement expected. tests/cases/compiler/classUpdateTests.ts(99,3): error TS1128: Declaration or statement expected. @@ -80,14 +80,11 @@ tests/cases/compiler/classUpdateTests.ts(113,1): error TS1128: Declaration or st class K extends G { constructor(public p1:number) { // ERROR - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var i = 0; - ~~~~~~~~~~~~ super(); - ~~~~~~~~~~ - } - ~~ + ~~~~~~~~ !!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. + } } class L extends G { @@ -104,14 +101,11 @@ tests/cases/compiler/classUpdateTests.ts(113,1): error TS1128: Declaration or st !!! error TS2415: Class 'M' incorrectly extends base class 'G'. !!! error TS2415: Property 'p1' is private in type 'M' but not in type 'G'. constructor(private p1:number) { // ERROR - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var i = 0; - ~~~~~~~~~~~~ super(); - ~~~~~~~~~~ - } - ~~ + ~~~~~~~~ !!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. + } } // diff --git a/tests/baselines/reference/derivedClassParameterProperties.errors.txt b/tests/baselines/reference/derivedClassParameterProperties.errors.txt index 0dba0d24cb0..7b57951d493 100644 --- a/tests/baselines/reference/derivedClassParameterProperties.errors.txt +++ b/tests/baselines/reference/derivedClassParameterProperties.errors.txt @@ -1,10 +1,11 @@ -tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(15,5): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. -tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(30,5): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. -tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(56,5): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. -tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(79,5): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(17,9): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(32,9): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(49,9): error TS17006: 'super' has to be called before 'this' accessing. +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(59,9): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(82,9): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. -==== tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts (4 errors) ==== +==== tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts (5 errors) ==== // ordering of super calls in derived constructors matters depending on other class contents class Base { @@ -20,14 +21,11 @@ tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassP class Derived2 extends Base { constructor(public y: string) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var a = 1; - ~~~~~~~~~~~~~~~~~~ super(); // error - ~~~~~~~~~~~~~~~~~~~~~~~~~ - } - ~~~~~ + ~~~~~~~~ !!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. + } } class Derived3 extends Base { @@ -40,14 +38,11 @@ tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassP class Derived4 extends Base { a = 1; constructor(y: string) { - ~~~~~~~~~~~~~~~~~~~~~~~~ var b = 2; - ~~~~~~~~~~~~~~~~~~ super(); // error - ~~~~~~~~~~~~~~~~~~~~~~~~~ - } - ~~~~~ + ~~~~~~~~ !!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. + } } class Derived5 extends Base { @@ -63,7 +58,9 @@ tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassP constructor(y: string) { this.a = 1; var b = 2; - super(); // ok + super(); // error: "super" has to be called before "this" accessing + ~~~~~~~~ +!!! error TS17006: 'super' has to be called before 'this' accessing. } } @@ -71,16 +68,12 @@ tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassP a = 1; b: number; constructor(y: string) { - ~~~~~~~~~~~~~~~~~~~~~~~~ this.a = 3; - ~~~~~~~~~~~~~~~~~~~ this.b = 3; - ~~~~~~~~~~~~~~~~~~~ super(); // error - ~~~~~~~~~~~~~~~~~~~~~~~~~ - } - ~~~~~ + ~~~~~~~~ !!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. + } } class Derived8 extends Base { @@ -100,16 +93,12 @@ tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassP a = 1; b: number; constructor(y: string) { - ~~~~~~~~~~~~~~~~~~~~~~~~ this.a = 3; - ~~~~~~~~~~~~~~~~~~~ this.b = 3; - ~~~~~~~~~~~~~~~~~~~ super(); // error - ~~~~~~~~~~~~~~~~~~~~~~~~~ - } - ~~~~~ + ~~~~~~~~ !!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. + } } class Derived10 extends Base2 { diff --git a/tests/baselines/reference/derivedClassParameterProperties.js b/tests/baselines/reference/derivedClassParameterProperties.js index 55c0a312b71..0d4a476af12 100644 --- a/tests/baselines/reference/derivedClassParameterProperties.js +++ b/tests/baselines/reference/derivedClassParameterProperties.js @@ -47,7 +47,7 @@ class Derived6 extends Base { constructor(y: string) { this.a = 1; var b = 2; - super(); // ok + super(); // error: "super" has to be called before "this" accessing } } @@ -155,7 +155,7 @@ var Derived6 = (function (_super) { function Derived6(y) { this.a = 1; var b = 2; - _super.call(this); // ok + _super.call(this); // error: "super" has to be called before "this" accessing } return Derived6; })(Base); diff --git a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.errors.txt b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.errors.txt index ef43d1d6f52..d8b724e3d0f 100644 --- a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.errors.txt +++ b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.errors.txt @@ -1,8 +1,9 @@ +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts(8,9): error TS17006: 'super' has to be called before 'this' accessing. tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts(14,15): error TS2332: 'this' cannot be referenced in current location. tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts(20,21): error TS2332: 'this' cannot be referenced in current location. -==== tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts (2 errors) ==== +==== tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts (3 errors) ==== class Base { x: string; constructor(a) { } @@ -11,6 +12,8 @@ tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassS class Derived extends Base { constructor() { super(this); // ok + ~~~~~~~~~~~~ +!!! error TS17006: 'super' has to be called before 'this' accessing. } } diff --git a/tests/baselines/reference/strictModeInConstructor.errors.txt b/tests/baselines/reference/strictModeInConstructor.errors.txt index 9a80732842a..3c38530cc12 100644 --- a/tests/baselines/reference/strictModeInConstructor.errors.txt +++ b/tests/baselines/reference/strictModeInConstructor.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/strictModeInConstructor.ts(27,5): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. +tests/cases/compiler/strictModeInConstructor.ts(29,9): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. ==== tests/cases/compiler/strictModeInConstructor.ts (1 errors) ==== @@ -29,16 +29,12 @@ tests/cases/compiler/strictModeInConstructor.ts(27,5): error TS2376: A 'super' c public s: number = 9; constructor () { - ~~~~~~~~~~~~~~~~ var x = 1; // Error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ super(); - ~~~~~~~~~~~~~~~~ - "use strict"; - ~~~~~~~~~~~~~~~~~~~~~ - } - ~~~~~ + ~~~~~~~~ !!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. + "use strict"; + } } class Bs extends A { diff --git a/tests/baselines/reference/thisInInvalidContexts.errors.txt b/tests/baselines/reference/thisInInvalidContexts.errors.txt index 76b90ed7c20..0200ae6f84c 100644 --- a/tests/baselines/reference/thisInInvalidContexts.errors.txt +++ b/tests/baselines/reference/thisInInvalidContexts.errors.txt @@ -1,4 +1,5 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(3,16): error TS2334: 'this' cannot be referenced in a static property initializer. +tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(14,9): error TS17006: 'super' has to be called before 'this' accessing. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(22,15): error TS2332: 'this' cannot be referenced in current location. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(28,13): error TS2331: 'this' cannot be referenced in a module or namespace body. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(36,13): error TS2526: A 'this' type is available only in a non-static member of a class or interface. @@ -23,7 +24,9 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(45,9): t; //'this' in optional super call constructor() { - super(this); // OK + super(this); // Error + ~~~~~~~~~~~~ +!!! error TS17006: 'super' has to be called before 'this' accessing. } } diff --git a/tests/baselines/reference/thisInInvalidContexts.js b/tests/baselines/reference/thisInInvalidContexts.js index d5ba69ff536..66cbdb9682c 100644 --- a/tests/baselines/reference/thisInInvalidContexts.js +++ b/tests/baselines/reference/thisInInvalidContexts.js @@ -12,7 +12,7 @@ class ClassWithNoInitializer extends BaseErrClass { t; //'this' in optional super call constructor() { - super(this); // OK + super(this); // Error } } @@ -70,7 +70,7 @@ var ClassWithNoInitializer = (function (_super) { __extends(ClassWithNoInitializer, _super); //'this' in optional super call function ClassWithNoInitializer() { - _super.call(this, this); // OK + _super.call(this, this); // Error } return ClassWithNoInitializer; })(BaseErrClass); diff --git a/tests/baselines/reference/thisInInvalidContextsExternalModule.errors.txt b/tests/baselines/reference/thisInInvalidContextsExternalModule.errors.txt index 2aa474d4cdc..ced387a453b 100644 --- a/tests/baselines/reference/thisInInvalidContextsExternalModule.errors.txt +++ b/tests/baselines/reference/thisInInvalidContextsExternalModule.errors.txt @@ -1,4 +1,5 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(3,16): error TS2334: 'this' cannot be referenced in a static property initializer. +tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(14,9): error TS17006: 'super' has to be called before 'this' accessing. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(22,15): error TS2332: 'this' cannot be referenced in current location. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(28,13): error TS2331: 'this' cannot be referenced in a module or namespace body. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(36,13): error TS2526: A 'this' type is available only in a non-static member of a class or interface. @@ -24,7 +25,9 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalMod t; //'this' in optional super call constructor() { - super(this); // OK + super(this); // error: "super" has to be called before "this" accessing + ~~~~~~~~~~~~ +!!! error TS17006: 'super' has to be called before 'this' accessing. } } diff --git a/tests/baselines/reference/thisInInvalidContextsExternalModule.js b/tests/baselines/reference/thisInInvalidContextsExternalModule.js index 31a2e995a18..df3abd156de 100644 --- a/tests/baselines/reference/thisInInvalidContextsExternalModule.js +++ b/tests/baselines/reference/thisInInvalidContextsExternalModule.js @@ -12,7 +12,7 @@ class ClassWithNoInitializer extends BaseErrClass { t; //'this' in optional super call constructor() { - super(this); // OK + super(this); // error: "super" has to be called before "this" accessing } } @@ -71,7 +71,7 @@ var ClassWithNoInitializer = (function (_super) { __extends(ClassWithNoInitializer, _super); //'this' in optional super call function ClassWithNoInitializer() { - _super.call(this, this); // OK + _super.call(this, this); // error: "super" has to be called before "this" accessing } return ClassWithNoInitializer; })(BaseErrClass); diff --git a/tests/baselines/reference/thisInSuperCall.errors.txt b/tests/baselines/reference/thisInSuperCall.errors.txt index 57255aa9582..d0be13d8adc 100644 --- a/tests/baselines/reference/thisInSuperCall.errors.txt +++ b/tests/baselines/reference/thisInSuperCall.errors.txt @@ -1,15 +1,18 @@ +tests/cases/compiler/thisInSuperCall.ts(7,9): error TS17006: 'super' has to be called before 'this' accessing. tests/cases/compiler/thisInSuperCall.ts(14,15): error TS2332: 'this' cannot be referenced in current location. tests/cases/compiler/thisInSuperCall.ts(20,15): error TS2332: 'this' cannot be referenced in current location. -==== tests/cases/compiler/thisInSuperCall.ts (2 errors) ==== +==== tests/cases/compiler/thisInSuperCall.ts (3 errors) ==== class Base { constructor(x: any) {} } class Foo extends Base { constructor() { - super(this); // no error + super(this); // error: "super" has to be called before "this" accessing + ~~~~~~~~~~~~ +!!! error TS17006: 'super' has to be called before 'this' accessing. } } diff --git a/tests/baselines/reference/thisInSuperCall.js b/tests/baselines/reference/thisInSuperCall.js index f7d7ca4e4fd..0bcaf35fcbf 100644 --- a/tests/baselines/reference/thisInSuperCall.js +++ b/tests/baselines/reference/thisInSuperCall.js @@ -5,7 +5,7 @@ class Base { class Foo extends Base { constructor() { - super(this); // no error + super(this); // error: "super" has to be called before "this" accessing } } @@ -36,7 +36,7 @@ var Base = (function () { var Foo = (function (_super) { __extends(Foo, _super); function Foo() { - _super.call(this, this); // no error + _super.call(this, this); // error: "super" has to be called before "this" accessing } return Foo; })(Base); diff --git a/tests/baselines/reference/thisInSuperCall2.errors.txt b/tests/baselines/reference/thisInSuperCall2.errors.txt index d3a94f79487..0559f83eb90 100644 --- a/tests/baselines/reference/thisInSuperCall2.errors.txt +++ b/tests/baselines/reference/thisInSuperCall2.errors.txt @@ -1,7 +1,8 @@ +tests/cases/compiler/thisInSuperCall2.ts(8,9): error TS17006: 'super' has to be called before 'this' accessing. tests/cases/compiler/thisInSuperCall2.ts(16,15): error TS2332: 'this' cannot be referenced in current location. -==== tests/cases/compiler/thisInSuperCall2.ts (1 errors) ==== +==== tests/cases/compiler/thisInSuperCall2.ts (2 errors) ==== class Base { constructor(a: any) {} } @@ -9,7 +10,9 @@ tests/cases/compiler/thisInSuperCall2.ts(16,15): error TS2332: 'this' cannot be class Foo extends Base { public x: number; constructor() { - super(this); // no error + super(this); // error: "super" has to be called before "this" accessing + ~~~~~~~~~~~~ +!!! error TS17006: 'super' has to be called before 'this' accessing. } } diff --git a/tests/baselines/reference/thisInSuperCall2.js b/tests/baselines/reference/thisInSuperCall2.js index a9bbeda9fe7..8957a089210 100644 --- a/tests/baselines/reference/thisInSuperCall2.js +++ b/tests/baselines/reference/thisInSuperCall2.js @@ -6,7 +6,7 @@ class Base { class Foo extends Base { public x: number; constructor() { - super(this); // no error + super(this); // error: "super" has to be called before "this" accessing } } @@ -33,7 +33,7 @@ var Base = (function () { var Foo = (function (_super) { __extends(Foo, _super); function Foo() { - _super.call(this, this); // no error + _super.call(this, this); // error: "super" has to be called before "this" accessing } return Foo; })(Base); diff --git a/tests/cases/compiler/thisInSuperCall.ts b/tests/cases/compiler/thisInSuperCall.ts index 6a54e9ac6f1..b7df7cbafad 100644 --- a/tests/cases/compiler/thisInSuperCall.ts +++ b/tests/cases/compiler/thisInSuperCall.ts @@ -4,7 +4,7 @@ class Base { class Foo extends Base { constructor() { - super(this); // no error + super(this); // error: "super" has to be called before "this" accessing } } diff --git a/tests/cases/compiler/thisInSuperCall2.ts b/tests/cases/compiler/thisInSuperCall2.ts index 5de7c34cf32..2869ab9a805 100644 --- a/tests/cases/compiler/thisInSuperCall2.ts +++ b/tests/cases/compiler/thisInSuperCall2.ts @@ -5,7 +5,7 @@ class Base { class Foo extends Base { public x: number; constructor() { - super(this); // no error + super(this); // error: "super" has to be called before "this" accessing } } diff --git a/tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts b/tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts index edfd7ab4f8c..a054ed0f683 100644 --- a/tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts +++ b/tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts @@ -46,7 +46,7 @@ class Derived6 extends Base { constructor(y: string) { this.a = 1; var b = 2; - super(); // ok + super(); // error: "super" has to be called before "this" accessing } } diff --git a/tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts b/tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts index 0afbc450040..2b929318c13 100644 --- a/tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts +++ b/tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts @@ -11,7 +11,7 @@ class ClassWithNoInitializer extends BaseErrClass { t; //'this' in optional super call constructor() { - super(this); // OK + super(this); // Error } } diff --git a/tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts b/tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts index 513e56977df..e3d8ce9f5fc 100644 --- a/tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts +++ b/tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts @@ -11,7 +11,7 @@ class ClassWithNoInitializer extends BaseErrClass { t; //'this' in optional super call constructor() { - super(this); // OK + super(this); // error: "super" has to be called before "this" accessing } } From 680a8932203ea345f74c7e81b87077fab225f128 Mon Sep 17 00:00:00 2001 From: Yui T Date: Tue, 15 Sep 2015 17:19:19 -0700 Subject: [PATCH 009/160] Add tests --- .../compiler/checkSuperCallBeforeThisAccessing8.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 tests/cases/compiler/checkSuperCallBeforeThisAccessing8.ts diff --git a/tests/cases/compiler/checkSuperCallBeforeThisAccessing8.ts b/tests/cases/compiler/checkSuperCallBeforeThisAccessing8.ts new file mode 100644 index 00000000000..230b40fc24d --- /dev/null +++ b/tests/cases/compiler/checkSuperCallBeforeThisAccessing8.ts @@ -0,0 +1,10 @@ +class Base { + constructor(...arg) { + } +} +class Super extends Base { + constructor() { + var that = this; + super(); + } +} \ No newline at end of file From a7688592b2aef3678f10ef246d0f2e49854ae1d1 Mon Sep 17 00:00:00 2001 From: Yui T Date: Tue, 6 Oct 2015 19:46:46 -0700 Subject: [PATCH 010/160] Address PR feedback Conflicts: src/compiler/diagnosticInformationMap.generated.ts src/compiler/diagnosticMessages.json src/compiler/types.ts --- src/compiler/checker.ts | 17 ++++++++++------- src/compiler/diagnosticMessages.json | 4 ++-- src/compiler/types.ts | 3 ++- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index b328a4c8366..fb47d6bd57c 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -6859,9 +6859,8 @@ namespace ts { // (()=>this); // No Error // super(); // } - if ((container).hasSeenSuperBeforeThis === undefined) { - (container).hasSeenSuperBeforeThis = false; - } + let nodeLinks = getNodeLinks(container); + nodeLinks.flags |= NodeCheckFlags.HasSeenThisCall; } // Now skip arrow functions to get the "real" owner of 'this'. @@ -9605,8 +9604,12 @@ namespace ts { const signature = getResolvedSignature(node); if (node.expression.kind === SyntaxKind.SuperKeyword) { let containgFunction = getContainingFunction(node.expression); - if (containgFunction && containgFunction.kind === SyntaxKind.Constructor && (containgFunction).hasSeenSuperBeforeThis === undefined) { - (containgFunction).hasSeenSuperBeforeThis = true; + + if (containgFunction && containgFunction.kind === SyntaxKind.Constructor) { + let nodeLinks = getNodeLinks(containgFunction); + if (!(nodeLinks.flags & NodeCheckFlags.HasSeenThisCall)) { + nodeLinks.flags |= NodeCheckFlags.HasSeenSuperBeforeThis; + } } return voidType; } @@ -11208,9 +11211,9 @@ namespace ts { markThisReferencesAsErrors(superCallStatement.expression); } } - else if (!node.hasSeenSuperBeforeThis) { + else if (!(getNodeCheckFlags(node) & NodeCheckFlags.HasSeenSuperBeforeThis)){ // In ES6, super inside constructor of class-declaration has to precede "this" accessing - error(superCallStatement, Diagnostics.super_has_to_be_called_before_this_accessing); + error(superCallStatement, Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class); } } else if (baseConstructorType !== nullType) { diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 51a4e2c6c8f..4bf83bd3e45 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -2540,8 +2540,8 @@ "category": "Error", "code": 17007 }, - "'super' has to be called before 'this' accessing.": { + "'super' must be called before accessing 'this' in the constructor of a derived class.": { "category": "Error", - "code": 17006 + "code": 17008 } } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 5a216f8bbcd..9aded35059a 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -695,7 +695,6 @@ namespace ts { // @kind(SyntaxKind.Constructor) export interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement { body?: FunctionBody; - hasSeenSuperBeforeThis: boolean; // TODDO (yuisu): comment } // For when we encounter a semicolon in a class declaration. ES6 allows these as class elements. @@ -2031,6 +2030,8 @@ namespace ts { BlockScopedBindingInLoop = 0x00004000, LexicalModuleMergesWithClass = 0x00008000, // Instantiated lexical module declaration is merged with a previous class declaration. LoopWithBlockScopedBindingCapturedInFunction = 0x00010000, // Loop that contains block scoped variable captured in closure + HasSeenSuperBeforeThis = 0x00020000, // Set during the binding if the 'super' is used before 'this' in constructor function + HasSeenThisCall = 0x00040000, // Set during the binding when encounter 'this' } /* @internal */ From c0f818f1a2c0025a0e06983698ee354ffe6ab862 Mon Sep 17 00:00:00 2001 From: Yui T Date: Tue, 6 Oct 2015 19:47:17 -0700 Subject: [PATCH 011/160] Update baseline for new message --- .../reference/checkSuperCallBeforeThisAccessing2.errors.txt | 4 ++-- .../reference/checkSuperCallBeforeThisAccessing5.errors.txt | 4 ++-- .../reference/checkSuperCallBeforeThisAccessing8.errors.txt | 4 ++-- .../reference/derivedClassParameterProperties.errors.txt | 4 ++-- .../reference/derivedClassSuperCallsWithThisArg.errors.txt | 4 ++-- tests/baselines/reference/thisInInvalidContexts.errors.txt | 4 ++-- .../reference/thisInInvalidContextsExternalModule.errors.txt | 4 ++-- tests/baselines/reference/thisInSuperCall.errors.txt | 4 ++-- tests/baselines/reference/thisInSuperCall2.errors.txt | 4 ++-- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.errors.txt b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.errors.txt index 2c9473976a4..6fdb2e3e394 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.errors.txt +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/checkSuperCallBeforeThisAccessing2.ts(6,9): error TS17006: 'super' has to be called before 'this' accessing. +tests/cases/compiler/checkSuperCallBeforeThisAccessing2.ts(6,9): error TS17006: 'super' must be called before accessing 'this' in the constructor of a derived class. ==== tests/cases/compiler/checkSuperCallBeforeThisAccessing2.ts (1 errors) ==== @@ -9,7 +9,7 @@ tests/cases/compiler/checkSuperCallBeforeThisAccessing2.ts(6,9): error TS17006: this.x = 100; super(); ~~~~~~~~ -!!! error TS17006: 'super' has to be called before 'this' accessing. +!!! error TS17006: 'super' must be called before accessing 'this' in the constructor of a derived class. this.x = 10; var that = this; } diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.errors.txt b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.errors.txt index fa5cfd524cb..edd7745a03c 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.errors.txt +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/checkSuperCallBeforeThisAccessing5.ts(5,9): error TS17006: 'super' has to be called before 'this' accessing. +tests/cases/compiler/checkSuperCallBeforeThisAccessing5.ts(5,9): error TS17006: 'super' must be called before accessing 'this' in the constructor of a derived class. ==== tests/cases/compiler/checkSuperCallBeforeThisAccessing5.ts (1 errors) ==== @@ -8,6 +8,6 @@ tests/cases/compiler/checkSuperCallBeforeThisAccessing5.ts(5,9): error TS17006: constructor() { super(this.x); ~~~~~~~~~~~~~~ -!!! error TS17006: 'super' has to be called before 'this' accessing. +!!! error TS17006: 'super' must be called before accessing 'this' in the constructor of a derived class. } } \ No newline at end of file diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.errors.txt b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.errors.txt index f7c763ee708..39db87d41a1 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.errors.txt +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/checkSuperCallBeforeThisAccessing8.ts(8,9): error TS17006: 'super' has to be called before 'this' accessing. +tests/cases/compiler/checkSuperCallBeforeThisAccessing8.ts(8,9): error TS17006: 'super' must be called before accessing 'this' in the constructor of a derived class. ==== tests/cases/compiler/checkSuperCallBeforeThisAccessing8.ts (1 errors) ==== @@ -11,6 +11,6 @@ tests/cases/compiler/checkSuperCallBeforeThisAccessing8.ts(8,9): error TS17006: var that = this; super(); ~~~~~~~~ -!!! error TS17006: 'super' has to be called before 'this' accessing. +!!! error TS17006: 'super' must be called before accessing 'this' in the constructor of a derived class. } } \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassParameterProperties.errors.txt b/tests/baselines/reference/derivedClassParameterProperties.errors.txt index 7b57951d493..c5d853dec56 100644 --- a/tests/baselines/reference/derivedClassParameterProperties.errors.txt +++ b/tests/baselines/reference/derivedClassParameterProperties.errors.txt @@ -1,6 +1,6 @@ tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(17,9): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(32,9): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. -tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(49,9): error TS17006: 'super' has to be called before 'this' accessing. +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(49,9): error TS17006: 'super' must be called before accessing 'this' in the constructor of a derived class. tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(59,9): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(82,9): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. @@ -60,7 +60,7 @@ tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassP var b = 2; super(); // error: "super" has to be called before "this" accessing ~~~~~~~~ -!!! error TS17006: 'super' has to be called before 'this' accessing. +!!! error TS17006: 'super' must be called before accessing 'this' in the constructor of a derived class. } } diff --git a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.errors.txt b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.errors.txt index d8b724e3d0f..e72dbe293e9 100644 --- a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.errors.txt +++ b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts(8,9): error TS17006: 'super' has to be called before 'this' accessing. +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts(8,9): error TS17006: 'super' must be called before accessing 'this' in the constructor of a derived class. tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts(14,15): error TS2332: 'this' cannot be referenced in current location. tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts(20,21): error TS2332: 'this' cannot be referenced in current location. @@ -13,7 +13,7 @@ tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassS constructor() { super(this); // ok ~~~~~~~~~~~~ -!!! error TS17006: 'super' has to be called before 'this' accessing. +!!! error TS17006: 'super' must be called before accessing 'this' in the constructor of a derived class. } } diff --git a/tests/baselines/reference/thisInInvalidContexts.errors.txt b/tests/baselines/reference/thisInInvalidContexts.errors.txt index 0200ae6f84c..09fa952e2c2 100644 --- a/tests/baselines/reference/thisInInvalidContexts.errors.txt +++ b/tests/baselines/reference/thisInInvalidContexts.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(3,16): error TS2334: 'this' cannot be referenced in a static property initializer. -tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(14,9): error TS17006: 'super' has to be called before 'this' accessing. +tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(14,9): error TS17006: 'super' must be called before accessing 'this' in the constructor of a derived class. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(22,15): error TS2332: 'this' cannot be referenced in current location. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(28,13): error TS2331: 'this' cannot be referenced in a module or namespace body. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(36,13): error TS2526: A 'this' type is available only in a non-static member of a class or interface. @@ -26,7 +26,7 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(45,9): constructor() { super(this); // Error ~~~~~~~~~~~~ -!!! error TS17006: 'super' has to be called before 'this' accessing. +!!! error TS17006: 'super' must be called before accessing 'this' in the constructor of a derived class. } } diff --git a/tests/baselines/reference/thisInInvalidContextsExternalModule.errors.txt b/tests/baselines/reference/thisInInvalidContextsExternalModule.errors.txt index ced387a453b..9909c0cbfe9 100644 --- a/tests/baselines/reference/thisInInvalidContextsExternalModule.errors.txt +++ b/tests/baselines/reference/thisInInvalidContextsExternalModule.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(3,16): error TS2334: 'this' cannot be referenced in a static property initializer. -tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(14,9): error TS17006: 'super' has to be called before 'this' accessing. +tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(14,9): error TS17006: 'super' must be called before accessing 'this' in the constructor of a derived class. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(22,15): error TS2332: 'this' cannot be referenced in current location. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(28,13): error TS2331: 'this' cannot be referenced in a module or namespace body. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(36,13): error TS2526: A 'this' type is available only in a non-static member of a class or interface. @@ -27,7 +27,7 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalMod constructor() { super(this); // error: "super" has to be called before "this" accessing ~~~~~~~~~~~~ -!!! error TS17006: 'super' has to be called before 'this' accessing. +!!! error TS17006: 'super' must be called before accessing 'this' in the constructor of a derived class. } } diff --git a/tests/baselines/reference/thisInSuperCall.errors.txt b/tests/baselines/reference/thisInSuperCall.errors.txt index d0be13d8adc..ea4b6fd742a 100644 --- a/tests/baselines/reference/thisInSuperCall.errors.txt +++ b/tests/baselines/reference/thisInSuperCall.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/thisInSuperCall.ts(7,9): error TS17006: 'super' has to be called before 'this' accessing. +tests/cases/compiler/thisInSuperCall.ts(7,9): error TS17006: 'super' must be called before accessing 'this' in the constructor of a derived class. tests/cases/compiler/thisInSuperCall.ts(14,15): error TS2332: 'this' cannot be referenced in current location. tests/cases/compiler/thisInSuperCall.ts(20,15): error TS2332: 'this' cannot be referenced in current location. @@ -12,7 +12,7 @@ tests/cases/compiler/thisInSuperCall.ts(20,15): error TS2332: 'this' cannot be r constructor() { super(this); // error: "super" has to be called before "this" accessing ~~~~~~~~~~~~ -!!! error TS17006: 'super' has to be called before 'this' accessing. +!!! error TS17006: 'super' must be called before accessing 'this' in the constructor of a derived class. } } diff --git a/tests/baselines/reference/thisInSuperCall2.errors.txt b/tests/baselines/reference/thisInSuperCall2.errors.txt index 0559f83eb90..7130ee8deb8 100644 --- a/tests/baselines/reference/thisInSuperCall2.errors.txt +++ b/tests/baselines/reference/thisInSuperCall2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/thisInSuperCall2.ts(8,9): error TS17006: 'super' has to be called before 'this' accessing. +tests/cases/compiler/thisInSuperCall2.ts(8,9): error TS17006: 'super' must be called before accessing 'this' in the constructor of a derived class. tests/cases/compiler/thisInSuperCall2.ts(16,15): error TS2332: 'this' cannot be referenced in current location. @@ -12,7 +12,7 @@ tests/cases/compiler/thisInSuperCall2.ts(16,15): error TS2332: 'this' cannot be constructor() { super(this); // error: "super" has to be called before "this" accessing ~~~~~~~~~~~~ -!!! error TS17006: 'super' has to be called before 'this' accessing. +!!! error TS17006: 'super' must be called before accessing 'this' in the constructor of a derived class. } } From 319a9cd4309f69e3dcac367eb87e3a1e46dbf6a5 Mon Sep 17 00:00:00 2001 From: Yui T Date: Mon, 30 Nov 2015 10:30:03 -0800 Subject: [PATCH 012/160] Update baseline with new error message number and fix space and comment --- src/compiler/checker.ts | 9 ++++----- src/compiler/types.ts | 2 +- .../checkSuperCallBeforeThisAccessing1.types | 8 ++++---- .../checkSuperCallBeforeThisAccessing2.errors.txt | 4 ++-- .../checkSuperCallBeforeThisAccessing3.types | 8 ++++---- .../checkSuperCallBeforeThisAccessing4.types | 12 ++++++------ .../checkSuperCallBeforeThisAccessing5.errors.txt | 4 ++-- .../checkSuperCallBeforeThisAccessing6.types | 6 +++--- .../checkSuperCallBeforeThisAccessing7.types | 6 +++--- .../checkSuperCallBeforeThisAccessing8.errors.txt | 4 ++-- .../derivedClassParameterProperties.errors.txt | 4 ++-- .../derivedClassSuperCallsWithThisArg.errors.txt | 4 ++-- .../reference/thisInInvalidContexts.errors.txt | 6 +++--- .../thisInInvalidContextsExternalModule.errors.txt | 6 +++--- tests/baselines/reference/thisInSuperCall.errors.txt | 4 ++-- .../baselines/reference/thisInSuperCall2.errors.txt | 4 ++-- 16 files changed, 45 insertions(+), 46 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index fb47d6bd57c..0488b1b6dd1 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -6848,7 +6848,6 @@ namespace ts { let container = getThisContainer(node, /* includeArrowFunctions */ true); let needToCaptureLexicalThis = false; - if (container.kind === SyntaxKind.Constructor) { // Keep track of whether we have seen "super" before encounter "this" so that // we can report appropriate error later in checkConstructorDeclaration @@ -6859,7 +6858,7 @@ namespace ts { // (()=>this); // No Error // super(); // } - let nodeLinks = getNodeLinks(container); + const nodeLinks = getNodeLinks(container); nodeLinks.flags |= NodeCheckFlags.HasSeenThisCall; } @@ -9603,10 +9602,10 @@ namespace ts { const signature = getResolvedSignature(node); if (node.expression.kind === SyntaxKind.SuperKeyword) { - let containgFunction = getContainingFunction(node.expression); + const containgFunction = getContainingFunction(node.expression); if (containgFunction && containgFunction.kind === SyntaxKind.Constructor) { - let nodeLinks = getNodeLinks(containgFunction); + const nodeLinks = getNodeLinks(containgFunction); if (!(nodeLinks.flags & NodeCheckFlags.HasSeenThisCall)) { nodeLinks.flags |= NodeCheckFlags.HasSeenSuperBeforeThis; } @@ -11211,7 +11210,7 @@ namespace ts { markThisReferencesAsErrors(superCallStatement.expression); } } - else if (!(getNodeCheckFlags(node) & NodeCheckFlags.HasSeenSuperBeforeThis)){ + else if (!(getNodeCheckFlags(node) & NodeCheckFlags.HasSeenSuperBeforeThis)) { // In ES6, super inside constructor of class-declaration has to precede "this" accessing error(superCallStatement, Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class); } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 9aded35059a..9a82891df77 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -2030,7 +2030,7 @@ namespace ts { BlockScopedBindingInLoop = 0x00004000, LexicalModuleMergesWithClass = 0x00008000, // Instantiated lexical module declaration is merged with a previous class declaration. LoopWithBlockScopedBindingCapturedInFunction = 0x00010000, // Loop that contains block scoped variable captured in closure - HasSeenSuperBeforeThis = 0x00020000, // Set during the binding if the 'super' is used before 'this' in constructor function + HasSeenSuperBeforeThis = 0x00020000, // Set during the binding if 'super' is used before 'this' in constructor function HasSeenThisCall = 0x00040000, // Set during the binding when encounter 'this' } diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.types b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.types index f6114d28997..d734b0c6ad0 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.types +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.types @@ -15,17 +15,17 @@ class Derived extends Based { >super : typeof Based this; ->this : Derived +>this : this this.x = 10; >this.x = 10 : number >this.x : number ->this : Derived +>this : this >x : number >10 : number var that = this; ->that : Derived ->this : Derived +>that : this +>this : this } } diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.errors.txt b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.errors.txt index 6fdb2e3e394..e48f43c8662 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.errors.txt +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/checkSuperCallBeforeThisAccessing2.ts(6,9): error TS17006: 'super' must be called before accessing 'this' in the constructor of a derived class. +tests/cases/compiler/checkSuperCallBeforeThisAccessing2.ts(6,9): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. ==== tests/cases/compiler/checkSuperCallBeforeThisAccessing2.ts (1 errors) ==== @@ -9,7 +9,7 @@ tests/cases/compiler/checkSuperCallBeforeThisAccessing2.ts(6,9): error TS17006: this.x = 100; super(); ~~~~~~~~ -!!! error TS17006: 'super' must be called before accessing 'this' in the constructor of a derived class. +!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. this.x = 10; var that = this; } diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.types b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.types index 45077a6fe5e..c4e9e15ed8e 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.types +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.types @@ -20,7 +20,7 @@ class Derived extends Based { this.y = true; >this.y = true : boolean >this.y : boolean ->this : innver +>this : this >y : boolean >true : boolean } @@ -32,12 +32,12 @@ class Derived extends Based { this.x = 10; >this.x = 10 : number >this.x : number ->this : Derived +>this : this >x : number >10 : number var that = this; ->that : Derived ->this : Derived +>that : this +>this : this } } diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.types b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.types index 965d09a4109..f42a0ac8563 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.types +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.types @@ -15,14 +15,14 @@ class Derived extends Based { >() => { this; // No error } : () => void this; // No error ->this : Derived +>this : this }); () => { >() => { this; // No error } : () => void this; // No error ->this : Derived +>this : this }; (() => { @@ -31,7 +31,7 @@ class Derived extends Based { >() => { this; // No error } : () => void this; // No error ->this : Derived +>this : this })(); super(); @@ -45,12 +45,12 @@ class Derived extends Based { this.x = 10; >this.x = 10 : number >this.x : number ->this : Derived +>this : this >x : number >10 : number var that = this; ->that : Derived ->this : Derived +>that : this +>this : this } } diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.errors.txt b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.errors.txt index edd7745a03c..1258101cffc 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.errors.txt +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/checkSuperCallBeforeThisAccessing5.ts(5,9): error TS17006: 'super' must be called before accessing 'this' in the constructor of a derived class. +tests/cases/compiler/checkSuperCallBeforeThisAccessing5.ts(5,9): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. ==== tests/cases/compiler/checkSuperCallBeforeThisAccessing5.ts (1 errors) ==== @@ -8,6 +8,6 @@ tests/cases/compiler/checkSuperCallBeforeThisAccessing5.ts(5,9): error TS17006: constructor() { super(this.x); ~~~~~~~~~~~~~~ -!!! error TS17006: 'super' must be called before accessing 'this' in the constructor of a derived class. +!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. } } \ No newline at end of file diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.types b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.types index 8e2d285d85b..826dab0c400 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.types +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.types @@ -12,9 +12,9 @@ class Super extends Base { constructor() { (() => this); // No Error ->(() => this) : () => Super ->() => this : () => Super ->this : Super +>(() => this) : () => this +>() => this : () => this +>this : this super(); >super() : void diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.types b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.types index fa5e7dbe857..11d2ab26d20 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.types +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.types @@ -15,8 +15,8 @@ class Super extends Base { super((() => this)); // No error >super((() => this)) : void >super : typeof Base ->(() => this) : () => Super ->() => this : () => Super ->this : Super +>(() => this) : () => this +>() => this : () => this +>this : this } } diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.errors.txt b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.errors.txt index 39db87d41a1..7a00a4f0130 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.errors.txt +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/checkSuperCallBeforeThisAccessing8.ts(8,9): error TS17006: 'super' must be called before accessing 'this' in the constructor of a derived class. +tests/cases/compiler/checkSuperCallBeforeThisAccessing8.ts(8,9): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. ==== tests/cases/compiler/checkSuperCallBeforeThisAccessing8.ts (1 errors) ==== @@ -11,6 +11,6 @@ tests/cases/compiler/checkSuperCallBeforeThisAccessing8.ts(8,9): error TS17006: var that = this; super(); ~~~~~~~~ -!!! error TS17006: 'super' must be called before accessing 'this' in the constructor of a derived class. +!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. } } \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassParameterProperties.errors.txt b/tests/baselines/reference/derivedClassParameterProperties.errors.txt index c5d853dec56..37f272db082 100644 --- a/tests/baselines/reference/derivedClassParameterProperties.errors.txt +++ b/tests/baselines/reference/derivedClassParameterProperties.errors.txt @@ -1,6 +1,6 @@ tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(17,9): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(32,9): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. -tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(49,9): error TS17006: 'super' must be called before accessing 'this' in the constructor of a derived class. +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(49,9): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(59,9): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(82,9): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. @@ -60,7 +60,7 @@ tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassP var b = 2; super(); // error: "super" has to be called before "this" accessing ~~~~~~~~ -!!! error TS17006: 'super' must be called before accessing 'this' in the constructor of a derived class. +!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. } } diff --git a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.errors.txt b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.errors.txt index e72dbe293e9..0190a659166 100644 --- a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.errors.txt +++ b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts(8,9): error TS17006: 'super' must be called before accessing 'this' in the constructor of a derived class. +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts(8,9): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts(14,15): error TS2332: 'this' cannot be referenced in current location. tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts(20,21): error TS2332: 'this' cannot be referenced in current location. @@ -13,7 +13,7 @@ tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassS constructor() { super(this); // ok ~~~~~~~~~~~~ -!!! error TS17006: 'super' must be called before accessing 'this' in the constructor of a derived class. +!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. } } diff --git a/tests/baselines/reference/thisInInvalidContexts.errors.txt b/tests/baselines/reference/thisInInvalidContexts.errors.txt index 09fa952e2c2..d74db892019 100644 --- a/tests/baselines/reference/thisInInvalidContexts.errors.txt +++ b/tests/baselines/reference/thisInInvalidContexts.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(3,16): error TS2334: 'this' cannot be referenced in a static property initializer. -tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(14,9): error TS17006: 'super' must be called before accessing 'this' in the constructor of a derived class. +tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(14,9): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(22,15): error TS2332: 'this' cannot be referenced in current location. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(28,13): error TS2331: 'this' cannot be referenced in a module or namespace body. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(36,13): error TS2526: A 'this' type is available only in a non-static member of a class or interface. @@ -8,7 +8,7 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(44,9): tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(45,9): error TS2332: 'this' cannot be referenced in current location. -==== tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts (7 errors) ==== +==== tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts (8 errors) ==== //'this' in static member initializer class ErrClass1 { static t = this; // Error @@ -26,7 +26,7 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(45,9): constructor() { super(this); // Error ~~~~~~~~~~~~ -!!! error TS17006: 'super' must be called before accessing 'this' in the constructor of a derived class. +!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. } } diff --git a/tests/baselines/reference/thisInInvalidContextsExternalModule.errors.txt b/tests/baselines/reference/thisInInvalidContextsExternalModule.errors.txt index 9909c0cbfe9..c4188993eee 100644 --- a/tests/baselines/reference/thisInInvalidContextsExternalModule.errors.txt +++ b/tests/baselines/reference/thisInInvalidContextsExternalModule.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(3,16): error TS2334: 'this' cannot be referenced in a static property initializer. -tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(14,9): error TS17006: 'super' must be called before accessing 'this' in the constructor of a derived class. +tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(14,9): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(22,15): error TS2332: 'this' cannot be referenced in current location. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(28,13): error TS2331: 'this' cannot be referenced in a module or namespace body. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(36,13): error TS2526: A 'this' type is available only in a non-static member of a class or interface. @@ -9,7 +9,7 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalMod tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(48,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. -==== tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts (8 errors) ==== +==== tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts (9 errors) ==== //'this' in static member initializer class ErrClass1 { static t = this; // Error @@ -27,7 +27,7 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalMod constructor() { super(this); // error: "super" has to be called before "this" accessing ~~~~~~~~~~~~ -!!! error TS17006: 'super' must be called before accessing 'this' in the constructor of a derived class. +!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. } } diff --git a/tests/baselines/reference/thisInSuperCall.errors.txt b/tests/baselines/reference/thisInSuperCall.errors.txt index ea4b6fd742a..f0fc5854123 100644 --- a/tests/baselines/reference/thisInSuperCall.errors.txt +++ b/tests/baselines/reference/thisInSuperCall.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/thisInSuperCall.ts(7,9): error TS17006: 'super' must be called before accessing 'this' in the constructor of a derived class. +tests/cases/compiler/thisInSuperCall.ts(7,9): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. tests/cases/compiler/thisInSuperCall.ts(14,15): error TS2332: 'this' cannot be referenced in current location. tests/cases/compiler/thisInSuperCall.ts(20,15): error TS2332: 'this' cannot be referenced in current location. @@ -12,7 +12,7 @@ tests/cases/compiler/thisInSuperCall.ts(20,15): error TS2332: 'this' cannot be r constructor() { super(this); // error: "super" has to be called before "this" accessing ~~~~~~~~~~~~ -!!! error TS17006: 'super' must be called before accessing 'this' in the constructor of a derived class. +!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. } } diff --git a/tests/baselines/reference/thisInSuperCall2.errors.txt b/tests/baselines/reference/thisInSuperCall2.errors.txt index 7130ee8deb8..11ea23d020c 100644 --- a/tests/baselines/reference/thisInSuperCall2.errors.txt +++ b/tests/baselines/reference/thisInSuperCall2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/thisInSuperCall2.ts(8,9): error TS17006: 'super' must be called before accessing 'this' in the constructor of a derived class. +tests/cases/compiler/thisInSuperCall2.ts(8,9): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. tests/cases/compiler/thisInSuperCall2.ts(16,15): error TS2332: 'this' cannot be referenced in current location. @@ -12,7 +12,7 @@ tests/cases/compiler/thisInSuperCall2.ts(16,15): error TS2332: 'this' cannot be constructor() { super(this); // error: "super" has to be called before "this" accessing ~~~~~~~~~~~~ -!!! error TS17006: 'super' must be called before accessing 'this' in the constructor of a derived class. +!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. } } From f18e20316a7a3e11f3bd1151c655edd9eaebd58e Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Mon, 30 Nov 2015 20:41:12 -0800 Subject: [PATCH 013/160] fix merge issues --- src/compiler/core.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 3d81583f7fd..55a2b15194b 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -74,11 +74,6 @@ namespace ts { GreaterThan = 1 } - /* @internal */ - export function isArray(obj: any): boolean { - return Array.isArray ? Array.isArray(obj) : typeof obj === "object" && obj instanceof Array; - } - /** * Iterates through 'array' by index and performs the callback on each element of array until the callback * returns a truthy value, then returns that value. From 2745895064bc2c1ac36ff67b101200239712a1d4 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Tue, 1 Dec 2015 11:13:54 -0800 Subject: [PATCH 014/160] Alternate approach to fix super calls in async methods. --- src/compiler/checker.ts | 14 ++-- src/compiler/emitter.ts | 83 ++++++++++++++----- src/compiler/types.ts | 2 +- ...asyncArrowFunctionCapturesArguments_es6.js | 2 +- .../asyncAwaitIsolatedModules_es6.js | 2 +- tests/baselines/reference/asyncAwait_es6.js | 2 +- .../reference/asyncMethodWithSuper_es6.js | 27 ++++++ .../asyncMethodWithSuper_es6.symbols | 26 ++++++ .../reference/asyncMethodWithSuper_es6.types | 29 +++++++ tests/baselines/reference/asyncMultiFile.js | 2 +- .../reference/reachabilityChecks7.js | 2 +- .../reference/superSymbolIndexedAccess5.js | 2 +- .../reference/superSymbolIndexedAccess6.js | 2 +- .../async/es6/asyncMethodWithSuper_es6.ts | 13 +++ 14 files changed, 176 insertions(+), 32 deletions(-) create mode 100644 tests/baselines/reference/asyncMethodWithSuper_es6.js create mode 100644 tests/baselines/reference/asyncMethodWithSuper_es6.symbols create mode 100644 tests/baselines/reference/asyncMethodWithSuper_es6.types create mode 100644 tests/cases/conformance/async/es6/asyncMethodWithSuper_es6.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 9ed3ca55e19..21317bec3fb 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -6756,7 +6756,6 @@ namespace ts { if (node.parserContextFlags & ParserContextFlags.Await) { getNodeLinks(container).flags |= NodeCheckFlags.CaptureArguments; - getNodeLinks(node).flags |= NodeCheckFlags.LexicalArguments; } } @@ -6934,6 +6933,11 @@ namespace ts { getNodeLinks(node).flags |= nodeCheckFlag; + // Due to how we emit async functions, we need to specialize the emit for an async method that contains a `super` reference. + if (container.kind === SyntaxKind.MethodDeclaration && container.flags & NodeFlags.Async) { + getNodeLinks(container).flags |= NodeCheckFlags.AsyncMethodWithSuper; + } + if (needToCaptureLexicalThis) { // call expressions are allowed only in constructors so they should always capture correct 'this' // super property access expressions can also appear in arrow functions - @@ -9858,7 +9862,7 @@ namespace ts { return aggregatedTypes; } - /* + /* *TypeScript Specification 1.0 (6.3) - July 2014 * An explicitly typed function whose return type isn't the Void or the Any type * must have at least one return statement somewhere in its body. @@ -9884,15 +9888,15 @@ namespace ts { const hasExplicitReturn = func.flags & NodeFlags.HasExplicitReturn; if (returnType && !hasExplicitReturn) { - // minimal check: function has syntactic return type annotation and no explicit return statements in the body + // minimal check: function has syntactic return type annotation and no explicit return statements in the body // this function does not conform to the specification. - // NOTE: having returnType !== undefined is a precondition for entering this branch so func.type will always be present + // NOTE: having returnType !== undefined is a precondition for entering this branch so func.type will always be present error(func.type, Diagnostics.A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value); } else if (compilerOptions.noImplicitReturns) { if (!returnType) { // If return type annotation is omitted check if function has any explicit return statements. - // If it does not have any - its inferred return type is void - don't do any checks. + // If it does not have any - its inferred return type is void - don't do any checks. // Otherwise get inferred return type from function body and report error only if it is not void / anytype const inferredReturnType = hasExplicitReturn ? getReturnTypeOfSignature(getSignatureFromDeclaration(func)) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 48f9dd32aaf..d6a709fc5e7 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -321,7 +321,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) { const awaiterHelper = ` var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promise, generator) { return new Promise(function (resolve, reject) { - generator = generator.call(thisArg, _arguments); + generator = generator.apply(thisArg, _arguments); function cast(value) { return value instanceof Promise && value.constructor === Promise ? value : new Promise(function (resolve) { resolve(value); }); } function onfulfill(value) { try { step("next", value); } catch (e) { reject(e); } } function onreject(value) { try { step("throw", value); } catch (e) { reject(e); } } @@ -1496,11 +1496,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } function emitExpressionIdentifier(node: Identifier) { - if (resolver.getNodeCheckFlags(node) & NodeCheckFlags.LexicalArguments) { - write("_arguments"); - return; - } - const container = resolver.getReferencedExportContainer(node); if (container) { if (container.kind === SyntaxKind.SourceFile) { @@ -2287,23 +2282,72 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi write(")"); } + function isSuperPropertyAccess(node: Expression): node is PropertyAccessExpression { + return node.kind === SyntaxKind.PropertyAccessExpression + && (node).expression.kind === SyntaxKind.SuperKeyword; + } + + function isSuperElementAccess(node: Expression): node is ElementAccessExpression { + return node.kind === SyntaxKind.ElementAccessExpression + && (node).expression.kind === SyntaxKind.SuperKeyword; + } + + function isInAsyncMethodWithSuperInES6(node: CallExpression) { + if (languageVersion === ScriptTarget.ES6) { + const container = getSuperContainer(node, /*includeFunctions*/ false); + if (container && resolver.getNodeCheckFlags(container) & NodeCheckFlags.AsyncMethodWithSuper) { + return true; + } + } + + return false; + } + + function emitSuperAccessInAsyncMethod(node: Expression) { + write("_super("); + emit(node); + write(")"); + } + function emitCallExpression(node: CallExpression) { if (languageVersion < ScriptTarget.ES6 && hasSpreadElement(node.arguments)) { emitCallWithSpread(node); return; } + + const expression = node.expression; let superCall = false; - if (node.expression.kind === SyntaxKind.SuperKeyword) { - emitSuper(node.expression); + let isAsyncMethodWithSuper = false; + if (expression.kind === SyntaxKind.SuperKeyword) { + emitSuper(expression); superCall = true; } else { - emit(node.expression); - superCall = node.expression.kind === SyntaxKind.PropertyAccessExpression && (node.expression).expression.kind === SyntaxKind.SuperKeyword; + if (isSuperPropertyAccess(expression)) { + superCall = true; + if (isInAsyncMethodWithSuperInES6(node)) { + isAsyncMethodWithSuper = true; + const name = createSynthesizedNode(SyntaxKind.StringLiteral); + name.text = expression.name.text; + emitSuperAccessInAsyncMethod(name); + } + } + else if (isSuperElementAccess(expression)) { + superCall = true; + if (isInAsyncMethodWithSuperInES6(node)) { + isAsyncMethodWithSuper = true; + emitSuperAccessInAsyncMethod(expression.argumentExpression); + } + } + + if (!isAsyncMethodWithSuper) { + emit(expression); + } } - if (superCall && languageVersion < ScriptTarget.ES6) { + + if (superCall && (languageVersion < ScriptTarget.ES6 || isAsyncMethodWithSuper)) { write(".call("); - emitThis(node.expression); + emitThis(expression); if (node.arguments.length) { write(", "); emitCommaList(node.arguments); @@ -2980,7 +3024,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } else { // this is top level converted loop so we need to create an alias for 'this' here - // NOTE: + // NOTE: // if converted loops were all nested in arrow function then we'll always emit '_this' so convertedLoopState.thisName will not be set. // If it is set this means that all nested loops are not nested in arrow function and it is safe to capture 'this'. write(`var ${convertedLoopState.thisName} = this;`); @@ -4452,6 +4496,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi write(" {"); increaseIndent(); writeLine(); + + if (resolver.getNodeCheckFlags(node) & NodeCheckFlags.AsyncMethodWithSuper) { + write("const _super = name => super[name];"); + writeLine(); + } + write("return"); } @@ -4472,12 +4522,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } // Emit the call to __awaiter. - if (hasLexicalArguments) { - write(", function* (_arguments)"); - } - else { - write(", function* ()"); - } + write(", function* ()"); // Emit the signature and body for the inner generator function. emitFunctionBody(node); diff --git a/src/compiler/types.ts b/src/compiler/types.ts index f8b26ddaa6d..dc17b9de5ec 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -2022,7 +2022,7 @@ namespace ts { SuperInstance = 0x00000100, // Instance 'super' reference SuperStatic = 0x00000200, // Static 'super' reference ContextChecked = 0x00000400, // Contextual types have been assigned - LexicalArguments = 0x00000800, + AsyncMethodWithSuper = 0x00000800, CaptureArguments = 0x00001000, // Lexical 'arguments' used in body (for async functions) // Values for enum members have been computed, and any errors have been reported for them. diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.js b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.js index c24259cf0b5..fdaa365836d 100644 --- a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.js +++ b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.js @@ -11,6 +11,6 @@ class C { class C { method() { function other() { } - var fn = () => __awaiter(this, arguments, Promise, function* (_arguments) { return yield other.apply(this, _arguments); }); + var fn = () => __awaiter(this, arguments, Promise, function* () { return yield other.apply(this, arguments); }); } } diff --git a/tests/baselines/reference/asyncAwaitIsolatedModules_es6.js b/tests/baselines/reference/asyncAwaitIsolatedModules_es6.js index 7007c66ae28..9f3005e5861 100644 --- a/tests/baselines/reference/asyncAwaitIsolatedModules_es6.js +++ b/tests/baselines/reference/asyncAwaitIsolatedModules_es6.js @@ -42,7 +42,7 @@ module M { //// [asyncAwaitIsolatedModules_es6.js] var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promise, generator) { return new Promise(function (resolve, reject) { - generator = generator.call(thisArg, _arguments); + generator = generator.apply(thisArg, _arguments); function cast(value) { return value instanceof Promise && value.constructor === Promise ? value : new Promise(function (resolve) { resolve(value); }); } function onfulfill(value) { try { step("next", value); } catch (e) { reject(e); } } function onreject(value) { try { step("throw", value); } catch (e) { reject(e); } } diff --git a/tests/baselines/reference/asyncAwait_es6.js b/tests/baselines/reference/asyncAwait_es6.js index 155a44d339d..fb4dbf9955d 100644 --- a/tests/baselines/reference/asyncAwait_es6.js +++ b/tests/baselines/reference/asyncAwait_es6.js @@ -42,7 +42,7 @@ module M { //// [asyncAwait_es6.js] var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promise, generator) { return new Promise(function (resolve, reject) { - generator = generator.call(thisArg, _arguments); + generator = generator.apply(thisArg, _arguments); function cast(value) { return value instanceof Promise && value.constructor === Promise ? value : new Promise(function (resolve) { resolve(value); }); } function onfulfill(value) { try { step("next", value); } catch (e) { reject(e); } } function onreject(value) { try { step("throw", value); } catch (e) { reject(e); } } diff --git a/tests/baselines/reference/asyncMethodWithSuper_es6.js b/tests/baselines/reference/asyncMethodWithSuper_es6.js new file mode 100644 index 00000000000..315ce5fdb90 --- /dev/null +++ b/tests/baselines/reference/asyncMethodWithSuper_es6.js @@ -0,0 +1,27 @@ +//// [asyncMethodWithSuper_es6.ts] +class A { + x() { + } +} + +class B extends A { + async y() { + super.x(); + super["x"](); + } +} + +//// [asyncMethodWithSuper_es6.js] +class A { + x() { + } +} +class B extends A { + y() { + const _super = name => super[name]; + return __awaiter(this, void 0, Promise, function* () { + _super("x").call(this); + _super("x").call(this); + }); + } +} diff --git a/tests/baselines/reference/asyncMethodWithSuper_es6.symbols b/tests/baselines/reference/asyncMethodWithSuper_es6.symbols new file mode 100644 index 00000000000..2b7388702f1 --- /dev/null +++ b/tests/baselines/reference/asyncMethodWithSuper_es6.symbols @@ -0,0 +1,26 @@ +=== tests/cases/conformance/async/es6/asyncMethodWithSuper_es6.ts === +class A { +>A : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0)) + + x() { +>x : Symbol(x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) + } +} + +class B extends A { +>B : Symbol(B, Decl(asyncMethodWithSuper_es6.ts, 3, 1)) +>A : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0)) + + async y() { +>y : Symbol(y, Decl(asyncMethodWithSuper_es6.ts, 5, 19)) + + super.x(); +>super.x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) +>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0)) +>x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) + + super["x"](); +>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0)) +>"x" : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) + } +} diff --git a/tests/baselines/reference/asyncMethodWithSuper_es6.types b/tests/baselines/reference/asyncMethodWithSuper_es6.types new file mode 100644 index 00000000000..7786b417e81 --- /dev/null +++ b/tests/baselines/reference/asyncMethodWithSuper_es6.types @@ -0,0 +1,29 @@ +=== tests/cases/conformance/async/es6/asyncMethodWithSuper_es6.ts === +class A { +>A : A + + x() { +>x : () => void + } +} + +class B extends A { +>B : B +>A : A + + async y() { +>y : () => Promise + + super.x(); +>super.x() : void +>super.x : () => void +>super : A +>x : () => void + + super["x"](); +>super["x"]() : void +>super["x"] : () => void +>super : A +>"x" : string + } +} diff --git a/tests/baselines/reference/asyncMultiFile.js b/tests/baselines/reference/asyncMultiFile.js index e93dc586255..fa4a210c252 100644 --- a/tests/baselines/reference/asyncMultiFile.js +++ b/tests/baselines/reference/asyncMultiFile.js @@ -8,7 +8,7 @@ function g() { } //// [a.js] var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promise, generator) { return new Promise(function (resolve, reject) { - generator = generator.call(thisArg, _arguments); + generator = generator.apply(thisArg, _arguments); function cast(value) { return value instanceof Promise && value.constructor === Promise ? value : new Promise(function (resolve) { resolve(value); }); } function onfulfill(value) { try { step("next", value); } catch (e) { reject(e); } } function onreject(value) { try { step("throw", value); } catch (e) { reject(e); } } diff --git a/tests/baselines/reference/reachabilityChecks7.js b/tests/baselines/reference/reachabilityChecks7.js index c78f99953e9..f3a27dfdab8 100644 --- a/tests/baselines/reference/reachabilityChecks7.js +++ b/tests/baselines/reference/reachabilityChecks7.js @@ -33,7 +33,7 @@ let x1 = () => { use("Test"); } //// [reachabilityChecks7.js] var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promise, generator) { return new Promise(function (resolve, reject) { - generator = generator.call(thisArg, _arguments); + generator = generator.apply(thisArg, _arguments); function cast(value) { return value instanceof Promise && value.constructor === Promise ? value : new Promise(function (resolve) { resolve(value); }); } function onfulfill(value) { try { step("next", value); } catch (e) { reject(e); } } function onreject(value) { try { step("throw", value); } catch (e) { reject(e); } } diff --git a/tests/baselines/reference/superSymbolIndexedAccess5.js b/tests/baselines/reference/superSymbolIndexedAccess5.js index 64a8ac5094c..2626051706c 100644 --- a/tests/baselines/reference/superSymbolIndexedAccess5.js +++ b/tests/baselines/reference/superSymbolIndexedAccess5.js @@ -34,7 +34,7 @@ var Bar = (function (_super) { _super.apply(this, arguments); } Bar.prototype[symbol] = function () { - return _super.prototype[symbol](); + return _super.prototype[symbol].call(this); }; return Bar; })(Foo); diff --git a/tests/baselines/reference/superSymbolIndexedAccess6.js b/tests/baselines/reference/superSymbolIndexedAccess6.js index e014cf47c1a..48834422e24 100644 --- a/tests/baselines/reference/superSymbolIndexedAccess6.js +++ b/tests/baselines/reference/superSymbolIndexedAccess6.js @@ -34,7 +34,7 @@ var Bar = (function (_super) { _super.apply(this, arguments); } Bar[symbol] = function () { - return _super[symbol](); + return _super[symbol].call(this); }; return Bar; })(Foo); diff --git a/tests/cases/conformance/async/es6/asyncMethodWithSuper_es6.ts b/tests/cases/conformance/async/es6/asyncMethodWithSuper_es6.ts new file mode 100644 index 00000000000..2225200ef60 --- /dev/null +++ b/tests/cases/conformance/async/es6/asyncMethodWithSuper_es6.ts @@ -0,0 +1,13 @@ +// @target: ES6 +// @noEmitHelpers: true +class A { + x() { + } +} + +class B extends A { + async y() { + super.x(); + super["x"](); + } +} \ No newline at end of file From 67a4fe5d67261fbb65abee8e2a9318600e5c49bf Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Tue, 1 Dec 2015 14:29:37 -0800 Subject: [PATCH 015/160] Support for assignment/destructuring using super in an async method --- src/compiler/checker.ts | 17 +++- src/compiler/emitter.ts | 64 +++++++----- src/compiler/types.ts | 11 ++- .../reference/asyncMethodWithSuper_es6.js | 76 +++++++++++++- .../asyncMethodWithSuper_es6.symbols | 80 ++++++++++++++- .../reference/asyncMethodWithSuper_es6.types | 98 ++++++++++++++++++- .../async/es6/asyncMethodWithSuper_es6.ts | 41 +++++++- 7 files changed, 347 insertions(+), 40 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 21317bec3fb..0d24f7c89fe 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -6902,6 +6902,16 @@ namespace ts { return false; } + function isSuperPropertyAccess(node: Node) { + return node.kind === SyntaxKind.PropertyAccessExpression + && (node).expression.kind === SyntaxKind.SuperKeyword; + } + + function isSuperElementAccess(node: Node) { + return node.kind === SyntaxKind.ElementAccessExpression + && (node).expression.kind === SyntaxKind.SuperKeyword; + } + function checkSuperExpression(node: Node): Type { const isCallExpression = node.parent.kind === SyntaxKind.CallExpression && (node.parent).expression === node; const classDeclaration = getContainingClass(node); @@ -6935,7 +6945,12 @@ namespace ts { // Due to how we emit async functions, we need to specialize the emit for an async method that contains a `super` reference. if (container.kind === SyntaxKind.MethodDeclaration && container.flags & NodeFlags.Async) { - getNodeLinks(container).flags |= NodeCheckFlags.AsyncMethodWithSuper; + if ((isSuperPropertyAccess(node.parent) || isSuperElementAccess(node.parent)) && isAssignmentTarget(node.parent)) { + getNodeLinks(container).flags |= NodeCheckFlags.AsyncMethodWithSuperBinding; + } + else { + getNodeLinks(container).flags |= NodeCheckFlags.AsyncMethodWithSuper; + } } if (needToCaptureLexicalThis) { diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index d6a709fc5e7..5c1eaf67b0e 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -2126,6 +2126,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi return; } + if (languageVersion === ScriptTarget.ES6 && + node.expression.kind === SyntaxKind.SuperKeyword && + isInAsyncMethodWithSuperInES6(node)) { + const name = createSynthesizedNode(SyntaxKind.StringLiteral); + name.text = node.name.text; + emitSuperAccessInAsyncMethod(node.expression, name); + return; + } + emit(node.expression); const indentedBeforeDot = indentIfOnDifferentLines(node, node.expression, node.dotToken); @@ -2207,6 +2216,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi if (tryEmitConstantValue(node)) { return; } + + if (languageVersion === ScriptTarget.ES6 && + node.expression.kind === SyntaxKind.SuperKeyword && + isInAsyncMethodWithSuperInES6(node)) { + emitSuperAccessInAsyncMethod(node.expression, node.argumentExpression); + return; + } + emit(node.expression); write("["); emit(node.argumentExpression); @@ -2292,10 +2309,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi && (node).expression.kind === SyntaxKind.SuperKeyword; } - function isInAsyncMethodWithSuperInES6(node: CallExpression) { + function isInAsyncMethodWithSuperInES6(node: Node) { if (languageVersion === ScriptTarget.ES6) { const container = getSuperContainer(node, /*includeFunctions*/ false); - if (container && resolver.getNodeCheckFlags(container) & NodeCheckFlags.AsyncMethodWithSuper) { + if (container && resolver.getNodeCheckFlags(container) & (NodeCheckFlags.AsyncMethodWithSuper | NodeCheckFlags.AsyncMethodWithSuperBinding)) { return true; } } @@ -2303,10 +2320,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi return false; } - function emitSuperAccessInAsyncMethod(node: Expression) { + function emitSuperAccessInAsyncMethod(superNode: Node, argumentExpression: Expression) { + const container = getSuperContainer(superNode, /*includeFunctions*/ false); + const isSuperBinding = resolver.getNodeCheckFlags(container) & NodeCheckFlags.AsyncMethodWithSuperBinding; write("_super("); - emit(node); - write(")"); + emit(argumentExpression); + write(isSuperBinding ? ").value" : ")"); } function emitCallExpression(node: CallExpression) { @@ -2323,26 +2342,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi superCall = true; } else { - if (isSuperPropertyAccess(expression)) { - superCall = true; - if (isInAsyncMethodWithSuperInES6(node)) { - isAsyncMethodWithSuper = true; - const name = createSynthesizedNode(SyntaxKind.StringLiteral); - name.text = expression.name.text; - emitSuperAccessInAsyncMethod(name); - } - } - else if (isSuperElementAccess(expression)) { - superCall = true; - if (isInAsyncMethodWithSuperInES6(node)) { - isAsyncMethodWithSuper = true; - emitSuperAccessInAsyncMethod(expression.argumentExpression); - } - } - - if (!isAsyncMethodWithSuper) { - emit(expression); - } + superCall = isSuperPropertyAccess(expression) || isSuperElementAccess(expression); + isAsyncMethodWithSuper = superCall && isInAsyncMethodWithSuperInES6(node); + emit(expression); } if (superCall && (languageVersion < ScriptTarget.ES6 || isAsyncMethodWithSuper)) { @@ -4497,8 +4499,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi increaseIndent(); writeLine(); - if (resolver.getNodeCheckFlags(node) & NodeCheckFlags.AsyncMethodWithSuper) { - write("const _super = name => super[name];"); + if (resolver.getNodeCheckFlags(node) & NodeCheckFlags.AsyncMethodWithSuperBinding) { + writeLines(` +const _super = (function (geti, seti) { + const cache = Object.create(null); + return name => cache[name] || (cache[name] = { get value() { return geti(name); }, set value(v) { seti(name, v); } }); +})(name => super[name], (name, value) => super[name] = value);`); + writeLine(); + } + else if (resolver.getNodeCheckFlags(node) & NodeCheckFlags.AsyncMethodWithSuper) { + write(`const _super = name => super[name];`); writeLine(); } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index dc17b9de5ec..002543081f8 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -2023,13 +2023,14 @@ namespace ts { SuperStatic = 0x00000200, // Static 'super' reference ContextChecked = 0x00000400, // Contextual types have been assigned AsyncMethodWithSuper = 0x00000800, - CaptureArguments = 0x00001000, // Lexical 'arguments' used in body (for async functions) + AsyncMethodWithSuperBinding = 0x00001000, + CaptureArguments = 0x00002000, // Lexical 'arguments' used in body (for async functions) // Values for enum members have been computed, and any errors have been reported for them. - EnumValuesComputed = 0x00002000, - BlockScopedBindingInLoop = 0x00004000, - LexicalModuleMergesWithClass = 0x00008000, // Instantiated lexical module declaration is merged with a previous class declaration. - LoopWithBlockScopedBindingCapturedInFunction = 0x00010000, // Loop that contains block scoped variable captured in closure + EnumValuesComputed = 0x00004000, + BlockScopedBindingInLoop = 0x00008000, + LexicalModuleMergesWithClass = 0x00010000, // Instantiated lexical module declaration is merged with a previous class declaration. + LoopWithBlockScopedBindingCapturedInFunction = 0x00020000, // Loop that contains block scoped variable captured in closure } /* @internal */ diff --git a/tests/baselines/reference/asyncMethodWithSuper_es6.js b/tests/baselines/reference/asyncMethodWithSuper_es6.js index 315ce5fdb90..74d4de79881 100644 --- a/tests/baselines/reference/asyncMethodWithSuper_es6.js +++ b/tests/baselines/reference/asyncMethodWithSuper_es6.js @@ -5,9 +5,48 @@ class A { } class B extends A { - async y() { + // async method with only call/get on 'super' does not require a binding + async simple() { + // call with property access super.x(); + + // call with element access super["x"](); + + // property access (read) + const a = super.x; + + // element access (read) + const b = super["x"]; + } + + // async method with assignment/destructuring on 'super' requires a binding + async advanced() { + const f = () => {}; + + // call with property access + super.x(); + + // call with element access + super["x"](); + + // property access (read) + const a = super.x; + + // element access (read) + const b = super["x"]; + + // property access (assign) + super.x = f; + + // element access (assign) + super["x"] = f; + + // destructuring assign with property access + ({ f: super.x } = { f }); + + // destructuring assign with element access + ({ f: super["x"] } = { f }); } } @@ -17,11 +56,44 @@ class A { } } class B extends A { - y() { + // async method with only call/get on 'super' does not require a binding + simple() { const _super = name => super[name]; return __awaiter(this, void 0, Promise, function* () { + // call with property access _super("x").call(this); + // call with element access _super("x").call(this); + // property access (read) + const a = _super("x"); + // element access (read) + const b = _super("x"); + }); + } + // async method with assignment/destructuring on 'super' requires a binding + advanced() { + const _super = (function (geti, seti) { + const cache = Object.create(null); + return name => cache[name] || (cache[name] = { get value() { return geti(name); }, set value(v) { seti(name, v); } }); + })(name => super[name], (name, value) => super[name] = value); + return __awaiter(this, void 0, Promise, function* () { + const f = () => { }; + // call with property access + _super("x").value.call(this); + // call with element access + _super("x").value.call(this); + // property access (read) + const a = _super("x").value; + // element access (read) + const b = _super("x").value; + // property access (assign) + _super("x").value = f; + // element access (assign) + _super("x").value = f; + // destructuring assign with property access + ({ f: _super("x").value } = { f }); + // destructuring assign with element access + ({ f: _super("x").value } = { f }); }); } } diff --git a/tests/baselines/reference/asyncMethodWithSuper_es6.symbols b/tests/baselines/reference/asyncMethodWithSuper_es6.symbols index 2b7388702f1..37937a061a8 100644 --- a/tests/baselines/reference/asyncMethodWithSuper_es6.symbols +++ b/tests/baselines/reference/asyncMethodWithSuper_es6.symbols @@ -11,16 +11,92 @@ class B extends A { >B : Symbol(B, Decl(asyncMethodWithSuper_es6.ts, 3, 1)) >A : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0)) - async y() { ->y : Symbol(y, Decl(asyncMethodWithSuper_es6.ts, 5, 19)) + // async method with only call/get on 'super' does not require a binding + async simple() { +>simple : Symbol(simple, Decl(asyncMethodWithSuper_es6.ts, 5, 19)) + // call with property access super.x(); >super.x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) >super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0)) >x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) + // call with element access super["x"](); >super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0)) >"x" : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) + + // property access (read) + const a = super.x; +>a : Symbol(a, Decl(asyncMethodWithSuper_es6.ts, 15, 13)) +>super.x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) +>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0)) +>x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) + + // element access (read) + const b = super["x"]; +>b : Symbol(b, Decl(asyncMethodWithSuper_es6.ts, 18, 13)) +>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0)) +>"x" : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) + } + + // async method with assignment/destructuring on 'super' requires a binding + async advanced() { +>advanced : Symbol(advanced, Decl(asyncMethodWithSuper_es6.ts, 19, 5)) + + const f = () => {}; +>f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 23, 13)) + + // call with property access + super.x(); +>super.x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) +>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0)) +>x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) + + // call with element access + super["x"](); +>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0)) +>"x" : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) + + // property access (read) + const a = super.x; +>a : Symbol(a, Decl(asyncMethodWithSuper_es6.ts, 32, 13)) +>super.x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) +>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0)) +>x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) + + // element access (read) + const b = super["x"]; +>b : Symbol(b, Decl(asyncMethodWithSuper_es6.ts, 35, 13)) +>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0)) +>"x" : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) + + // property access (assign) + super.x = f; +>super.x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) +>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0)) +>x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) +>f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 23, 13)) + + // element access (assign) + super["x"] = f; +>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0)) +>"x" : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) +>f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 23, 13)) + + // destructuring assign with property access + ({ f: super.x } = { f }); +>f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 44, 10)) +>super.x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) +>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0)) +>x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) +>f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 44, 27)) + + // destructuring assign with element access + ({ f: super["x"] } = { f }); +>f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 47, 10)) +>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0)) +>"x" : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9)) +>f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 47, 30)) } } diff --git a/tests/baselines/reference/asyncMethodWithSuper_es6.types b/tests/baselines/reference/asyncMethodWithSuper_es6.types index 7786b417e81..04c5b5a9baf 100644 --- a/tests/baselines/reference/asyncMethodWithSuper_es6.types +++ b/tests/baselines/reference/asyncMethodWithSuper_es6.types @@ -11,19 +11,113 @@ class B extends A { >B : B >A : A - async y() { ->y : () => Promise + // async method with only call/get on 'super' does not require a binding + async simple() { +>simple : () => Promise + // call with property access super.x(); >super.x() : void >super.x : () => void >super : A >x : () => void + // call with element access super["x"](); >super["x"]() : void >super["x"] : () => void >super : A >"x" : string + + // property access (read) + const a = super.x; +>a : () => void +>super.x : () => void +>super : A +>x : () => void + + // element access (read) + const b = super["x"]; +>b : () => void +>super["x"] : () => void +>super : A +>"x" : string + } + + // async method with assignment/destructuring on 'super' requires a binding + async advanced() { +>advanced : () => Promise + + const f = () => {}; +>f : () => void +>() => {} : () => void + + // call with property access + super.x(); +>super.x() : void +>super.x : () => void +>super : A +>x : () => void + + // call with element access + super["x"](); +>super["x"]() : void +>super["x"] : () => void +>super : A +>"x" : string + + // property access (read) + const a = super.x; +>a : () => void +>super.x : () => void +>super : A +>x : () => void + + // element access (read) + const b = super["x"]; +>b : () => void +>super["x"] : () => void +>super : A +>"x" : string + + // property access (assign) + super.x = f; +>super.x = f : () => void +>super.x : () => void +>super : A +>x : () => void +>f : () => void + + // element access (assign) + super["x"] = f; +>super["x"] = f : () => void +>super["x"] : () => void +>super : A +>"x" : string +>f : () => void + + // destructuring assign with property access + ({ f: super.x } = { f }); +>({ f: super.x } = { f }) : { f: () => void; } +>{ f: super.x } = { f } : { f: () => void; } +>{ f: super.x } : { f: () => void; } +>f : () => void +>super.x : () => void +>super : A +>x : () => void +>{ f } : { f: () => void; } +>f : () => void + + // destructuring assign with element access + ({ f: super["x"] } = { f }); +>({ f: super["x"] } = { f }) : { f: () => void; } +>{ f: super["x"] } = { f } : { f: () => void; } +>{ f: super["x"] } : { f: () => void; } +>f : () => void +>super["x"] : () => void +>super : A +>"x" : string +>{ f } : { f: () => void; } +>f : () => void } } diff --git a/tests/cases/conformance/async/es6/asyncMethodWithSuper_es6.ts b/tests/cases/conformance/async/es6/asyncMethodWithSuper_es6.ts index 2225200ef60..795fe7defb0 100644 --- a/tests/cases/conformance/async/es6/asyncMethodWithSuper_es6.ts +++ b/tests/cases/conformance/async/es6/asyncMethodWithSuper_es6.ts @@ -6,8 +6,47 @@ class A { } class B extends A { - async y() { + // async method with only call/get on 'super' does not require a binding + async simple() { + // call with property access super.x(); + + // call with element access super["x"](); + + // property access (read) + const a = super.x; + + // element access (read) + const b = super["x"]; + } + + // async method with assignment/destructuring on 'super' requires a binding + async advanced() { + const f = () => {}; + + // call with property access + super.x(); + + // call with element access + super["x"](); + + // property access (read) + const a = super.x; + + // element access (read) + const b = super["x"]; + + // property access (assign) + super.x = f; + + // element access (assign) + super["x"] = f; + + // destructuring assign with property access + ({ f: super.x } = { f }); + + // destructuring assign with element access + ({ f: super["x"] } = { f }); } } \ No newline at end of file From 7ad3cb74d4806a6deb6ea44c5c1a8d5d329ea52e Mon Sep 17 00:00:00 2001 From: Yui T Date: Wed, 16 Dec 2015 18:13:15 -0800 Subject: [PATCH 016/160] Address comments --- src/compiler/checker.ts | 25 +++++-------------- src/compiler/types.ts | 3 +-- .../baselines/reference/baseCheck.errors.txt | 11 +++++++- tests/baselines/reference/bases.errors.txt | 5 +++- ...ckSuperCallBeforeThisAccessing2.errors.txt | 6 ++--- ...ckSuperCallBeforeThisAccessing5.errors.txt | 4 +-- ...ckSuperCallBeforeThisAccessing8.errors.txt | 6 ++--- ...derivedClassParameterProperties.errors.txt | 20 ++++++++++++--- ...rivedClassSuperCallsWithThisArg.errors.txt | 9 ++++--- .../thisInInvalidContexts.errors.txt | 9 ++++--- ...InInvalidContextsExternalModule.errors.txt | 9 ++++--- .../reference/thisInSuperCall.errors.txt | 12 ++++++--- .../reference/thisInSuperCall1.errors.txt | 5 +++- .../reference/thisInSuperCall2.errors.txt | 9 ++++--- .../reference/thisInSuperCall3.errors.txt | 5 +++- 15 files changed, 86 insertions(+), 52 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 0488b1b6dd1..07fdec43c71 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -6849,17 +6849,11 @@ namespace ts { let needToCaptureLexicalThis = false; if (container.kind === SyntaxKind.Constructor) { - // Keep track of whether we have seen "super" before encounter "this" so that - // we can report appropriate error later in checkConstructorDeclaration - // We have to do the check here to make sure we won't give false error when - // "this" is used in arrow functions - // For example: - // constructor() { - // (()=>this); // No Error - // super(); - // } - const nodeLinks = getNodeLinks(container); - nodeLinks.flags |= NodeCheckFlags.HasSeenThisCall; + const baseTypeNode = getClassExtendsHeritageClauseElement(container.parent); + if (baseTypeNode && !(getNodeCheckFlags(container) & NodeCheckFlags.HasSeenSuperCall)) { + // In ES6, super inside constructor of class-declaration has to precede "this" accessing + error(node, Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class); + } } // Now skip arrow functions to get the "real" owner of 'this'. @@ -9605,10 +9599,7 @@ namespace ts { const containgFunction = getContainingFunction(node.expression); if (containgFunction && containgFunction.kind === SyntaxKind.Constructor) { - const nodeLinks = getNodeLinks(containgFunction); - if (!(nodeLinks.flags & NodeCheckFlags.HasSeenThisCall)) { - nodeLinks.flags |= NodeCheckFlags.HasSeenSuperBeforeThis; - } + getNodeLinks(containgFunction).flags |= NodeCheckFlags.HasSeenSuperCall; } return voidType; } @@ -11210,10 +11201,6 @@ namespace ts { markThisReferencesAsErrors(superCallStatement.expression); } } - else if (!(getNodeCheckFlags(node) & NodeCheckFlags.HasSeenSuperBeforeThis)) { - // In ES6, super inside constructor of class-declaration has to precede "this" accessing - error(superCallStatement, Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class); - } } else if (baseConstructorType !== nullType) { error(node, Diagnostics.Constructors_for_derived_classes_must_contain_a_super_call); diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 9a82891df77..de706229915 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -2030,8 +2030,7 @@ namespace ts { BlockScopedBindingInLoop = 0x00004000, LexicalModuleMergesWithClass = 0x00008000, // Instantiated lexical module declaration is merged with a previous class declaration. LoopWithBlockScopedBindingCapturedInFunction = 0x00010000, // Loop that contains block scoped variable captured in closure - HasSeenSuperBeforeThis = 0x00020000, // Set during the binding if 'super' is used before 'this' in constructor function - HasSeenThisCall = 0x00040000, // Set during the binding when encounter 'this' + HasSeenSuperCall = 0x00040000, // Set during the binding when encounter 'super' } /* @internal */ diff --git a/tests/baselines/reference/baseCheck.errors.txt b/tests/baselines/reference/baseCheck.errors.txt index f52ba4b3dbd..0b4e9fd61b1 100644 --- a/tests/baselines/reference/baseCheck.errors.txt +++ b/tests/baselines/reference/baseCheck.errors.txt @@ -1,15 +1,18 @@ tests/cases/compiler/baseCheck.ts(9,18): error TS2304: Cannot find name 'loc'. tests/cases/compiler/baseCheck.ts(17,53): error TS2346: Supplied parameters do not match any signature of call target. tests/cases/compiler/baseCheck.ts(17,59): error TS2332: 'this' cannot be referenced in current location. +tests/cases/compiler/baseCheck.ts(17,59): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. tests/cases/compiler/baseCheck.ts(18,62): error TS2332: 'this' cannot be referenced in current location. +tests/cases/compiler/baseCheck.ts(18,62): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. tests/cases/compiler/baseCheck.ts(19,59): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. tests/cases/compiler/baseCheck.ts(19,68): error TS2332: 'this' cannot be referenced in current location. +tests/cases/compiler/baseCheck.ts(19,68): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. tests/cases/compiler/baseCheck.ts(22,9): error TS2304: Cannot find name 'x'. tests/cases/compiler/baseCheck.ts(23,7): error TS2304: Cannot find name 'x'. tests/cases/compiler/baseCheck.ts(26,9): error TS2304: Cannot find name 'x'. -==== tests/cases/compiler/baseCheck.ts (9 errors) ==== +==== tests/cases/compiler/baseCheck.ts (12 errors) ==== class C { constructor(x: number, y: number) { } } class ELoc extends C { constructor(x: number) { @@ -33,14 +36,20 @@ tests/cases/compiler/baseCheck.ts(26,9): error TS2304: Cannot find name 'x'. !!! error TS2346: Supplied parameters do not match any signature of call target. ~~~~ !!! error TS2332: 'this' cannot be referenced in current location. + ~~~~ +!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. class E extends C { constructor(public z: number) { super(0, this.z) } } ~~~~ !!! error TS2332: 'this' cannot be referenced in current location. + ~~~~ +!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. class F extends C { constructor(public z: number) { super("hello", this.z) } } // first param type ~~~~~~~ !!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. ~~~~ !!! error TS2332: 'this' cannot be referenced in current location. + ~~~~ +!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. function f() { if (x<10) { diff --git a/tests/baselines/reference/bases.errors.txt b/tests/baselines/reference/bases.errors.txt index c03a47d7532..7c48c977b2d 100644 --- a/tests/baselines/reference/bases.errors.txt +++ b/tests/baselines/reference/bases.errors.txt @@ -4,6 +4,7 @@ tests/cases/compiler/bases.ts(7,17): error TS2304: Cannot find name 'any'. tests/cases/compiler/bases.ts(11,7): error TS2420: Class 'C' incorrectly implements interface 'I'. Property 'x' is missing in type 'C'. tests/cases/compiler/bases.ts(12,5): error TS2377: Constructors for derived classes must contain a 'super' call. +tests/cases/compiler/bases.ts(13,9): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. tests/cases/compiler/bases.ts(13,14): error TS2339: Property 'x' does not exist on type 'C'. tests/cases/compiler/bases.ts(13,15): error TS1005: ';' expected. tests/cases/compiler/bases.ts(13,17): error TS2304: Cannot find name 'any'. @@ -11,7 +12,7 @@ tests/cases/compiler/bases.ts(17,9): error TS2339: Property 'x' does not exist o tests/cases/compiler/bases.ts(18,9): error TS2339: Property 'y' does not exist on type 'C'. -==== tests/cases/compiler/bases.ts (10 errors) ==== +==== tests/cases/compiler/bases.ts (11 errors) ==== interface I { x; } @@ -36,6 +37,8 @@ tests/cases/compiler/bases.ts(18,9): error TS2339: Property 'y' does not exist o ~~~~~~~~~~~~~~~ this.x: any; ~~~~~~~~~~~~~~~~~~~~ + ~~~~ +!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. ~ !!! error TS2339: Property 'x' does not exist on type 'C'. ~ diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.errors.txt b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.errors.txt index e48f43c8662..c8aa356fd4f 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.errors.txt +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/checkSuperCallBeforeThisAccessing2.ts(6,9): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. +tests/cases/compiler/checkSuperCallBeforeThisAccessing2.ts(5,9): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. ==== tests/cases/compiler/checkSuperCallBeforeThisAccessing2.ts (1 errors) ==== @@ -7,9 +7,9 @@ tests/cases/compiler/checkSuperCallBeforeThisAccessing2.ts(6,9): error TS17008: public x: number; constructor() { this.x = 100; - super(); - ~~~~~~~~ + ~~~~ !!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. + super(); this.x = 10; var that = this; } diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.errors.txt b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.errors.txt index 1258101cffc..8ffed5961a3 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.errors.txt +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/checkSuperCallBeforeThisAccessing5.ts(5,9): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. +tests/cases/compiler/checkSuperCallBeforeThisAccessing5.ts(5,15): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. ==== tests/cases/compiler/checkSuperCallBeforeThisAccessing5.ts (1 errors) ==== @@ -7,7 +7,7 @@ tests/cases/compiler/checkSuperCallBeforeThisAccessing5.ts(5,9): error TS17008: public x: number; constructor() { super(this.x); - ~~~~~~~~~~~~~~ + ~~~~ !!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. } } \ No newline at end of file diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.errors.txt b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.errors.txt index 7a00a4f0130..2b37f740331 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.errors.txt +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/checkSuperCallBeforeThisAccessing8.ts(8,9): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. +tests/cases/compiler/checkSuperCallBeforeThisAccessing8.ts(7,20): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. ==== tests/cases/compiler/checkSuperCallBeforeThisAccessing8.ts (1 errors) ==== @@ -9,8 +9,8 @@ tests/cases/compiler/checkSuperCallBeforeThisAccessing8.ts(8,9): error TS17008: class Super extends Base { constructor() { var that = this; - super(); - ~~~~~~~~ + ~~~~ !!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. + super(); } } \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassParameterProperties.errors.txt b/tests/baselines/reference/derivedClassParameterProperties.errors.txt index 37f272db082..c54ef2a02b7 100644 --- a/tests/baselines/reference/derivedClassParameterProperties.errors.txt +++ b/tests/baselines/reference/derivedClassParameterProperties.errors.txt @@ -1,11 +1,15 @@ tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(17,9): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(32,9): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. -tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(49,9): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(47,9): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(57,9): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(58,9): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(59,9): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(80,9): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(81,9): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(82,9): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. -==== tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts (5 errors) ==== +==== tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts (9 errors) ==== // ordering of super calls in derived constructors matters depending on other class contents class Base { @@ -57,10 +61,10 @@ tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassP a: number; constructor(y: string) { this.a = 1; + ~~~~ +!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. var b = 2; super(); // error: "super" has to be called before "this" accessing - ~~~~~~~~ -!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. } } @@ -69,7 +73,11 @@ tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassP b: number; constructor(y: string) { this.a = 3; + ~~~~ +!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. this.b = 3; + ~~~~ +!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. super(); // error ~~~~~~~~ !!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. @@ -94,7 +102,11 @@ tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassP b: number; constructor(y: string) { this.a = 3; + ~~~~ +!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. this.b = 3; + ~~~~ +!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. super(); // error ~~~~~~~~ !!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. diff --git a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.errors.txt b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.errors.txt index 0190a659166..7439c81be85 100644 --- a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.errors.txt +++ b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.errors.txt @@ -1,9 +1,10 @@ -tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts(8,9): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts(8,15): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts(14,15): error TS2332: 'this' cannot be referenced in current location. +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts(14,15): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts(20,21): error TS2332: 'this' cannot be referenced in current location. -==== tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts (3 errors) ==== +==== tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts (4 errors) ==== class Base { x: string; constructor(a) { } @@ -12,7 +13,7 @@ tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassS class Derived extends Base { constructor() { super(this); // ok - ~~~~~~~~~~~~ + ~~~~ !!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. } } @@ -22,6 +23,8 @@ tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassS super(this); // error ~~~~ !!! error TS2332: 'this' cannot be referenced in current location. + ~~~~ +!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. } } diff --git a/tests/baselines/reference/thisInInvalidContexts.errors.txt b/tests/baselines/reference/thisInInvalidContexts.errors.txt index d74db892019..ccf6a015bd9 100644 --- a/tests/baselines/reference/thisInInvalidContexts.errors.txt +++ b/tests/baselines/reference/thisInInvalidContexts.errors.txt @@ -1,6 +1,7 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(3,16): error TS2334: 'this' cannot be referenced in a static property initializer. -tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(14,9): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. +tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(14,15): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(22,15): error TS2332: 'this' cannot be referenced in current location. +tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(22,15): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(28,13): error TS2331: 'this' cannot be referenced in a module or namespace body. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(36,13): error TS2526: A 'this' type is available only in a non-static member of a class or interface. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(38,25): error TS2507: Type 'any' is not a constructor function type. @@ -8,7 +9,7 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(44,9): tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(45,9): error TS2332: 'this' cannot be referenced in current location. -==== tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts (8 errors) ==== +==== tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts (9 errors) ==== //'this' in static member initializer class ErrClass1 { static t = this; // Error @@ -25,7 +26,7 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(45,9): //'this' in optional super call constructor() { super(this); // Error - ~~~~~~~~~~~~ + ~~~~ !!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. } } @@ -37,6 +38,8 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(45,9): super(this); // Error ~~~~ !!! error TS2332: 'this' cannot be referenced in current location. + ~~~~ +!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. } } diff --git a/tests/baselines/reference/thisInInvalidContextsExternalModule.errors.txt b/tests/baselines/reference/thisInInvalidContextsExternalModule.errors.txt index c4188993eee..449f3ede56a 100644 --- a/tests/baselines/reference/thisInInvalidContextsExternalModule.errors.txt +++ b/tests/baselines/reference/thisInInvalidContextsExternalModule.errors.txt @@ -1,6 +1,7 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(3,16): error TS2334: 'this' cannot be referenced in a static property initializer. -tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(14,9): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. +tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(14,15): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(22,15): error TS2332: 'this' cannot be referenced in current location. +tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(22,15): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(28,13): error TS2331: 'this' cannot be referenced in a module or namespace body. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(36,13): error TS2526: A 'this' type is available only in a non-static member of a class or interface. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(38,25): error TS2507: Type 'any' is not a constructor function type. @@ -9,7 +10,7 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalMod tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(48,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. -==== tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts (9 errors) ==== +==== tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts (10 errors) ==== //'this' in static member initializer class ErrClass1 { static t = this; // Error @@ -26,7 +27,7 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalMod //'this' in optional super call constructor() { super(this); // error: "super" has to be called before "this" accessing - ~~~~~~~~~~~~ + ~~~~ !!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. } } @@ -38,6 +39,8 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalMod super(this); // Error ~~~~ !!! error TS2332: 'this' cannot be referenced in current location. + ~~~~ +!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. } } diff --git a/tests/baselines/reference/thisInSuperCall.errors.txt b/tests/baselines/reference/thisInSuperCall.errors.txt index f0fc5854123..000c2074892 100644 --- a/tests/baselines/reference/thisInSuperCall.errors.txt +++ b/tests/baselines/reference/thisInSuperCall.errors.txt @@ -1,9 +1,11 @@ -tests/cases/compiler/thisInSuperCall.ts(7,9): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. +tests/cases/compiler/thisInSuperCall.ts(7,15): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. tests/cases/compiler/thisInSuperCall.ts(14,15): error TS2332: 'this' cannot be referenced in current location. +tests/cases/compiler/thisInSuperCall.ts(14,15): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. tests/cases/compiler/thisInSuperCall.ts(20,15): error TS2332: 'this' cannot be referenced in current location. +tests/cases/compiler/thisInSuperCall.ts(20,15): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. -==== tests/cases/compiler/thisInSuperCall.ts (3 errors) ==== +==== tests/cases/compiler/thisInSuperCall.ts (5 errors) ==== class Base { constructor(x: any) {} } @@ -11,7 +13,7 @@ tests/cases/compiler/thisInSuperCall.ts(20,15): error TS2332: 'this' cannot be r class Foo extends Base { constructor() { super(this); // error: "super" has to be called before "this" accessing - ~~~~~~~~~~~~ + ~~~~ !!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. } } @@ -22,6 +24,8 @@ tests/cases/compiler/thisInSuperCall.ts(20,15): error TS2332: 'this' cannot be r super(this); // error ~~~~ !!! error TS2332: 'this' cannot be referenced in current location. + ~~~~ +!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. } } @@ -30,5 +34,7 @@ tests/cases/compiler/thisInSuperCall.ts(20,15): error TS2332: 'this' cannot be r super(this); // error ~~~~ !!! error TS2332: 'this' cannot be referenced in current location. + ~~~~ +!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. } } \ No newline at end of file diff --git a/tests/baselines/reference/thisInSuperCall1.errors.txt b/tests/baselines/reference/thisInSuperCall1.errors.txt index 7efc66d1666..98d8ee123ae 100644 --- a/tests/baselines/reference/thisInSuperCall1.errors.txt +++ b/tests/baselines/reference/thisInSuperCall1.errors.txt @@ -1,7 +1,8 @@ tests/cases/compiler/thisInSuperCall1.ts(7,15): error TS2332: 'this' cannot be referenced in current location. +tests/cases/compiler/thisInSuperCall1.ts(7,15): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. -==== tests/cases/compiler/thisInSuperCall1.ts (1 errors) ==== +==== tests/cases/compiler/thisInSuperCall1.ts (2 errors) ==== class Base { constructor(a: any) {} } @@ -11,6 +12,8 @@ tests/cases/compiler/thisInSuperCall1.ts(7,15): error TS2332: 'this' cannot be r super(this); ~~~~ !!! error TS2332: 'this' cannot be referenced in current location. + ~~~~ +!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. } } \ No newline at end of file diff --git a/tests/baselines/reference/thisInSuperCall2.errors.txt b/tests/baselines/reference/thisInSuperCall2.errors.txt index 11ea23d020c..4047bcb9a06 100644 --- a/tests/baselines/reference/thisInSuperCall2.errors.txt +++ b/tests/baselines/reference/thisInSuperCall2.errors.txt @@ -1,8 +1,9 @@ -tests/cases/compiler/thisInSuperCall2.ts(8,9): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. +tests/cases/compiler/thisInSuperCall2.ts(8,15): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. tests/cases/compiler/thisInSuperCall2.ts(16,15): error TS2332: 'this' cannot be referenced in current location. +tests/cases/compiler/thisInSuperCall2.ts(16,15): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. -==== tests/cases/compiler/thisInSuperCall2.ts (2 errors) ==== +==== tests/cases/compiler/thisInSuperCall2.ts (3 errors) ==== class Base { constructor(a: any) {} } @@ -11,7 +12,7 @@ tests/cases/compiler/thisInSuperCall2.ts(16,15): error TS2332: 'this' cannot be public x: number; constructor() { super(this); // error: "super" has to be called before "this" accessing - ~~~~~~~~~~~~ + ~~~~ !!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. } } @@ -23,6 +24,8 @@ tests/cases/compiler/thisInSuperCall2.ts(16,15): error TS2332: 'this' cannot be super(this); // error ~~~~ !!! error TS2332: 'this' cannot be referenced in current location. + ~~~~ +!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. } } \ No newline at end of file diff --git a/tests/baselines/reference/thisInSuperCall3.errors.txt b/tests/baselines/reference/thisInSuperCall3.errors.txt index df5c5f8b5a2..0e7d1575096 100644 --- a/tests/baselines/reference/thisInSuperCall3.errors.txt +++ b/tests/baselines/reference/thisInSuperCall3.errors.txt @@ -1,7 +1,8 @@ tests/cases/compiler/thisInSuperCall3.ts(9,15): error TS2332: 'this' cannot be referenced in current location. +tests/cases/compiler/thisInSuperCall3.ts(9,15): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. -==== tests/cases/compiler/thisInSuperCall3.ts (1 errors) ==== +==== tests/cases/compiler/thisInSuperCall3.ts (2 errors) ==== class Base { constructor(a: any) {} } @@ -13,6 +14,8 @@ tests/cases/compiler/thisInSuperCall3.ts(9,15): error TS2332: 'this' cannot be r super(this); ~~~~ !!! error TS2332: 'this' cannot be referenced in current location. + ~~~~ +!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class. } } \ No newline at end of file From ce2495f39812ec51402ddb3f8881b5f189eed17c Mon Sep 17 00:00:00 2001 From: Yui T Date: Thu, 17 Dec 2015 17:21:21 -0800 Subject: [PATCH 017/160] Update baseline from merging master --- .../reference/checkSuperCallBeforeThisAccessing1.js | 4 ++-- .../reference/checkSuperCallBeforeThisAccessing2.js | 4 ++-- .../reference/checkSuperCallBeforeThisAccessing3.js | 6 +++--- .../reference/checkSuperCallBeforeThisAccessing4.js | 4 ++-- .../reference/checkSuperCallBeforeThisAccessing5.js | 4 ++-- .../reference/checkSuperCallBeforeThisAccessing6.js | 4 ++-- .../reference/checkSuperCallBeforeThisAccessing7.js | 4 ++-- .../reference/checkSuperCallBeforeThisAccessing8.js | 4 ++-- .../thisInInvalidContextsExternalModule.errors.txt | 2 +- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js index ec6e6e39ee8..cfb5726dac1 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js @@ -20,7 +20,7 @@ var Based = (function () { function Based() { } return Based; -})(); +}()); var Derived = (function (_super) { __extends(Derived, _super); function Derived() { @@ -30,4 +30,4 @@ var Derived = (function (_super) { var that = this; } return Derived; -})(Based); +}(Based)); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js index eb58afd820b..afbc15cf912 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js @@ -20,7 +20,7 @@ var Based = (function () { function Based() { } return Based; -})(); +}()); var Derived = (function (_super) { __extends(Derived, _super); function Derived() { @@ -30,4 +30,4 @@ var Derived = (function (_super) { var that = this; } return Derived; -})(Based); +}(Based)); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js index 2c5652cf95f..7e9c23c1f83 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js @@ -25,7 +25,7 @@ var Based = (function () { function Based() { } return Based; -})(); +}()); var Derived = (function (_super) { __extends(Derived, _super); function Derived() { @@ -34,10 +34,10 @@ var Derived = (function (_super) { this.y = true; } return innver; - })(); + }()); _super.call(this); this.x = 10; var that = this; } return Derived; -})(Based); +}(Based)); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js index eacec00c438..1257b446ccb 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js @@ -29,7 +29,7 @@ var Based = (function () { function Based() { } return Based; -})(); +}()); var Derived = (function (_super) { __extends(Derived, _super); function Derived() { @@ -49,4 +49,4 @@ var Derived = (function (_super) { var that = this; } return Derived; -})(Based); +}(Based)); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js index 489c7200050..1889ee998ca 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js @@ -21,11 +21,11 @@ var Based = (function () { } } return Based; -})(); +}()); var Derived = (function (_super) { __extends(Derived, _super); function Derived() { _super.call(this, this.x); } return Derived; -})(Based); +}(Based)); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js index 6ad9773bc5f..39db4dec174 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js @@ -24,7 +24,7 @@ var Base = (function () { } } return Base; -})(); +}()); var Super = (function (_super) { __extends(Super, _super); function Super() { @@ -33,4 +33,4 @@ var Super = (function (_super) { _super.call(this); } return Super; -})(Base); +}(Base)); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js index eafc662085f..d071c05db5d 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js @@ -19,7 +19,7 @@ var Base = (function () { function Base(func) { } return Base; -})(); +}()); var Super = (function (_super) { __extends(Super, _super); function Super() { @@ -27,4 +27,4 @@ var Super = (function (_super) { _super.call(this, (function () { return _this; })); // No error } return Super; -})(Base); +}(Base)); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js index 4675d328b38..f334cc7f42b 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js @@ -24,7 +24,7 @@ var Base = (function () { } } return Base; -})(); +}()); var Super = (function (_super) { __extends(Super, _super); function Super() { @@ -32,4 +32,4 @@ var Super = (function (_super) { _super.call(this); } return Super; -})(Base); +}(Base)); diff --git a/tests/baselines/reference/thisInInvalidContextsExternalModule.errors.txt b/tests/baselines/reference/thisInInvalidContextsExternalModule.errors.txt index 25ee8cbe122..bc671b2fdbe 100644 --- a/tests/baselines/reference/thisInInvalidContextsExternalModule.errors.txt +++ b/tests/baselines/reference/thisInInvalidContextsExternalModule.errors.txt @@ -78,4 +78,4 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalMod export = this; // Should be an error ~~~~~~~~~~~~~~ -!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file. +!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file. \ No newline at end of file From cabe1d678f793b1f68161ffaba11dbd0ab5a3dfa Mon Sep 17 00:00:00 2001 From: Yui T Date: Sun, 20 Dec 2015 16:39:42 -0800 Subject: [PATCH 018/160] Fix prefix double underscore with extra underscore --- src/compiler/utilities.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index c5a31992a80..3aaae73e4c4 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -230,9 +230,19 @@ namespace ts { return getSourceTextOfNodeFromSourceFile(getSourceFileOfNode(node), node, includeTrivia); } + function prefixWithUnderscoreUnderscore(identifier: string): boolean { + if (identifier.length <= 2) { + return false; + } + else { + return identifier.charCodeAt(0) === CharacterCodes._ && identifier.charCodeAt(1) === CharacterCodes._ ? true : false; + } + } + // Add an extra underscore to identifiers that start with two underscores to avoid issues with magic names like '__proto__' + // TODO(yuisu): comment export function escapeIdentifier(identifier: string): string { - return identifier.length >= 2 && identifier.charCodeAt(0) === CharacterCodes._ && identifier.charCodeAt(1) === CharacterCodes._ ? "_" + identifier : identifier; + return prefixWithUnderscoreUnderscore(identifier)? "_" + identifier : identifier; } // Remove extra underscore from escaped identifier From a034314a9e92af56dbfc99e38dfd8031c51abfe5 Mon Sep 17 00:00:00 2001 From: Yui T Date: Mon, 21 Dec 2015 15:45:58 -0800 Subject: [PATCH 019/160] Add tests --- src/compiler/emitter.ts | 2 +- src/compiler/utilities.ts | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index ab775ba9fc6..726fe22aad1 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -3848,7 +3848,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi // We create a synthetic copy of the identifier in order to avoid the rewriting that might // otherwise occur when the identifier is emitted. index = createSynthesizedNode(propName.kind); - (index).text = (propName).text; + (index).text = unescapeIdentifier((propName).text); } return !nameIsComputed && index.kind === SyntaxKind.Identifier diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 3aaae73e4c4..50382b46de6 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -238,11 +238,10 @@ namespace ts { return identifier.charCodeAt(0) === CharacterCodes._ && identifier.charCodeAt(1) === CharacterCodes._ ? true : false; } } - + // Add an extra underscore to identifiers that start with two underscores to avoid issues with magic names like '__proto__' - // TODO(yuisu): comment export function escapeIdentifier(identifier: string): string { - return prefixWithUnderscoreUnderscore(identifier)? "_" + identifier : identifier; + return prefixWithUnderscoreUnderscore(identifier) ? "_" + identifier : identifier; } // Remove extra underscore from escaped identifier From 677e080dad9acd8f73baf00e3c1bd9f3425363b2 Mon Sep 17 00:00:00 2001 From: Yui T Date: Mon, 21 Dec 2015 16:23:51 -0800 Subject: [PATCH 020/160] Add tests --- src/compiler/emitter.ts | 2 +- src/compiler/utilities.ts | 5 +- ...portsAndImportsWithUnderscores1.errors.txt | 18 +++ .../exportsAndImportsWithUnderscores1.js | 29 +++++ .../exportsAndImportsWithUnderscores2.js | 27 +++++ .../exportsAndImportsWithUnderscores2.symbols | 21 ++++ .../exportsAndImportsWithUnderscores2.types | 26 +++++ .../exportsAndImportsWithUnderscores3.js | 29 +++++ .../exportsAndImportsWithUnderscores3.symbols | 23 ++++ .../exportsAndImportsWithUnderscores3.types | 30 +++++ .../exportsAndImportsWithUnderscores4.js | 75 ++++++++++++ .../exportsAndImportsWithUnderscores4.symbols | 75 ++++++++++++ .../exportsAndImportsWithUnderscores4.types | 109 ++++++++++++++++++ .../exportsAndImportsWithUnderscores1.ts | 14 +++ .../exportsAndImportsWithUnderscores2.ts | 13 +++ .../exportsAndImportsWithUnderscores3.ts | 14 +++ .../exportsAndImportsWithUnderscores4.ts | 35 ++++++ 17 files changed, 541 insertions(+), 4 deletions(-) create mode 100644 tests/baselines/reference/exportsAndImportsWithUnderscores1.errors.txt create mode 100644 tests/baselines/reference/exportsAndImportsWithUnderscores1.js create mode 100644 tests/baselines/reference/exportsAndImportsWithUnderscores2.js create mode 100644 tests/baselines/reference/exportsAndImportsWithUnderscores2.symbols create mode 100644 tests/baselines/reference/exportsAndImportsWithUnderscores2.types create mode 100644 tests/baselines/reference/exportsAndImportsWithUnderscores3.js create mode 100644 tests/baselines/reference/exportsAndImportsWithUnderscores3.symbols create mode 100644 tests/baselines/reference/exportsAndImportsWithUnderscores3.types create mode 100644 tests/baselines/reference/exportsAndImportsWithUnderscores4.js create mode 100644 tests/baselines/reference/exportsAndImportsWithUnderscores4.symbols create mode 100644 tests/baselines/reference/exportsAndImportsWithUnderscores4.types create mode 100644 tests/cases/conformance/es6/modules/exportsAndImportsWithUnderscores1.ts create mode 100644 tests/cases/conformance/es6/modules/exportsAndImportsWithUnderscores2.ts create mode 100644 tests/cases/conformance/es6/modules/exportsAndImportsWithUnderscores3.ts create mode 100644 tests/cases/conformance/es6/modules/exportsAndImportsWithUnderscores4.ts diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index ab775ba9fc6..726fe22aad1 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -3848,7 +3848,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi // We create a synthetic copy of the identifier in order to avoid the rewriting that might // otherwise occur when the identifier is emitted. index = createSynthesizedNode(propName.kind); - (index).text = (propName).text; + (index).text = unescapeIdentifier((propName).text); } return !nameIsComputed && index.kind === SyntaxKind.Identifier diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 3aaae73e4c4..50382b46de6 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -238,11 +238,10 @@ namespace ts { return identifier.charCodeAt(0) === CharacterCodes._ && identifier.charCodeAt(1) === CharacterCodes._ ? true : false; } } - + // Add an extra underscore to identifiers that start with two underscores to avoid issues with magic names like '__proto__' - // TODO(yuisu): comment export function escapeIdentifier(identifier: string): string { - return prefixWithUnderscoreUnderscore(identifier)? "_" + identifier : identifier; + return prefixWithUnderscoreUnderscore(identifier) ? "_" + identifier : identifier; } // Remove extra underscore from escaped identifier diff --git a/tests/baselines/reference/exportsAndImportsWithUnderscores1.errors.txt b/tests/baselines/reference/exportsAndImportsWithUnderscores1.errors.txt new file mode 100644 index 00000000000..7a65dd62c2b --- /dev/null +++ b/tests/baselines/reference/exportsAndImportsWithUnderscores1.errors.txt @@ -0,0 +1,18 @@ +tests/cases/conformance/es6/modules/m1.ts(6,5): error TS1005: ',' expected. + + +==== tests/cases/conformance/es6/modules/m1.ts (1 errors) ==== + + var R: any + export default R = { + "__": 20, + "_": 10 + "___": 30 + ~~~~~ +!!! error TS1005: ',' expected. + } + +==== tests/cases/conformance/es6/modules/m2.ts (0 errors) ==== + import R from "./m1"; + const { __, _, ___ } = R; + \ No newline at end of file diff --git a/tests/baselines/reference/exportsAndImportsWithUnderscores1.js b/tests/baselines/reference/exportsAndImportsWithUnderscores1.js new file mode 100644 index 00000000000..d14eab3c251 --- /dev/null +++ b/tests/baselines/reference/exportsAndImportsWithUnderscores1.js @@ -0,0 +1,29 @@ +//// [tests/cases/conformance/es6/modules/exportsAndImportsWithUnderscores1.ts] //// + +//// [m1.ts] + +var R: any +export default R = { + "__": 20, + "_": 10 + "___": 30 +} + +//// [m2.ts] +import R from "./m1"; +const { __, _, ___ } = R; + + +//// [m1.js] +"use strict"; +var R; +exports.__esModule = true; +exports["default"] = R = { + "__": 20, + "_": 10, + "___": 30 +}; +//// [m2.js] +"use strict"; +var m1_1 = require("./m1"); +var __ = m1_1["default"].__, _ = m1_1["default"]._, ___ = m1_1["default"].___; diff --git a/tests/baselines/reference/exportsAndImportsWithUnderscores2.js b/tests/baselines/reference/exportsAndImportsWithUnderscores2.js new file mode 100644 index 00000000000..5d1dcbb9322 --- /dev/null +++ b/tests/baselines/reference/exportsAndImportsWithUnderscores2.js @@ -0,0 +1,27 @@ +//// [tests/cases/conformance/es6/modules/exportsAndImportsWithUnderscores2.ts] //// + +//// [m1.ts] + +var R: any +export default R = { + "__esmodule": true, + "__proto__": {} +} + +//// [m2.ts] +import R from "./m1"; +const { __esmodule, __proto__ } = R; + + +//// [m1.js] +"use strict"; +var R; +exports.__esModule = true; +exports["default"] = R = { + "__esmodule": true, + "__proto__": {} +}; +//// [m2.js] +"use strict"; +var m1_1 = require("./m1"); +var __esmodule = m1_1["default"].__esmodule, __proto__ = m1_1["default"].__proto__; diff --git a/tests/baselines/reference/exportsAndImportsWithUnderscores2.symbols b/tests/baselines/reference/exportsAndImportsWithUnderscores2.symbols new file mode 100644 index 00000000000..d5f5ef17a62 --- /dev/null +++ b/tests/baselines/reference/exportsAndImportsWithUnderscores2.symbols @@ -0,0 +1,21 @@ +=== tests/cases/conformance/es6/modules/m1.ts === + +var R: any +>R : Symbol(R, Decl(m1.ts, 1, 3)) + +export default R = { +>R : Symbol(R, Decl(m1.ts, 1, 3)) + + "__esmodule": true, + "__proto__": {} +} + +=== tests/cases/conformance/es6/modules/m2.ts === +import R from "./m1"; +>R : Symbol(R, Decl(m2.ts, 0, 6)) + +const { __esmodule, __proto__ } = R; +>__esmodule : Symbol(__esmodule, Decl(m2.ts, 1, 7)) +>__proto__ : Symbol(__proto__, Decl(m2.ts, 1, 19)) +>R : Symbol(R, Decl(m2.ts, 0, 6)) + diff --git a/tests/baselines/reference/exportsAndImportsWithUnderscores2.types b/tests/baselines/reference/exportsAndImportsWithUnderscores2.types new file mode 100644 index 00000000000..a684440f5bd --- /dev/null +++ b/tests/baselines/reference/exportsAndImportsWithUnderscores2.types @@ -0,0 +1,26 @@ +=== tests/cases/conformance/es6/modules/m1.ts === + +var R: any +>R : any + +export default R = { +>R = { "__esmodule": true, "__proto__": {}} : { "__esmodule": boolean; "__proto__": {}; } +>R : any +>{ "__esmodule": true, "__proto__": {}} : { "__esmodule": boolean; "__proto__": {}; } + + "__esmodule": true, +>true : boolean + + "__proto__": {} +>{} : {} +} + +=== tests/cases/conformance/es6/modules/m2.ts === +import R from "./m1"; +>R : { "__esmodule": boolean; "__proto__": {}; } + +const { __esmodule, __proto__ } = R; +>__esmodule : boolean +>__proto__ : {} +>R : { "__esmodule": boolean; "__proto__": {}; } + diff --git a/tests/baselines/reference/exportsAndImportsWithUnderscores3.js b/tests/baselines/reference/exportsAndImportsWithUnderscores3.js new file mode 100644 index 00000000000..477f870742d --- /dev/null +++ b/tests/baselines/reference/exportsAndImportsWithUnderscores3.js @@ -0,0 +1,29 @@ +//// [tests/cases/conformance/es6/modules/exportsAndImportsWithUnderscores3.ts] //// + +//// [m1.ts] + +var R: any +export default R = { + "___": 30, + "___hello": 21, + "_hi": 40, +} + +//// [m2.ts] +import R from "./m1"; +const { ___, ___hello, _hi } = R; + + +//// [m1.js] +"use strict"; +var R; +exports.__esModule = true; +exports["default"] = R = { + "___": 30, + "___hello": 21, + "_hi": 40 +}; +//// [m2.js] +"use strict"; +var m1_1 = require("./m1"); +var ___ = m1_1["default"].___, ___hello = m1_1["default"].___hello, _hi = m1_1["default"]._hi; diff --git a/tests/baselines/reference/exportsAndImportsWithUnderscores3.symbols b/tests/baselines/reference/exportsAndImportsWithUnderscores3.symbols new file mode 100644 index 00000000000..cd4ba38e8c9 --- /dev/null +++ b/tests/baselines/reference/exportsAndImportsWithUnderscores3.symbols @@ -0,0 +1,23 @@ +=== tests/cases/conformance/es6/modules/m1.ts === + +var R: any +>R : Symbol(R, Decl(m1.ts, 1, 3)) + +export default R = { +>R : Symbol(R, Decl(m1.ts, 1, 3)) + + "___": 30, + "___hello": 21, + "_hi": 40, +} + +=== tests/cases/conformance/es6/modules/m2.ts === +import R from "./m1"; +>R : Symbol(R, Decl(m2.ts, 0, 6)) + +const { ___, ___hello, _hi } = R; +>___ : Symbol(___, Decl(m2.ts, 1, 7)) +>___hello : Symbol(___hello, Decl(m2.ts, 1, 12)) +>_hi : Symbol(_hi, Decl(m2.ts, 1, 22)) +>R : Symbol(R, Decl(m2.ts, 0, 6)) + diff --git a/tests/baselines/reference/exportsAndImportsWithUnderscores3.types b/tests/baselines/reference/exportsAndImportsWithUnderscores3.types new file mode 100644 index 00000000000..5addb44172d --- /dev/null +++ b/tests/baselines/reference/exportsAndImportsWithUnderscores3.types @@ -0,0 +1,30 @@ +=== tests/cases/conformance/es6/modules/m1.ts === + +var R: any +>R : any + +export default R = { +>R = { "___": 30, "___hello": 21, "_hi": 40,} : { "___": number; "___hello": number; "_hi": number; } +>R : any +>{ "___": 30, "___hello": 21, "_hi": 40,} : { "___": number; "___hello": number; "_hi": number; } + + "___": 30, +>30 : number + + "___hello": 21, +>21 : number + + "_hi": 40, +>40 : number +} + +=== tests/cases/conformance/es6/modules/m2.ts === +import R from "./m1"; +>R : { "___": number; "___hello": number; "_hi": number; } + +const { ___, ___hello, _hi } = R; +>___ : number +>___hello : number +>_hi : number +>R : { "___": number; "___hello": number; "_hi": number; } + diff --git a/tests/baselines/reference/exportsAndImportsWithUnderscores4.js b/tests/baselines/reference/exportsAndImportsWithUnderscores4.js new file mode 100644 index 00000000000..22cd7c2e71a --- /dev/null +++ b/tests/baselines/reference/exportsAndImportsWithUnderscores4.js @@ -0,0 +1,75 @@ +//// [tests/cases/conformance/es6/modules/exportsAndImportsWithUnderscores4.ts] //// + +//// [m1.ts] + +declare var console: any; +export function _() { + console.log("_"); +} +export function __() { + console.log("__"); +} +export function ___() { + console.log("___"); +} +export function _hi() { + console.log("_hi"); +} +export function __proto() { + console.log("__proto"); +} +export function __esmodule() { + console.log("__esmodule"); +} +export function ___hello(){ + console.log("___hello"); +} + +//// [m2.ts] +import {_, __, ___hello, __esmodule, __proto, _hi} from "./m1"; +_(); +__(); +___hello(); +__esmodule(); +__proto(); +_hi(); + +//// [m1.js] +"use strict"; +function _() { + console.log("_"); +} +exports._ = _; +function __() { + console.log("__"); +} +exports.__ = __; +function ___() { + console.log("___"); +} +exports.___ = ___; +function _hi() { + console.log("_hi"); +} +exports._hi = _hi; +function __proto() { + console.log("__proto"); +} +exports.__proto = __proto; +function __esmodule() { + console.log("__esmodule"); +} +exports.__esmodule = __esmodule; +function ___hello() { + console.log("___hello"); +} +exports.___hello = ___hello; +//// [m2.js] +"use strict"; +var m1_1 = require("./m1"); +m1_1._(); +m1_1.__(); +m1_1.___hello(); +m1_1.__esmodule(); +m1_1.__proto(); +m1_1._hi(); diff --git a/tests/baselines/reference/exportsAndImportsWithUnderscores4.symbols b/tests/baselines/reference/exportsAndImportsWithUnderscores4.symbols new file mode 100644 index 00000000000..a8fb3f307b5 --- /dev/null +++ b/tests/baselines/reference/exportsAndImportsWithUnderscores4.symbols @@ -0,0 +1,75 @@ +=== tests/cases/conformance/es6/modules/m1.ts === + +declare var console: any; +>console : Symbol(console, Decl(m1.ts, 1, 11)) + +export function _() { +>_ : Symbol(_, Decl(m1.ts, 1, 25)) + + console.log("_"); +>console : Symbol(console, Decl(m1.ts, 1, 11)) +} +export function __() { +>__ : Symbol(__, Decl(m1.ts, 4, 1)) + + console.log("__"); +>console : Symbol(console, Decl(m1.ts, 1, 11)) +} +export function ___() { +>___ : Symbol(___, Decl(m1.ts, 7, 1)) + + console.log("___"); +>console : Symbol(console, Decl(m1.ts, 1, 11)) +} +export function _hi() { +>_hi : Symbol(_hi, Decl(m1.ts, 10, 1)) + + console.log("_hi"); +>console : Symbol(console, Decl(m1.ts, 1, 11)) +} +export function __proto() { +>__proto : Symbol(__proto, Decl(m1.ts, 13, 1)) + + console.log("__proto"); +>console : Symbol(console, Decl(m1.ts, 1, 11)) +} +export function __esmodule() { +>__esmodule : Symbol(__esmodule, Decl(m1.ts, 16, 1)) + + console.log("__esmodule"); +>console : Symbol(console, Decl(m1.ts, 1, 11)) +} +export function ___hello(){ +>___hello : Symbol(___hello, Decl(m1.ts, 19, 1)) + + console.log("___hello"); +>console : Symbol(console, Decl(m1.ts, 1, 11)) +} + +=== tests/cases/conformance/es6/modules/m2.ts === +import {_, __, ___hello, __esmodule, __proto, _hi} from "./m1"; +>_ : Symbol(_, Decl(m2.ts, 0, 8)) +>__ : Symbol(__, Decl(m2.ts, 0, 10)) +>___hello : Symbol(___hello, Decl(m2.ts, 0, 14)) +>__esmodule : Symbol(__esmodule, Decl(m2.ts, 0, 24)) +>__proto : Symbol(__proto, Decl(m2.ts, 0, 36)) +>_hi : Symbol(_hi, Decl(m2.ts, 0, 45)) + +_(); +>_ : Symbol(_, Decl(m2.ts, 0, 8)) + +__(); +>__ : Symbol(__, Decl(m2.ts, 0, 10)) + +___hello(); +>___hello : Symbol(___hello, Decl(m2.ts, 0, 14)) + +__esmodule(); +>__esmodule : Symbol(__esmodule, Decl(m2.ts, 0, 24)) + +__proto(); +>__proto : Symbol(__proto, Decl(m2.ts, 0, 36)) + +_hi(); +>_hi : Symbol(_hi, Decl(m2.ts, 0, 45)) + diff --git a/tests/baselines/reference/exportsAndImportsWithUnderscores4.types b/tests/baselines/reference/exportsAndImportsWithUnderscores4.types new file mode 100644 index 00000000000..a9042042285 --- /dev/null +++ b/tests/baselines/reference/exportsAndImportsWithUnderscores4.types @@ -0,0 +1,109 @@ +=== tests/cases/conformance/es6/modules/m1.ts === + +declare var console: any; +>console : any + +export function _() { +>_ : () => void + + console.log("_"); +>console.log("_") : any +>console.log : any +>console : any +>log : any +>"_" : string +} +export function __() { +>__ : () => void + + console.log("__"); +>console.log("__") : any +>console.log : any +>console : any +>log : any +>"__" : string +} +export function ___() { +>___ : () => void + + console.log("___"); +>console.log("___") : any +>console.log : any +>console : any +>log : any +>"___" : string +} +export function _hi() { +>_hi : () => void + + console.log("_hi"); +>console.log("_hi") : any +>console.log : any +>console : any +>log : any +>"_hi" : string +} +export function __proto() { +>__proto : () => void + + console.log("__proto"); +>console.log("__proto") : any +>console.log : any +>console : any +>log : any +>"__proto" : string +} +export function __esmodule() { +>__esmodule : () => void + + console.log("__esmodule"); +>console.log("__esmodule") : any +>console.log : any +>console : any +>log : any +>"__esmodule" : string +} +export function ___hello(){ +>___hello : () => void + + console.log("___hello"); +>console.log("___hello") : any +>console.log : any +>console : any +>log : any +>"___hello" : string +} + +=== tests/cases/conformance/es6/modules/m2.ts === +import {_, __, ___hello, __esmodule, __proto, _hi} from "./m1"; +>_ : () => void +>__ : () => void +>___hello : () => void +>__esmodule : () => void +>__proto : () => void +>_hi : () => void + +_(); +>_() : void +>_ : () => void + +__(); +>__() : void +>__ : () => void + +___hello(); +>___hello() : void +>___hello : () => void + +__esmodule(); +>__esmodule() : void +>__esmodule : () => void + +__proto(); +>__proto() : void +>__proto : () => void + +_hi(); +>_hi() : void +>_hi : () => void + diff --git a/tests/cases/conformance/es6/modules/exportsAndImportsWithUnderscores1.ts b/tests/cases/conformance/es6/modules/exportsAndImportsWithUnderscores1.ts new file mode 100644 index 00000000000..8e38deaaf13 --- /dev/null +++ b/tests/cases/conformance/es6/modules/exportsAndImportsWithUnderscores1.ts @@ -0,0 +1,14 @@ +//@module: commonjs +//@target: ES3 + +// @filename: m1.ts +var R: any +export default R = { + "__": 20, + "_": 10 + "___": 30 +} + +// @filename: m2.ts +import R from "./m1"; +const { __, _, ___ } = R; diff --git a/tests/cases/conformance/es6/modules/exportsAndImportsWithUnderscores2.ts b/tests/cases/conformance/es6/modules/exportsAndImportsWithUnderscores2.ts new file mode 100644 index 00000000000..fac9f467549 --- /dev/null +++ b/tests/cases/conformance/es6/modules/exportsAndImportsWithUnderscores2.ts @@ -0,0 +1,13 @@ +//@module: commonjs +//@target: ES3 + +// @filename: m1.ts +var R: any +export default R = { + "__esmodule": true, + "__proto__": {} +} + +// @filename: m2.ts +import R from "./m1"; +const { __esmodule, __proto__ } = R; diff --git a/tests/cases/conformance/es6/modules/exportsAndImportsWithUnderscores3.ts b/tests/cases/conformance/es6/modules/exportsAndImportsWithUnderscores3.ts new file mode 100644 index 00000000000..cd71808915c --- /dev/null +++ b/tests/cases/conformance/es6/modules/exportsAndImportsWithUnderscores3.ts @@ -0,0 +1,14 @@ +//@module: commonjs +//@target: ES3 + +// @filename: m1.ts +var R: any +export default R = { + "___": 30, + "___hello": 21, + "_hi": 40, +} + +// @filename: m2.ts +import R from "./m1"; +const { ___, ___hello, _hi } = R; diff --git a/tests/cases/conformance/es6/modules/exportsAndImportsWithUnderscores4.ts b/tests/cases/conformance/es6/modules/exportsAndImportsWithUnderscores4.ts new file mode 100644 index 00000000000..34022597552 --- /dev/null +++ b/tests/cases/conformance/es6/modules/exportsAndImportsWithUnderscores4.ts @@ -0,0 +1,35 @@ +//@module: commonjs +//@target: ES3 + +// @filename: m1.ts +declare var console: any; +export function _() { + console.log("_"); +} +export function __() { + console.log("__"); +} +export function ___() { + console.log("___"); +} +export function _hi() { + console.log("_hi"); +} +export function __proto() { + console.log("__proto"); +} +export function __esmodule() { + console.log("__esmodule"); +} +export function ___hello(){ + console.log("___hello"); +} + +// @filename: m2.ts +import {_, __, ___hello, __esmodule, __proto, _hi} from "./m1"; +_(); +__(); +___hello(); +__esmodule(); +__proto(); +_hi(); \ No newline at end of file From 2fc906ef33d443bdf70c6d15ab98f4346fd51414 Mon Sep 17 00:00:00 2001 From: Yui T Date: Mon, 21 Dec 2015 17:07:18 -0800 Subject: [PATCH 021/160] Address PR --- src/compiler/emitter.ts | 4 ++++ src/compiler/utilities.ts | 12 ++---------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 726fe22aad1..a5ffb92b083 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -3848,6 +3848,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi // We create a synthetic copy of the identifier in order to avoid the rewriting that might // otherwise occur when the identifier is emitted. index = createSynthesizedNode(propName.kind); + // We need to escape identifier here because when parsing an identifier prefixing with "__" + // the parser need to append "_" in order to escape colliding with magic identifiers such as "__proto__" + // Therefore, in order to correctly emit identifiers that are written in original TypeScript file, + // we will unescapeIdentifier to remove additional underscore (if no underscore is added, the function will return original input string) (index).text = unescapeIdentifier((propName).text); } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 50382b46de6..6b924c1099e 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -230,18 +230,10 @@ namespace ts { return getSourceTextOfNodeFromSourceFile(getSourceFileOfNode(node), node, includeTrivia); } - function prefixWithUnderscoreUnderscore(identifier: string): boolean { - if (identifier.length <= 2) { - return false; - } - else { - return identifier.charCodeAt(0) === CharacterCodes._ && identifier.charCodeAt(1) === CharacterCodes._ ? true : false; - } - } - // Add an extra underscore to identifiers that start with two underscores to avoid issues with magic names like '__proto__' export function escapeIdentifier(identifier: string): string { - return prefixWithUnderscoreUnderscore(identifier) ? "_" + identifier : identifier; + const prefixWithUnderscore = identifier.length > 2 && identifier.charCodeAt(0) === CharacterCodes._ && identifier.charCodeAt(1) === CharacterCodes._; + return prefixWithUnderscore ? "_" + identifier : identifier; } // Remove extra underscore from escaped identifier From 0da676d24c29c180d350c2d9c43763d3ee2cb1d6 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 28 Dec 2015 15:08:14 -0500 Subject: [PATCH 022/160] Added tests. --- ...tringLiteralTypesOverloadAssignability01.ts | 17 +++++++++++++++++ ...tringLiteralTypesOverloadAssignability02.ts | 17 +++++++++++++++++ ...tringLiteralTypesOverloadAssignability03.ts | 17 +++++++++++++++++ ...tringLiteralTypesOverloadAssignability04.ts | 17 +++++++++++++++++ ...tringLiteralTypesOverloadAssignability05.ts | 18 ++++++++++++++++++ 5 files changed, 86 insertions(+) create mode 100644 tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability01.ts create mode 100644 tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability02.ts create mode 100644 tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability03.ts create mode 100644 tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability04.ts create mode 100644 tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability05.ts diff --git a/tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability01.ts b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability01.ts new file mode 100644 index 00000000000..fce073f16ef --- /dev/null +++ b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability01.ts @@ -0,0 +1,17 @@ +// @declaration: true + +function f(x: "foo"): number; +function f(x: string): number { + return 0; +} + +function g(x: "bar"): number; +function g(x: string): number { + return 0; +} + +let a = f; +let b = g; + +a = b; +b = a; \ No newline at end of file diff --git a/tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability02.ts b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability02.ts new file mode 100644 index 00000000000..1a4f18430d5 --- /dev/null +++ b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability02.ts @@ -0,0 +1,17 @@ +// @declaration: true + +function f(x: "foo"): number; +function f(x: "foo"): number { + return 0; +} + +function g(x: "bar"): number; +function g(x: "bar"): number { + return 0; +} + +let a = f; +let b = g; + +a = b; +b = a; \ No newline at end of file diff --git a/tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability03.ts b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability03.ts new file mode 100644 index 00000000000..0aacd899bcc --- /dev/null +++ b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability03.ts @@ -0,0 +1,17 @@ +// @declaration: true + +function f(x: "foo"): number; +function f(x: string): number { + return 0; +} + +function g(x: "foo"): number; +function g(x: string): number { + return 0; +} + +let a = f; +let b = g; + +a = b; +b = a; \ No newline at end of file diff --git a/tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability04.ts b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability04.ts new file mode 100644 index 00000000000..eae4046286f --- /dev/null +++ b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability04.ts @@ -0,0 +1,17 @@ +// @declaration: true + +function f(x: "foo"): number; +function f(x: "foo"): number { + return 0; +} + +function g(x: "foo"): number; +function g(x: "foo"): number { + return 0; +} + +let a = f; +let b = g; + +a = b; +b = a; \ No newline at end of file diff --git a/tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability05.ts b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability05.ts new file mode 100644 index 00000000000..9482ff02a1e --- /dev/null +++ b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability05.ts @@ -0,0 +1,18 @@ +// @declaration: true + +function f(x: "foo"): number; +function f(x: string): number; +function f(x: string): number { + return 0; +} + +function g(x: "foo"): number; +function g(x: string): number { + return 0; +} + +let a = f; +let b = g; + +a = b; +b = a; \ No newline at end of file From 0eb62881668e63052c5429810e2b12228cb3701f Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 28 Dec 2015 15:08:29 -0500 Subject: [PATCH 023/160] Accepted baselines. --- ...ralTypesOverloadAssignability01.errors.txt | 25 ++++++++++++ ...ringLiteralTypesOverloadAssignability01.js | 36 ++++++++++++++++++ ...ralTypesOverloadAssignability02.errors.txt | 31 +++++++++++++++ ...ringLiteralTypesOverloadAssignability02.js | 36 ++++++++++++++++++ ...ralTypesOverloadAssignability03.errors.txt | 25 ++++++++++++ ...ringLiteralTypesOverloadAssignability03.js | 36 ++++++++++++++++++ ...ralTypesOverloadAssignability04.errors.txt | 31 +++++++++++++++ ...ringLiteralTypesOverloadAssignability04.js | 36 ++++++++++++++++++ ...ralTypesOverloadAssignability05.errors.txt | 28 ++++++++++++++ ...ringLiteralTypesOverloadAssignability05.js | 38 +++++++++++++++++++ 10 files changed, 322 insertions(+) create mode 100644 tests/baselines/reference/stringLiteralTypesOverloadAssignability01.errors.txt create mode 100644 tests/baselines/reference/stringLiteralTypesOverloadAssignability01.js create mode 100644 tests/baselines/reference/stringLiteralTypesOverloadAssignability02.errors.txt create mode 100644 tests/baselines/reference/stringLiteralTypesOverloadAssignability02.js create mode 100644 tests/baselines/reference/stringLiteralTypesOverloadAssignability03.errors.txt create mode 100644 tests/baselines/reference/stringLiteralTypesOverloadAssignability03.js create mode 100644 tests/baselines/reference/stringLiteralTypesOverloadAssignability04.errors.txt create mode 100644 tests/baselines/reference/stringLiteralTypesOverloadAssignability04.js create mode 100644 tests/baselines/reference/stringLiteralTypesOverloadAssignability05.errors.txt create mode 100644 tests/baselines/reference/stringLiteralTypesOverloadAssignability05.js diff --git a/tests/baselines/reference/stringLiteralTypesOverloadAssignability01.errors.txt b/tests/baselines/reference/stringLiteralTypesOverloadAssignability01.errors.txt new file mode 100644 index 00000000000..56fa60a795c --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesOverloadAssignability01.errors.txt @@ -0,0 +1,25 @@ +tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability01.ts(2,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability01.ts(7,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. + + +==== tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability01.ts (2 errors) ==== + + function f(x: "foo"): number; + ~ +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. + function f(x: string): number { + return 0; + } + + function g(x: "bar"): number; + ~ +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. + function g(x: string): number { + return 0; + } + + let a = f; + let b = g; + + a = b; + b = a; \ No newline at end of file diff --git a/tests/baselines/reference/stringLiteralTypesOverloadAssignability01.js b/tests/baselines/reference/stringLiteralTypesOverloadAssignability01.js new file mode 100644 index 00000000000..7b7c84165f3 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesOverloadAssignability01.js @@ -0,0 +1,36 @@ +//// [stringLiteralTypesOverloadAssignability01.ts] + +function f(x: "foo"): number; +function f(x: string): number { + return 0; +} + +function g(x: "bar"): number; +function g(x: string): number { + return 0; +} + +let a = f; +let b = g; + +a = b; +b = a; + +//// [stringLiteralTypesOverloadAssignability01.js] +function f(x) { + return 0; +} +function g(x) { + return 0; +} +var a = f; +var b = g; +a = b; +b = a; + + +//// [stringLiteralTypesOverloadAssignability01.d.ts] +declare function f(x: "foo"): number; +declare function g(x: "bar"): number; +declare let a: typeof f; +declare let b: typeof g; diff --git a/tests/baselines/reference/stringLiteralTypesOverloadAssignability02.errors.txt b/tests/baselines/reference/stringLiteralTypesOverloadAssignability02.errors.txt new file mode 100644 index 00000000000..47862617afa --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesOverloadAssignability02.errors.txt @@ -0,0 +1,31 @@ +tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability02.ts(2,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability02.ts(3,10): error TS2381: A signature with an implementation cannot use a string literal type. +tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability02.ts(7,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability02.ts(8,10): error TS2381: A signature with an implementation cannot use a string literal type. + + +==== tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability02.ts (4 errors) ==== + + function f(x: "foo"): number; + ~ +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. + function f(x: "foo"): number { + ~ +!!! error TS2381: A signature with an implementation cannot use a string literal type. + return 0; + } + + function g(x: "bar"): number; + ~ +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. + function g(x: "bar"): number { + ~ +!!! error TS2381: A signature with an implementation cannot use a string literal type. + return 0; + } + + let a = f; + let b = g; + + a = b; + b = a; \ No newline at end of file diff --git a/tests/baselines/reference/stringLiteralTypesOverloadAssignability02.js b/tests/baselines/reference/stringLiteralTypesOverloadAssignability02.js new file mode 100644 index 00000000000..7a8db4722a6 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesOverloadAssignability02.js @@ -0,0 +1,36 @@ +//// [stringLiteralTypesOverloadAssignability02.ts] + +function f(x: "foo"): number; +function f(x: "foo"): number { + return 0; +} + +function g(x: "bar"): number; +function g(x: "bar"): number { + return 0; +} + +let a = f; +let b = g; + +a = b; +b = a; + +//// [stringLiteralTypesOverloadAssignability02.js] +function f(x) { + return 0; +} +function g(x) { + return 0; +} +var a = f; +var b = g; +a = b; +b = a; + + +//// [stringLiteralTypesOverloadAssignability02.d.ts] +declare function f(x: "foo"): number; +declare function g(x: "bar"): number; +declare let a: typeof f; +declare let b: typeof g; diff --git a/tests/baselines/reference/stringLiteralTypesOverloadAssignability03.errors.txt b/tests/baselines/reference/stringLiteralTypesOverloadAssignability03.errors.txt new file mode 100644 index 00000000000..1e58fc9028f --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesOverloadAssignability03.errors.txt @@ -0,0 +1,25 @@ +tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability03.ts(2,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability03.ts(7,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. + + +==== tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability03.ts (2 errors) ==== + + function f(x: "foo"): number; + ~ +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. + function f(x: string): number { + return 0; + } + + function g(x: "foo"): number; + ~ +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. + function g(x: string): number { + return 0; + } + + let a = f; + let b = g; + + a = b; + b = a; \ No newline at end of file diff --git a/tests/baselines/reference/stringLiteralTypesOverloadAssignability03.js b/tests/baselines/reference/stringLiteralTypesOverloadAssignability03.js new file mode 100644 index 00000000000..1d9452a9c65 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesOverloadAssignability03.js @@ -0,0 +1,36 @@ +//// [stringLiteralTypesOverloadAssignability03.ts] + +function f(x: "foo"): number; +function f(x: string): number { + return 0; +} + +function g(x: "foo"): number; +function g(x: string): number { + return 0; +} + +let a = f; +let b = g; + +a = b; +b = a; + +//// [stringLiteralTypesOverloadAssignability03.js] +function f(x) { + return 0; +} +function g(x) { + return 0; +} +var a = f; +var b = g; +a = b; +b = a; + + +//// [stringLiteralTypesOverloadAssignability03.d.ts] +declare function f(x: "foo"): number; +declare function g(x: "foo"): number; +declare let a: typeof f; +declare let b: typeof g; diff --git a/tests/baselines/reference/stringLiteralTypesOverloadAssignability04.errors.txt b/tests/baselines/reference/stringLiteralTypesOverloadAssignability04.errors.txt new file mode 100644 index 00000000000..1b179b95fe6 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesOverloadAssignability04.errors.txt @@ -0,0 +1,31 @@ +tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability04.ts(2,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability04.ts(3,10): error TS2381: A signature with an implementation cannot use a string literal type. +tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability04.ts(7,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability04.ts(8,10): error TS2381: A signature with an implementation cannot use a string literal type. + + +==== tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability04.ts (4 errors) ==== + + function f(x: "foo"): number; + ~ +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. + function f(x: "foo"): number { + ~ +!!! error TS2381: A signature with an implementation cannot use a string literal type. + return 0; + } + + function g(x: "foo"): number; + ~ +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. + function g(x: "foo"): number { + ~ +!!! error TS2381: A signature with an implementation cannot use a string literal type. + return 0; + } + + let a = f; + let b = g; + + a = b; + b = a; \ No newline at end of file diff --git a/tests/baselines/reference/stringLiteralTypesOverloadAssignability04.js b/tests/baselines/reference/stringLiteralTypesOverloadAssignability04.js new file mode 100644 index 00000000000..975c7d80cb5 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesOverloadAssignability04.js @@ -0,0 +1,36 @@ +//// [stringLiteralTypesOverloadAssignability04.ts] + +function f(x: "foo"): number; +function f(x: "foo"): number { + return 0; +} + +function g(x: "foo"): number; +function g(x: "foo"): number { + return 0; +} + +let a = f; +let b = g; + +a = b; +b = a; + +//// [stringLiteralTypesOverloadAssignability04.js] +function f(x) { + return 0; +} +function g(x) { + return 0; +} +var a = f; +var b = g; +a = b; +b = a; + + +//// [stringLiteralTypesOverloadAssignability04.d.ts] +declare function f(x: "foo"): number; +declare function g(x: "foo"): number; +declare let a: typeof f; +declare let b: typeof g; diff --git a/tests/baselines/reference/stringLiteralTypesOverloadAssignability05.errors.txt b/tests/baselines/reference/stringLiteralTypesOverloadAssignability05.errors.txt new file mode 100644 index 00000000000..0830f08fb80 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesOverloadAssignability05.errors.txt @@ -0,0 +1,28 @@ +tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability05.ts(8,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability05.ts(16,1): error TS2322: Type '(x: "foo") => number' is not assignable to type '{ (x: "foo"): number; (x: string): number; }'. + Type '(x: "foo") => number' provides no match for the signature '(x: string): number' + + +==== tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability05.ts (2 errors) ==== + + function f(x: "foo"): number; + function f(x: string): number; + function f(x: string): number { + return 0; + } + + function g(x: "foo"): number; + ~ +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. + function g(x: string): number { + return 0; + } + + let a = f; + let b = g; + + a = b; + ~ +!!! error TS2322: Type '(x: "foo") => number' is not assignable to type '{ (x: "foo"): number; (x: string): number; }'. +!!! error TS2322: Type '(x: "foo") => number' provides no match for the signature '(x: string): number' + b = a; \ No newline at end of file diff --git a/tests/baselines/reference/stringLiteralTypesOverloadAssignability05.js b/tests/baselines/reference/stringLiteralTypesOverloadAssignability05.js new file mode 100644 index 00000000000..b08dbc04082 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesOverloadAssignability05.js @@ -0,0 +1,38 @@ +//// [stringLiteralTypesOverloadAssignability05.ts] + +function f(x: "foo"): number; +function f(x: string): number; +function f(x: string): number { + return 0; +} + +function g(x: "foo"): number; +function g(x: string): number { + return 0; +} + +let a = f; +let b = g; + +a = b; +b = a; + +//// [stringLiteralTypesOverloadAssignability05.js] +function f(x) { + return 0; +} +function g(x) { + return 0; +} +var a = f; +var b = g; +a = b; +b = a; + + +//// [stringLiteralTypesOverloadAssignability05.d.ts] +declare function f(x: "foo"): number; +declare function f(x: string): number; +declare function g(x: "foo"): number; +declare let a: typeof f; +declare let b: typeof g; From f1b84950eaae83ddcddac228186e3f4dfbbe0273 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 28 Dec 2015 15:10:01 -0500 Subject: [PATCH 024/160] Removed checks for specialized signature compatibility and always perform the same checking on specialized and non-specialized signatures. --- src/compiler/checker.ts | 70 +++-------------------------------------- 1 file changed, 4 insertions(+), 66 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 5d57e9d2028..16e957f35b5 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -11273,8 +11273,6 @@ namespace ts { } } } - - checkSpecializedSignatureDeclaration(node); } function checkTypeForDuplicateIndexSignatures(node: Node) { @@ -11589,48 +11587,6 @@ namespace ts { return (node.flags & NodeFlags.Private) && isInAmbientContext(node); } - function checkSpecializedSignatureDeclaration(signatureDeclarationNode: SignatureDeclaration): void { - if (!produceDiagnostics) { - return; - } - const signature = getSignatureFromDeclaration(signatureDeclarationNode); - if (!signature.hasStringLiterals) { - return; - } - - // TypeScript 1.0 spec (April 2014): 3.7.2.2 - // Specialized signatures are not permitted in conjunction with a function body - if (nodeIsPresent((signatureDeclarationNode).body)) { - error(signatureDeclarationNode, Diagnostics.A_signature_with_an_implementation_cannot_use_a_string_literal_type); - return; - } - - // TypeScript 1.0 spec (April 2014): 3.7.2.4 - // Every specialized call or construct signature in an object type must be assignable - // to at least one non-specialized call or construct signature in the same object type - let signaturesToCheck: Signature[]; - // Unnamed (call\construct) signatures in interfaces are inherited and not shadowed so examining just node symbol won't give complete answer. - // Use declaring type to obtain full list of signatures. - if (!signatureDeclarationNode.name && signatureDeclarationNode.parent && signatureDeclarationNode.parent.kind === SyntaxKind.InterfaceDeclaration) { - Debug.assert(signatureDeclarationNode.kind === SyntaxKind.CallSignature || signatureDeclarationNode.kind === SyntaxKind.ConstructSignature); - const signatureKind = signatureDeclarationNode.kind === SyntaxKind.CallSignature ? SignatureKind.Call : SignatureKind.Construct; - const containingSymbol = getSymbolOfNode(signatureDeclarationNode.parent); - const containingType = getDeclaredTypeOfSymbol(containingSymbol); - signaturesToCheck = getSignaturesOfType(containingType, signatureKind); - } - else { - signaturesToCheck = getSignaturesOfSymbol(getSymbolOfNode(signatureDeclarationNode)); - } - - for (const otherSignature of signaturesToCheck) { - if (!otherSignature.hasStringLiterals && isSignatureAssignableTo(signature, otherSignature, /*ignoreReturnTypes*/ false)) { - return; - } - } - - error(signatureDeclarationNode, Diagnostics.Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature); - } - function getEffectiveDeclarationFlags(n: Node, flagsToCheck: NodeFlags): NodeFlags { let flags = getCombinedNodeFlags(n); @@ -11852,28 +11808,10 @@ namespace ts { if (bodyDeclaration) { const signatures = getSignaturesOfSymbol(symbol); const bodySignature = getSignatureFromDeclaration(bodyDeclaration); - // If the implementation signature has string literals, we will have reported an error in - // checkSpecializedSignatureDeclaration - if (!bodySignature.hasStringLiterals) { - // TypeScript 1.0 spec (April 2014): 6.1 - // If a function declaration includes overloads, the overloads determine the call - // signatures of the type given to the function object - // and the function implementation signature must be assignable to that type - // - // TypeScript 1.0 spec (April 2014): 3.8.4 - // Note that specialized call and construct signatures (section 3.7.2.4) are not significant when determining assignment compatibility - // Consider checking against specialized signatures too. Not doing so creates a type hole: - // - // function g(x: "hi", y: boolean); - // function g(x: string, y: {}); - // function g(x: string, y: string) { } - // - // The implementation is completely unrelated to the specialized signature, yet we do not check this. - for (const signature of signatures) { - if (!signature.hasStringLiterals && !isImplementationCompatibleWithOverload(bodySignature, signature)) { - error(signature.declaration, Diagnostics.Overload_signature_is_not_compatible_with_function_implementation); - break; - } + for (const signature of signatures) { + if (!isImplementationCompatibleWithOverload(bodySignature, signature)) { + error(signature.declaration, Diagnostics.Overload_signature_is_not_compatible_with_function_implementation); + break; } } } From b0f58649ab7913fdc8e4ecaef3aef1f66cd799c4 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 28 Dec 2015 15:25:48 -0500 Subject: [PATCH 025/160] Accepted baselines. --- .../reference/ambientErrors.errors.txt | 5 +- ...callbackArgsDifferByOptionality.errors.txt | 5 +- ...tOverloadFunctionNoSubtypeError.errors.txt | 26 -- ...tantOverloadFunctionNoSubtypeError.symbols | 48 +++ ...nstantOverloadFunctionNoSubtypeError.types | 49 +++ ...uctorsWithSpecializedSignatures.errors.txt | 30 +- ...ertyIsRelatableToTargetProperty.errors.txt | 5 +- ...overloadOnConstAsTypeAnnotation.errors.txt | 5 +- ...rloadOnConstDuplicateOverloads1.errors.txt | 19 - ...overloadOnConstDuplicateOverloads1.symbols | 37 ++ .../overloadOnConstDuplicateOverloads1.types | 37 ++ ...eWithBadImplementationInDerived.errors.txt | 17 - ...BaseWithBadImplementationInDerived.symbols | 22 ++ ...InBaseWithBadImplementationInDerived.types | 22 ++ .../overloadOnConstInCallback1.errors.txt | 15 - .../overloadOnConstInCallback1.symbols | 30 ++ .../overloadOnConstInCallback1.types | 36 ++ ...tLiteralImplementingAnInterface.errors.txt | 14 - ...jectLiteralImplementingAnInterface.symbols | 19 + ...ObjectLiteralImplementingAnInterface.types | 21 + .../overloadOnConstInheritance2.errors.txt | 5 +- .../overloadOnConstInheritance3.errors.txt | 8 +- .../overloadOnConstInheritance4.errors.txt | 21 - .../overloadOnConstInheritance4.symbols | 28 ++ .../overloadOnConstInheritance4.types | 28 ++ ...rloadOnConstNoAnyImplementation.errors.txt | 11 +- ...loadOnConstNoAnyImplementation2.errors.txt | 14 +- ...nConstNoNonSpecializedSignature.errors.txt | 11 - ...adOnConstNoNonSpecializedSignature.symbols | 13 + ...loadOnConstNoNonSpecializedSignature.types | 13 + ...adOnConstNoStringImplementation.errors.txt | 27 -- ...rloadOnConstNoStringImplementation.symbols | 56 +++ ...verloadOnConstNoStringImplementation.types | 78 ++++ ...dOnConstNoStringImplementation2.errors.txt | 35 -- ...loadOnConstNoStringImplementation2.symbols | 73 ++++ ...erloadOnConstNoStringImplementation2.types | 97 +++++ ...loadOnConstantsInvalidOverload1.errors.txt | 9 +- .../overloadingOnConstants2.errors.txt | 13 +- ...dingOnConstantsInImplementation.errors.txt | 16 - ...loadingOnConstantsInImplementation.symbols | 16 + ...erloadingOnConstantsInImplementation.types | 16 + ...lizedOverloadWithRestParameters.errors.txt | 21 - ...cializedOverloadWithRestParameters.symbols | 48 +++ ...pecializedOverloadWithRestParameters.types | 50 +++ ...edSignatureAsCallbackParameter1.errors.txt | 7 +- ...ubtypeOfNonSpecializedSignature.errors.txt | 39 +- ...eOverloadReturnTypeWithIndexers.errors.txt | 22 -- ...tureOverloadReturnTypeWithIndexers.symbols | 53 +++ ...natureOverloadReturnTypeWithIndexers.types | 53 +++ ...ingLiteralTypeIsSubtypeOfString.errors.txt | 124 ------ ...stringLiteralTypeIsSubtypeOfString.symbols | 343 +++++++++++++++++ .../stringLiteralTypeIsSubtypeOfString.types | 363 ++++++++++++++++++ .../stringLiteralTypesAsTags02.errors.txt | 50 --- .../stringLiteralTypesAsTags02.symbols | 106 +++++ .../stringLiteralTypesAsTags02.types | 115 ++++++ ...LiteralTypesAsTypeParameterConstraint01.js | 23 -- ...TypesInImplementationSignatures.errors.txt | 62 --- ...ralTypesInImplementationSignatures.symbols | 66 ++++ ...teralTypesInImplementationSignatures.types | 71 ++++ ...ypesInImplementationSignatures2.errors.txt | 38 +- ...ralTypesOverloadAssignability01.errors.txt | 25 -- ...iteralTypesOverloadAssignability01.symbols | 40 ++ ...gLiteralTypesOverloadAssignability01.types | 44 +++ ...ralTypesOverloadAssignability02.errors.txt | 31 -- ...iteralTypesOverloadAssignability02.symbols | 40 ++ ...gLiteralTypesOverloadAssignability02.types | 44 +++ ...ralTypesOverloadAssignability03.errors.txt | 25 -- ...iteralTypesOverloadAssignability03.symbols | 40 ++ ...gLiteralTypesOverloadAssignability03.types | 44 +++ ...ralTypesOverloadAssignability04.errors.txt | 31 -- ...iteralTypesOverloadAssignability04.symbols | 40 ++ ...gLiteralTypesOverloadAssignability04.types | 44 +++ ...ralTypesOverloadAssignability05.errors.txt | 5 +- ...ingLiteralTypesTypePredicates01.errors.txt | 33 -- ...stringLiteralTypesTypePredicates01.symbols | 62 +++ .../stringLiteralTypesTypePredicates01.types | 69 ++++ ...gumentsWithStringLiteralTypes01.errors.txt | 5 +- 77 files changed, 2504 insertions(+), 822 deletions(-) delete mode 100644 tests/baselines/reference/constantOverloadFunctionNoSubtypeError.errors.txt create mode 100644 tests/baselines/reference/constantOverloadFunctionNoSubtypeError.symbols create mode 100644 tests/baselines/reference/constantOverloadFunctionNoSubtypeError.types delete mode 100644 tests/baselines/reference/overloadOnConstDuplicateOverloads1.errors.txt create mode 100644 tests/baselines/reference/overloadOnConstDuplicateOverloads1.symbols create mode 100644 tests/baselines/reference/overloadOnConstDuplicateOverloads1.types delete mode 100644 tests/baselines/reference/overloadOnConstInBaseWithBadImplementationInDerived.errors.txt create mode 100644 tests/baselines/reference/overloadOnConstInBaseWithBadImplementationInDerived.symbols create mode 100644 tests/baselines/reference/overloadOnConstInBaseWithBadImplementationInDerived.types delete mode 100644 tests/baselines/reference/overloadOnConstInCallback1.errors.txt create mode 100644 tests/baselines/reference/overloadOnConstInCallback1.symbols create mode 100644 tests/baselines/reference/overloadOnConstInCallback1.types delete mode 100644 tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.errors.txt create mode 100644 tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.symbols create mode 100644 tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.types delete mode 100644 tests/baselines/reference/overloadOnConstInheritance4.errors.txt create mode 100644 tests/baselines/reference/overloadOnConstInheritance4.symbols create mode 100644 tests/baselines/reference/overloadOnConstInheritance4.types delete mode 100644 tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.errors.txt create mode 100644 tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.symbols create mode 100644 tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.types delete mode 100644 tests/baselines/reference/overloadOnConstNoStringImplementation.errors.txt create mode 100644 tests/baselines/reference/overloadOnConstNoStringImplementation.symbols create mode 100644 tests/baselines/reference/overloadOnConstNoStringImplementation.types delete mode 100644 tests/baselines/reference/overloadOnConstNoStringImplementation2.errors.txt create mode 100644 tests/baselines/reference/overloadOnConstNoStringImplementation2.symbols create mode 100644 tests/baselines/reference/overloadOnConstNoStringImplementation2.types delete mode 100644 tests/baselines/reference/overloadingOnConstantsInImplementation.errors.txt create mode 100644 tests/baselines/reference/overloadingOnConstantsInImplementation.symbols create mode 100644 tests/baselines/reference/overloadingOnConstantsInImplementation.types delete mode 100644 tests/baselines/reference/specializedOverloadWithRestParameters.errors.txt create mode 100644 tests/baselines/reference/specializedOverloadWithRestParameters.symbols create mode 100644 tests/baselines/reference/specializedOverloadWithRestParameters.types delete mode 100644 tests/baselines/reference/specializedSignatureOverloadReturnTypeWithIndexers.errors.txt create mode 100644 tests/baselines/reference/specializedSignatureOverloadReturnTypeWithIndexers.symbols create mode 100644 tests/baselines/reference/specializedSignatureOverloadReturnTypeWithIndexers.types delete mode 100644 tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.errors.txt create mode 100644 tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.symbols create mode 100644 tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.types delete mode 100644 tests/baselines/reference/stringLiteralTypesAsTags02.errors.txt create mode 100644 tests/baselines/reference/stringLiteralTypesAsTags02.symbols create mode 100644 tests/baselines/reference/stringLiteralTypesAsTags02.types delete mode 100644 tests/baselines/reference/stringLiteralTypesInImplementationSignatures.errors.txt create mode 100644 tests/baselines/reference/stringLiteralTypesInImplementationSignatures.symbols create mode 100644 tests/baselines/reference/stringLiteralTypesInImplementationSignatures.types delete mode 100644 tests/baselines/reference/stringLiteralTypesOverloadAssignability01.errors.txt create mode 100644 tests/baselines/reference/stringLiteralTypesOverloadAssignability01.symbols create mode 100644 tests/baselines/reference/stringLiteralTypesOverloadAssignability01.types delete mode 100644 tests/baselines/reference/stringLiteralTypesOverloadAssignability02.errors.txt create mode 100644 tests/baselines/reference/stringLiteralTypesOverloadAssignability02.symbols create mode 100644 tests/baselines/reference/stringLiteralTypesOverloadAssignability02.types delete mode 100644 tests/baselines/reference/stringLiteralTypesOverloadAssignability03.errors.txt create mode 100644 tests/baselines/reference/stringLiteralTypesOverloadAssignability03.symbols create mode 100644 tests/baselines/reference/stringLiteralTypesOverloadAssignability03.types delete mode 100644 tests/baselines/reference/stringLiteralTypesOverloadAssignability04.errors.txt create mode 100644 tests/baselines/reference/stringLiteralTypesOverloadAssignability04.symbols create mode 100644 tests/baselines/reference/stringLiteralTypesOverloadAssignability04.types delete mode 100644 tests/baselines/reference/stringLiteralTypesTypePredicates01.errors.txt create mode 100644 tests/baselines/reference/stringLiteralTypesTypePredicates01.symbols create mode 100644 tests/baselines/reference/stringLiteralTypesTypePredicates01.types diff --git a/tests/baselines/reference/ambientErrors.errors.txt b/tests/baselines/reference/ambientErrors.errors.txt index 5e257c2de3f..7b42085e0c2 100644 --- a/tests/baselines/reference/ambientErrors.errors.txt +++ b/tests/baselines/reference/ambientErrors.errors.txt @@ -1,5 +1,4 @@ tests/cases/conformance/ambient/ambientErrors.ts(2,15): error TS1039: Initializers are not allowed in ambient contexts. -tests/cases/conformance/ambient/ambientErrors.ts(6,18): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. tests/cases/conformance/ambient/ambientErrors.ts(17,22): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. tests/cases/conformance/ambient/ambientErrors.ts(20,24): error TS1183: An implementation cannot be declared in ambient contexts. tests/cases/conformance/ambient/ambientErrors.ts(29,9): error TS1066: In ambient enum declarations member initializer must be constant expression. @@ -15,7 +14,7 @@ tests/cases/conformance/ambient/ambientErrors.ts(51,16): error TS2436: Ambient m tests/cases/conformance/ambient/ambientErrors.ts(57,5): error TS2309: An export assignment cannot be used in a module with other exported elements. -==== tests/cases/conformance/ambient/ambientErrors.ts (15 errors) ==== +==== tests/cases/conformance/ambient/ambientErrors.ts (14 errors) ==== // Ambient variable with an initializer declare var x = 4; ~ @@ -24,8 +23,6 @@ tests/cases/conformance/ambient/ambientErrors.ts(57,5): error TS2309: An export // Ambient functions with invalid overloads declare function fn(x: number): string; declare function fn(x: 'foo'): number; - ~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. // Ambient functions with duplicate signatures declare function fn1(x: number): string; diff --git a/tests/baselines/reference/callbackArgsDifferByOptionality.errors.txt b/tests/baselines/reference/callbackArgsDifferByOptionality.errors.txt index 2df02c30185..5ec083a685a 100644 --- a/tests/baselines/reference/callbackArgsDifferByOptionality.errors.txt +++ b/tests/baselines/reference/callbackArgsDifferByOptionality.errors.txt @@ -1,11 +1,8 @@ -tests/cases/compiler/callbackArgsDifferByOptionality.ts(1,23): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. tests/cases/compiler/callbackArgsDifferByOptionality.ts(4,5): error TS2304: Cannot find name 'cb'. -==== tests/cases/compiler/callbackArgsDifferByOptionality.ts (2 errors) ==== +==== tests/cases/compiler/callbackArgsDifferByOptionality.ts (1 errors) ==== function x3(callback: (x?: 'hi') => number); - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function x3(callback: (x: string) => number); function x3(callback: (x: any) => number) { cb(); diff --git a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.errors.txt b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.errors.txt deleted file mode 100644 index 3c5e6f8efca..00000000000 --- a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.errors.txt +++ /dev/null @@ -1,26 +0,0 @@ -tests/cases/compiler/constantOverloadFunctionNoSubtypeError.ts(6,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/compiler/constantOverloadFunctionNoSubtypeError.ts(7,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/compiler/constantOverloadFunctionNoSubtypeError.ts(8,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - - -==== tests/cases/compiler/constantOverloadFunctionNoSubtypeError.ts (3 errors) ==== - class Base { foo() { } } - class Derived1 extends Base { bar() { } } - class Derived2 extends Base { baz() { } } - class Derived3 extends Base { biz() { } } - - function foo(tagName: 'canvas'): Derived3; - ~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - function foo(tagName: 'div'): Derived2; - ~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - function foo(tagName: 'span'): Derived1; - ~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - function foo(tagName: number): Base; - function foo(tagName: any): Base { - - return null; - } - \ No newline at end of file diff --git a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.symbols b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.symbols new file mode 100644 index 00000000000..3a604e4b30e --- /dev/null +++ b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.symbols @@ -0,0 +1,48 @@ +=== tests/cases/compiler/constantOverloadFunctionNoSubtypeError.ts === +class Base { foo() { } } +>Base : Symbol(Base, Decl(constantOverloadFunctionNoSubtypeError.ts, 0, 0)) +>foo : Symbol(foo, Decl(constantOverloadFunctionNoSubtypeError.ts, 0, 12)) + +class Derived1 extends Base { bar() { } } +>Derived1 : Symbol(Derived1, Decl(constantOverloadFunctionNoSubtypeError.ts, 0, 24)) +>Base : Symbol(Base, Decl(constantOverloadFunctionNoSubtypeError.ts, 0, 0)) +>bar : Symbol(bar, Decl(constantOverloadFunctionNoSubtypeError.ts, 1, 29)) + +class Derived2 extends Base { baz() { } } +>Derived2 : Symbol(Derived2, Decl(constantOverloadFunctionNoSubtypeError.ts, 1, 41)) +>Base : Symbol(Base, Decl(constantOverloadFunctionNoSubtypeError.ts, 0, 0)) +>baz : Symbol(baz, Decl(constantOverloadFunctionNoSubtypeError.ts, 2, 29)) + +class Derived3 extends Base { biz() { } } +>Derived3 : Symbol(Derived3, Decl(constantOverloadFunctionNoSubtypeError.ts, 2, 41)) +>Base : Symbol(Base, Decl(constantOverloadFunctionNoSubtypeError.ts, 0, 0)) +>biz : Symbol(biz, Decl(constantOverloadFunctionNoSubtypeError.ts, 3, 29)) + +function foo(tagName: 'canvas'): Derived3; +>foo : Symbol(foo, Decl(constantOverloadFunctionNoSubtypeError.ts, 3, 41), Decl(constantOverloadFunctionNoSubtypeError.ts, 5, 42), Decl(constantOverloadFunctionNoSubtypeError.ts, 6, 40), Decl(constantOverloadFunctionNoSubtypeError.ts, 7, 40), Decl(constantOverloadFunctionNoSubtypeError.ts, 8, 36)) +>tagName : Symbol(tagName, Decl(constantOverloadFunctionNoSubtypeError.ts, 5, 13)) +>Derived3 : Symbol(Derived3, Decl(constantOverloadFunctionNoSubtypeError.ts, 2, 41)) + +function foo(tagName: 'div'): Derived2; +>foo : Symbol(foo, Decl(constantOverloadFunctionNoSubtypeError.ts, 3, 41), Decl(constantOverloadFunctionNoSubtypeError.ts, 5, 42), Decl(constantOverloadFunctionNoSubtypeError.ts, 6, 40), Decl(constantOverloadFunctionNoSubtypeError.ts, 7, 40), Decl(constantOverloadFunctionNoSubtypeError.ts, 8, 36)) +>tagName : Symbol(tagName, Decl(constantOverloadFunctionNoSubtypeError.ts, 6, 13)) +>Derived2 : Symbol(Derived2, Decl(constantOverloadFunctionNoSubtypeError.ts, 1, 41)) + +function foo(tagName: 'span'): Derived1; +>foo : Symbol(foo, Decl(constantOverloadFunctionNoSubtypeError.ts, 3, 41), Decl(constantOverloadFunctionNoSubtypeError.ts, 5, 42), Decl(constantOverloadFunctionNoSubtypeError.ts, 6, 40), Decl(constantOverloadFunctionNoSubtypeError.ts, 7, 40), Decl(constantOverloadFunctionNoSubtypeError.ts, 8, 36)) +>tagName : Symbol(tagName, Decl(constantOverloadFunctionNoSubtypeError.ts, 7, 13)) +>Derived1 : Symbol(Derived1, Decl(constantOverloadFunctionNoSubtypeError.ts, 0, 24)) + +function foo(tagName: number): Base; +>foo : Symbol(foo, Decl(constantOverloadFunctionNoSubtypeError.ts, 3, 41), Decl(constantOverloadFunctionNoSubtypeError.ts, 5, 42), Decl(constantOverloadFunctionNoSubtypeError.ts, 6, 40), Decl(constantOverloadFunctionNoSubtypeError.ts, 7, 40), Decl(constantOverloadFunctionNoSubtypeError.ts, 8, 36)) +>tagName : Symbol(tagName, Decl(constantOverloadFunctionNoSubtypeError.ts, 8, 13)) +>Base : Symbol(Base, Decl(constantOverloadFunctionNoSubtypeError.ts, 0, 0)) + +function foo(tagName: any): Base { +>foo : Symbol(foo, Decl(constantOverloadFunctionNoSubtypeError.ts, 3, 41), Decl(constantOverloadFunctionNoSubtypeError.ts, 5, 42), Decl(constantOverloadFunctionNoSubtypeError.ts, 6, 40), Decl(constantOverloadFunctionNoSubtypeError.ts, 7, 40), Decl(constantOverloadFunctionNoSubtypeError.ts, 8, 36)) +>tagName : Symbol(tagName, Decl(constantOverloadFunctionNoSubtypeError.ts, 9, 13)) +>Base : Symbol(Base, Decl(constantOverloadFunctionNoSubtypeError.ts, 0, 0)) + + return null; +} + diff --git a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.types b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.types new file mode 100644 index 00000000000..121faab82d5 --- /dev/null +++ b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.types @@ -0,0 +1,49 @@ +=== tests/cases/compiler/constantOverloadFunctionNoSubtypeError.ts === +class Base { foo() { } } +>Base : Base +>foo : () => void + +class Derived1 extends Base { bar() { } } +>Derived1 : Derived1 +>Base : Base +>bar : () => void + +class Derived2 extends Base { baz() { } } +>Derived2 : Derived2 +>Base : Base +>baz : () => void + +class Derived3 extends Base { biz() { } } +>Derived3 : Derived3 +>Base : Base +>biz : () => void + +function foo(tagName: 'canvas'): Derived3; +>foo : { (tagName: "canvas"): Derived3; (tagName: "div"): Derived2; (tagName: "span"): Derived1; (tagName: number): Base; } +>tagName : "canvas" +>Derived3 : Derived3 + +function foo(tagName: 'div'): Derived2; +>foo : { (tagName: "canvas"): Derived3; (tagName: "div"): Derived2; (tagName: "span"): Derived1; (tagName: number): Base; } +>tagName : "div" +>Derived2 : Derived2 + +function foo(tagName: 'span'): Derived1; +>foo : { (tagName: "canvas"): Derived3; (tagName: "div"): Derived2; (tagName: "span"): Derived1; (tagName: number): Base; } +>tagName : "span" +>Derived1 : Derived1 + +function foo(tagName: number): Base; +>foo : { (tagName: "canvas"): Derived3; (tagName: "div"): Derived2; (tagName: "span"): Derived1; (tagName: number): Base; } +>tagName : number +>Base : Base + +function foo(tagName: any): Base { +>foo : { (tagName: "canvas"): Derived3; (tagName: "div"): Derived2; (tagName: "span"): Derived1; (tagName: number): Base; } +>tagName : any +>Base : Base + + return null; +>null : null +} + diff --git a/tests/baselines/reference/constructorsWithSpecializedSignatures.errors.txt b/tests/baselines/reference/constructorsWithSpecializedSignatures.errors.txt index c4d0c7ffb66..4f869fd63a0 100644 --- a/tests/baselines/reference/constructorsWithSpecializedSignatures.errors.txt +++ b/tests/baselines/reference/constructorsWithSpecializedSignatures.errors.txt @@ -1,22 +1,12 @@ -tests/cases/compiler/constructorsWithSpecializedSignatures.ts(3,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/compiler/constructorsWithSpecializedSignatures.ts(4,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/compiler/constructorsWithSpecializedSignatures.ts(17,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/compiler/constructorsWithSpecializedSignatures.ts(18,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/compiler/constructorsWithSpecializedSignatures.ts(20,5): error TS2381: A signature with an implementation cannot use a string literal type. -tests/cases/compiler/constructorsWithSpecializedSignatures.ts(28,5): error TS2381: A signature with an implementation cannot use a string literal type. -tests/cases/compiler/constructorsWithSpecializedSignatures.ts(33,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/compiler/constructorsWithSpecializedSignatures.ts(34,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/constructorsWithSpecializedSignatures.ts(18,5): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/compiler/constructorsWithSpecializedSignatures.ts(26,5): error TS2394: Overload signature is not compatible with function implementation. -==== tests/cases/compiler/constructorsWithSpecializedSignatures.ts (8 errors) ==== +==== tests/cases/compiler/constructorsWithSpecializedSignatures.ts (2 errors) ==== // errors declare class C { constructor(x: "hi"); - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. constructor(x: "foo"); - ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. constructor(x: number); } @@ -30,35 +20,27 @@ tests/cases/compiler/constructorsWithSpecializedSignatures.ts(34,5): error TS238 // errors class D { constructor(x: "hi"); - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. constructor(x: "foo"); ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2394: Overload signature is not compatible with function implementation. constructor(x: number); constructor(x: "hi") { } - ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2381: A signature with an implementation cannot use a string literal type. } // overloads are ok class D2 { constructor(x: "hi"); constructor(x: "foo"); + ~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2394: Overload signature is not compatible with function implementation. constructor(x: string); constructor(x: "hi") { } // error - ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2381: A signature with an implementation cannot use a string literal type. } // errors interface I { new (x: "hi"); - ~~~~~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. new (x: "foo"); - ~~~~~~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. new (x: number); } diff --git a/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.errors.txt b/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.errors.txt index 450d180e884..2938f7bf18d 100644 --- a/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.errors.txt +++ b/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.errors.txt @@ -1,16 +1,13 @@ -tests/cases/compiler/crashInsourcePropertyIsRelatableToTargetProperty.ts(5,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. tests/cases/compiler/crashInsourcePropertyIsRelatableToTargetProperty.ts(9,5): error TS2322: Type '(x: "hi", items: string[]) => typeof foo' is not assignable to type 'D'. Property 'x' is missing in type '(x: "hi", items: string[]) => typeof foo'. -==== tests/cases/compiler/crashInsourcePropertyIsRelatableToTargetProperty.ts (2 errors) ==== +==== tests/cases/compiler/crashInsourcePropertyIsRelatableToTargetProperty.ts (1 errors) ==== class C { private x = 1; } class D extends C { } function foo(x: "hi", items: string[]): typeof foo; - ~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function foo(x: string, items: string[]): typeof foo { return null; } diff --git a/tests/baselines/reference/overloadOnConstAsTypeAnnotation.errors.txt b/tests/baselines/reference/overloadOnConstAsTypeAnnotation.errors.txt index a78e0c8abcf..45f61055ede 100644 --- a/tests/baselines/reference/overloadOnConstAsTypeAnnotation.errors.txt +++ b/tests/baselines/reference/overloadOnConstAsTypeAnnotation.errors.txt @@ -1,11 +1,8 @@ -tests/cases/compiler/overloadOnConstAsTypeAnnotation.ts(2,8): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. tests/cases/compiler/overloadOnConstAsTypeAnnotation.ts(2,37): error TS1005: ';' expected. -==== tests/cases/compiler/overloadOnConstAsTypeAnnotation.ts (2 errors) ==== +==== tests/cases/compiler/overloadOnConstAsTypeAnnotation.ts (1 errors) ==== var f: (x: 'hi') => number = ('hi') => { return 1; }; - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. ~~ !!! error TS1005: ';' expected. \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstDuplicateOverloads1.errors.txt b/tests/baselines/reference/overloadOnConstDuplicateOverloads1.errors.txt deleted file mode 100644 index 0f5126b5920..00000000000 --- a/tests/baselines/reference/overloadOnConstDuplicateOverloads1.errors.txt +++ /dev/null @@ -1,19 +0,0 @@ -tests/cases/compiler/overloadOnConstDuplicateOverloads1.ts(1,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/compiler/overloadOnConstDuplicateOverloads1.ts(2,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - - -==== tests/cases/compiler/overloadOnConstDuplicateOverloads1.ts (2 errors) ==== - function foo(a: 'hi', x: string); - ~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - function foo(a: 'hi', x: string); - ~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - function foo(a: any, x: any) { - } - - function foo2(a: 'hi', x: string); - function foo2(a: 'hi', x: string); - function foo2(a: string, x: string); - function foo2(a: any, x: any) { - } \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstDuplicateOverloads1.symbols b/tests/baselines/reference/overloadOnConstDuplicateOverloads1.symbols new file mode 100644 index 00000000000..5ac0cfbd00c --- /dev/null +++ b/tests/baselines/reference/overloadOnConstDuplicateOverloads1.symbols @@ -0,0 +1,37 @@ +=== tests/cases/compiler/overloadOnConstDuplicateOverloads1.ts === +function foo(a: 'hi', x: string); +>foo : Symbol(foo, Decl(overloadOnConstDuplicateOverloads1.ts, 0, 0), Decl(overloadOnConstDuplicateOverloads1.ts, 0, 33), Decl(overloadOnConstDuplicateOverloads1.ts, 1, 33)) +>a : Symbol(a, Decl(overloadOnConstDuplicateOverloads1.ts, 0, 13)) +>x : Symbol(x, Decl(overloadOnConstDuplicateOverloads1.ts, 0, 21)) + +function foo(a: 'hi', x: string); +>foo : Symbol(foo, Decl(overloadOnConstDuplicateOverloads1.ts, 0, 0), Decl(overloadOnConstDuplicateOverloads1.ts, 0, 33), Decl(overloadOnConstDuplicateOverloads1.ts, 1, 33)) +>a : Symbol(a, Decl(overloadOnConstDuplicateOverloads1.ts, 1, 13)) +>x : Symbol(x, Decl(overloadOnConstDuplicateOverloads1.ts, 1, 21)) + +function foo(a: any, x: any) { +>foo : Symbol(foo, Decl(overloadOnConstDuplicateOverloads1.ts, 0, 0), Decl(overloadOnConstDuplicateOverloads1.ts, 0, 33), Decl(overloadOnConstDuplicateOverloads1.ts, 1, 33)) +>a : Symbol(a, Decl(overloadOnConstDuplicateOverloads1.ts, 2, 13)) +>x : Symbol(x, Decl(overloadOnConstDuplicateOverloads1.ts, 2, 20)) +} + +function foo2(a: 'hi', x: string); +>foo2 : Symbol(foo2, Decl(overloadOnConstDuplicateOverloads1.ts, 3, 1), Decl(overloadOnConstDuplicateOverloads1.ts, 5, 34), Decl(overloadOnConstDuplicateOverloads1.ts, 6, 34), Decl(overloadOnConstDuplicateOverloads1.ts, 7, 36)) +>a : Symbol(a, Decl(overloadOnConstDuplicateOverloads1.ts, 5, 14)) +>x : Symbol(x, Decl(overloadOnConstDuplicateOverloads1.ts, 5, 22)) + +function foo2(a: 'hi', x: string); +>foo2 : Symbol(foo2, Decl(overloadOnConstDuplicateOverloads1.ts, 3, 1), Decl(overloadOnConstDuplicateOverloads1.ts, 5, 34), Decl(overloadOnConstDuplicateOverloads1.ts, 6, 34), Decl(overloadOnConstDuplicateOverloads1.ts, 7, 36)) +>a : Symbol(a, Decl(overloadOnConstDuplicateOverloads1.ts, 6, 14)) +>x : Symbol(x, Decl(overloadOnConstDuplicateOverloads1.ts, 6, 22)) + +function foo2(a: string, x: string); +>foo2 : Symbol(foo2, Decl(overloadOnConstDuplicateOverloads1.ts, 3, 1), Decl(overloadOnConstDuplicateOverloads1.ts, 5, 34), Decl(overloadOnConstDuplicateOverloads1.ts, 6, 34), Decl(overloadOnConstDuplicateOverloads1.ts, 7, 36)) +>a : Symbol(a, Decl(overloadOnConstDuplicateOverloads1.ts, 7, 14)) +>x : Symbol(x, Decl(overloadOnConstDuplicateOverloads1.ts, 7, 24)) + +function foo2(a: any, x: any) { +>foo2 : Symbol(foo2, Decl(overloadOnConstDuplicateOverloads1.ts, 3, 1), Decl(overloadOnConstDuplicateOverloads1.ts, 5, 34), Decl(overloadOnConstDuplicateOverloads1.ts, 6, 34), Decl(overloadOnConstDuplicateOverloads1.ts, 7, 36)) +>a : Symbol(a, Decl(overloadOnConstDuplicateOverloads1.ts, 8, 14)) +>x : Symbol(x, Decl(overloadOnConstDuplicateOverloads1.ts, 8, 21)) +} diff --git a/tests/baselines/reference/overloadOnConstDuplicateOverloads1.types b/tests/baselines/reference/overloadOnConstDuplicateOverloads1.types new file mode 100644 index 00000000000..f74bb5bf958 --- /dev/null +++ b/tests/baselines/reference/overloadOnConstDuplicateOverloads1.types @@ -0,0 +1,37 @@ +=== tests/cases/compiler/overloadOnConstDuplicateOverloads1.ts === +function foo(a: 'hi', x: string); +>foo : { (a: "hi", x: string): any; (a: "hi", x: string): any; } +>a : "hi" +>x : string + +function foo(a: 'hi', x: string); +>foo : { (a: "hi", x: string): any; (a: "hi", x: string): any; } +>a : "hi" +>x : string + +function foo(a: any, x: any) { +>foo : { (a: "hi", x: string): any; (a: "hi", x: string): any; } +>a : any +>x : any +} + +function foo2(a: 'hi', x: string); +>foo2 : { (a: "hi", x: string): any; (a: "hi", x: string): any; (a: string, x: string): any; } +>a : "hi" +>x : string + +function foo2(a: 'hi', x: string); +>foo2 : { (a: "hi", x: string): any; (a: "hi", x: string): any; (a: string, x: string): any; } +>a : "hi" +>x : string + +function foo2(a: string, x: string); +>foo2 : { (a: "hi", x: string): any; (a: "hi", x: string): any; (a: string, x: string): any; } +>a : string +>x : string + +function foo2(a: any, x: any) { +>foo2 : { (a: "hi", x: string): any; (a: "hi", x: string): any; (a: string, x: string): any; } +>a : any +>x : any +} diff --git a/tests/baselines/reference/overloadOnConstInBaseWithBadImplementationInDerived.errors.txt b/tests/baselines/reference/overloadOnConstInBaseWithBadImplementationInDerived.errors.txt deleted file mode 100644 index e040559a054..00000000000 --- a/tests/baselines/reference/overloadOnConstInBaseWithBadImplementationInDerived.errors.txt +++ /dev/null @@ -1,17 +0,0 @@ -tests/cases/compiler/overloadOnConstInBaseWithBadImplementationInDerived.ts(2,29): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/compiler/overloadOnConstInBaseWithBadImplementationInDerived.ts(6,29): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - - -==== tests/cases/compiler/overloadOnConstInBaseWithBadImplementationInDerived.ts (2 errors) ==== - interface I { - x1(a: number, callback: (x: 'hi') => number); - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - } - - class C implements I { - x1(a: number, callback: (x: 'hi') => number) { // error - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - } - } \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstInBaseWithBadImplementationInDerived.symbols b/tests/baselines/reference/overloadOnConstInBaseWithBadImplementationInDerived.symbols new file mode 100644 index 00000000000..6e4429759e2 --- /dev/null +++ b/tests/baselines/reference/overloadOnConstInBaseWithBadImplementationInDerived.symbols @@ -0,0 +1,22 @@ +=== tests/cases/compiler/overloadOnConstInBaseWithBadImplementationInDerived.ts === +interface I { +>I : Symbol(I, Decl(overloadOnConstInBaseWithBadImplementationInDerived.ts, 0, 0)) + + x1(a: number, callback: (x: 'hi') => number); +>x1 : Symbol(x1, Decl(overloadOnConstInBaseWithBadImplementationInDerived.ts, 0, 13)) +>a : Symbol(a, Decl(overloadOnConstInBaseWithBadImplementationInDerived.ts, 1, 7)) +>callback : Symbol(callback, Decl(overloadOnConstInBaseWithBadImplementationInDerived.ts, 1, 17)) +>x : Symbol(x, Decl(overloadOnConstInBaseWithBadImplementationInDerived.ts, 1, 29)) +} + +class C implements I { +>C : Symbol(C, Decl(overloadOnConstInBaseWithBadImplementationInDerived.ts, 2, 1)) +>I : Symbol(I, Decl(overloadOnConstInBaseWithBadImplementationInDerived.ts, 0, 0)) + + x1(a: number, callback: (x: 'hi') => number) { // error +>x1 : Symbol(x1, Decl(overloadOnConstInBaseWithBadImplementationInDerived.ts, 4, 22)) +>a : Symbol(a, Decl(overloadOnConstInBaseWithBadImplementationInDerived.ts, 5, 7)) +>callback : Symbol(callback, Decl(overloadOnConstInBaseWithBadImplementationInDerived.ts, 5, 17)) +>x : Symbol(x, Decl(overloadOnConstInBaseWithBadImplementationInDerived.ts, 5, 29)) + } +} diff --git a/tests/baselines/reference/overloadOnConstInBaseWithBadImplementationInDerived.types b/tests/baselines/reference/overloadOnConstInBaseWithBadImplementationInDerived.types new file mode 100644 index 00000000000..079ae80b364 --- /dev/null +++ b/tests/baselines/reference/overloadOnConstInBaseWithBadImplementationInDerived.types @@ -0,0 +1,22 @@ +=== tests/cases/compiler/overloadOnConstInBaseWithBadImplementationInDerived.ts === +interface I { +>I : I + + x1(a: number, callback: (x: 'hi') => number); +>x1 : (a: number, callback: (x: "hi") => number) => any +>a : number +>callback : (x: "hi") => number +>x : "hi" +} + +class C implements I { +>C : C +>I : I + + x1(a: number, callback: (x: 'hi') => number) { // error +>x1 : (a: number, callback: (x: "hi") => number) => void +>a : number +>callback : (x: "hi") => number +>x : "hi" + } +} diff --git a/tests/baselines/reference/overloadOnConstInCallback1.errors.txt b/tests/baselines/reference/overloadOnConstInCallback1.errors.txt deleted file mode 100644 index 5d594204933..00000000000 --- a/tests/baselines/reference/overloadOnConstInCallback1.errors.txt +++ /dev/null @@ -1,15 +0,0 @@ -tests/cases/compiler/overloadOnConstInCallback1.ts(2,29): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - - -==== tests/cases/compiler/overloadOnConstInCallback1.ts (1 errors) ==== - class C { - x1(a: number, callback: (x: 'hi') => number); // error - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - x1(a: number, callback: (x: any) => number) { - callback('hi'); - callback('bye'); - var hm = "hm"; - callback(hm); - } - } \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstInCallback1.symbols b/tests/baselines/reference/overloadOnConstInCallback1.symbols new file mode 100644 index 00000000000..923c726714e --- /dev/null +++ b/tests/baselines/reference/overloadOnConstInCallback1.symbols @@ -0,0 +1,30 @@ +=== tests/cases/compiler/overloadOnConstInCallback1.ts === +class C { +>C : Symbol(C, Decl(overloadOnConstInCallback1.ts, 0, 0)) + + x1(a: number, callback: (x: 'hi') => number); // error +>x1 : Symbol(x1, Decl(overloadOnConstInCallback1.ts, 0, 9), Decl(overloadOnConstInCallback1.ts, 1, 49)) +>a : Symbol(a, Decl(overloadOnConstInCallback1.ts, 1, 7)) +>callback : Symbol(callback, Decl(overloadOnConstInCallback1.ts, 1, 17)) +>x : Symbol(x, Decl(overloadOnConstInCallback1.ts, 1, 29)) + + x1(a: number, callback: (x: any) => number) { +>x1 : Symbol(x1, Decl(overloadOnConstInCallback1.ts, 0, 9), Decl(overloadOnConstInCallback1.ts, 1, 49)) +>a : Symbol(a, Decl(overloadOnConstInCallback1.ts, 2, 7)) +>callback : Symbol(callback, Decl(overloadOnConstInCallback1.ts, 2, 17)) +>x : Symbol(x, Decl(overloadOnConstInCallback1.ts, 2, 29)) + + callback('hi'); +>callback : Symbol(callback, Decl(overloadOnConstInCallback1.ts, 2, 17)) + + callback('bye'); +>callback : Symbol(callback, Decl(overloadOnConstInCallback1.ts, 2, 17)) + + var hm = "hm"; +>hm : Symbol(hm, Decl(overloadOnConstInCallback1.ts, 5, 11)) + + callback(hm); +>callback : Symbol(callback, Decl(overloadOnConstInCallback1.ts, 2, 17)) +>hm : Symbol(hm, Decl(overloadOnConstInCallback1.ts, 5, 11)) + } +} diff --git a/tests/baselines/reference/overloadOnConstInCallback1.types b/tests/baselines/reference/overloadOnConstInCallback1.types new file mode 100644 index 00000000000..c8c123df1e8 --- /dev/null +++ b/tests/baselines/reference/overloadOnConstInCallback1.types @@ -0,0 +1,36 @@ +=== tests/cases/compiler/overloadOnConstInCallback1.ts === +class C { +>C : C + + x1(a: number, callback: (x: 'hi') => number); // error +>x1 : (a: number, callback: (x: "hi") => number) => any +>a : number +>callback : (x: "hi") => number +>x : "hi" + + x1(a: number, callback: (x: any) => number) { +>x1 : (a: number, callback: (x: "hi") => number) => any +>a : number +>callback : (x: any) => number +>x : any + + callback('hi'); +>callback('hi') : number +>callback : (x: any) => number +>'hi' : string + + callback('bye'); +>callback('bye') : number +>callback : (x: any) => number +>'bye' : string + + var hm = "hm"; +>hm : string +>"hm" : string + + callback(hm); +>callback(hm) : number +>callback : (x: any) => number +>hm : string + } +} diff --git a/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.errors.txt b/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.errors.txt deleted file mode 100644 index 5788a9e6bbe..00000000000 --- a/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.errors.txt +++ /dev/null @@ -1,14 +0,0 @@ -tests/cases/compiler/overloadOnConstInObjectLiteralImplementingAnInterface.ts(2,29): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/compiler/overloadOnConstInObjectLiteralImplementingAnInterface.ts(5,35): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - - -==== tests/cases/compiler/overloadOnConstInObjectLiteralImplementingAnInterface.ts (2 errors) ==== - interface I { - x1(a: number, callback: (x: 'hi') => number); - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - } - - var i2: I = { x1: (a: number, cb: (x: 'hi') => number) => { } }; // error - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.symbols b/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.symbols new file mode 100644 index 00000000000..9ea93140085 --- /dev/null +++ b/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.symbols @@ -0,0 +1,19 @@ +=== tests/cases/compiler/overloadOnConstInObjectLiteralImplementingAnInterface.ts === +interface I { +>I : Symbol(I, Decl(overloadOnConstInObjectLiteralImplementingAnInterface.ts, 0, 0)) + + x1(a: number, callback: (x: 'hi') => number); +>x1 : Symbol(x1, Decl(overloadOnConstInObjectLiteralImplementingAnInterface.ts, 0, 13)) +>a : Symbol(a, Decl(overloadOnConstInObjectLiteralImplementingAnInterface.ts, 1, 7)) +>callback : Symbol(callback, Decl(overloadOnConstInObjectLiteralImplementingAnInterface.ts, 1, 17)) +>x : Symbol(x, Decl(overloadOnConstInObjectLiteralImplementingAnInterface.ts, 1, 29)) +} + +var i2: I = { x1: (a: number, cb: (x: 'hi') => number) => { } }; // error +>i2 : Symbol(i2, Decl(overloadOnConstInObjectLiteralImplementingAnInterface.ts, 4, 3)) +>I : Symbol(I, Decl(overloadOnConstInObjectLiteralImplementingAnInterface.ts, 0, 0)) +>x1 : Symbol(x1, Decl(overloadOnConstInObjectLiteralImplementingAnInterface.ts, 4, 13)) +>a : Symbol(a, Decl(overloadOnConstInObjectLiteralImplementingAnInterface.ts, 4, 19)) +>cb : Symbol(cb, Decl(overloadOnConstInObjectLiteralImplementingAnInterface.ts, 4, 29)) +>x : Symbol(x, Decl(overloadOnConstInObjectLiteralImplementingAnInterface.ts, 4, 35)) + diff --git a/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.types b/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.types new file mode 100644 index 00000000000..e22162d1e7a --- /dev/null +++ b/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.types @@ -0,0 +1,21 @@ +=== tests/cases/compiler/overloadOnConstInObjectLiteralImplementingAnInterface.ts === +interface I { +>I : I + + x1(a: number, callback: (x: 'hi') => number); +>x1 : (a: number, callback: (x: "hi") => number) => any +>a : number +>callback : (x: "hi") => number +>x : "hi" +} + +var i2: I = { x1: (a: number, cb: (x: 'hi') => number) => { } }; // error +>i2 : I +>I : I +>{ x1: (a: number, cb: (x: 'hi') => number) => { } } : { x1: (a: number, cb: (x: "hi") => number) => void; } +>x1 : (a: number, cb: (x: "hi") => number) => void +>(a: number, cb: (x: 'hi') => number) => { } : (a: number, cb: (x: "hi") => number) => void +>a : number +>cb : (x: "hi") => number +>x : "hi" + diff --git a/tests/baselines/reference/overloadOnConstInheritance2.errors.txt b/tests/baselines/reference/overloadOnConstInheritance2.errors.txt index 4b502f145a6..5d3930a4e45 100644 --- a/tests/baselines/reference/overloadOnConstInheritance2.errors.txt +++ b/tests/baselines/reference/overloadOnConstInheritance2.errors.txt @@ -2,10 +2,9 @@ tests/cases/compiler/overloadOnConstInheritance2.ts(5,11): error TS2430: Interfa Types of property 'addEventListener' are incompatible. Type '(x: "bar") => string' is not assignable to type '{ (x: string): any; (x: "foo"): string; }'. Type '(x: "bar") => string' provides no match for the signature '(x: string): any' -tests/cases/compiler/overloadOnConstInheritance2.ts(6,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -==== tests/cases/compiler/overloadOnConstInheritance2.ts (2 errors) ==== +==== tests/cases/compiler/overloadOnConstInheritance2.ts (1 errors) ==== interface Base { addEventListener(x: string): any; addEventListener(x: 'foo'): string; @@ -17,7 +16,5 @@ tests/cases/compiler/overloadOnConstInheritance2.ts(6,5): error TS2382: Speciali !!! error TS2430: Type '(x: "bar") => string' is not assignable to type '{ (x: string): any; (x: "foo"): string; }'. !!! error TS2430: Type '(x: "bar") => string' provides no match for the signature '(x: string): any' addEventListener(x: 'bar'): string; // shouldn't need to redeclare the string overload - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. } \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstInheritance3.errors.txt b/tests/baselines/reference/overloadOnConstInheritance3.errors.txt index 6d9f9b00692..bedff91fc27 100644 --- a/tests/baselines/reference/overloadOnConstInheritance3.errors.txt +++ b/tests/baselines/reference/overloadOnConstInheritance3.errors.txt @@ -2,11 +2,9 @@ tests/cases/compiler/overloadOnConstInheritance3.ts(4,11): error TS2430: Interfa Types of property 'addEventListener' are incompatible. Type '{ (x: "bar"): string; (x: "foo"): string; }' is not assignable to type '(x: string) => any'. Type '{ (x: "bar"): string; (x: "foo"): string; }' provides no match for the signature '(x: string): any' -tests/cases/compiler/overloadOnConstInheritance3.ts(6,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/compiler/overloadOnConstInheritance3.ts(7,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -==== tests/cases/compiler/overloadOnConstInheritance3.ts (3 errors) ==== +==== tests/cases/compiler/overloadOnConstInheritance3.ts (1 errors) ==== interface Base { addEventListener(x: string): any; } @@ -18,10 +16,6 @@ tests/cases/compiler/overloadOnConstInheritance3.ts(7,5): error TS2382: Speciali !!! error TS2430: Type '{ (x: "bar"): string; (x: "foo"): string; }' provides no match for the signature '(x: string): any' // shouldn't need to redeclare the string overload addEventListener(x: 'bar'): string; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. addEventListener(x: 'foo'): string; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. } \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstInheritance4.errors.txt b/tests/baselines/reference/overloadOnConstInheritance4.errors.txt deleted file mode 100644 index 54200023408..00000000000 --- a/tests/baselines/reference/overloadOnConstInheritance4.errors.txt +++ /dev/null @@ -1,21 +0,0 @@ -tests/cases/compiler/overloadOnConstInheritance4.ts(2,29): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/compiler/overloadOnConstInheritance4.ts(5,29): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/compiler/overloadOnConstInheritance4.ts(6,29): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - - -==== tests/cases/compiler/overloadOnConstInheritance4.ts (3 errors) ==== - interface I { - x1(a: number, callback: (x: 'hi') => number); - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - } - class C implements I { - x1(a: number, callback: (x: 'hi') => number); - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - x1(a: number, callback: (x: 'hi') => number) { - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - } - } - \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstInheritance4.symbols b/tests/baselines/reference/overloadOnConstInheritance4.symbols new file mode 100644 index 00000000000..9bfa61e6aa9 --- /dev/null +++ b/tests/baselines/reference/overloadOnConstInheritance4.symbols @@ -0,0 +1,28 @@ +=== tests/cases/compiler/overloadOnConstInheritance4.ts === +interface I { +>I : Symbol(I, Decl(overloadOnConstInheritance4.ts, 0, 0)) + + x1(a: number, callback: (x: 'hi') => number); +>x1 : Symbol(x1, Decl(overloadOnConstInheritance4.ts, 0, 13)) +>a : Symbol(a, Decl(overloadOnConstInheritance4.ts, 1, 7)) +>callback : Symbol(callback, Decl(overloadOnConstInheritance4.ts, 1, 17)) +>x : Symbol(x, Decl(overloadOnConstInheritance4.ts, 1, 29)) +} +class C implements I { +>C : Symbol(C, Decl(overloadOnConstInheritance4.ts, 2, 1)) +>I : Symbol(I, Decl(overloadOnConstInheritance4.ts, 0, 0)) + + x1(a: number, callback: (x: 'hi') => number); +>x1 : Symbol(x1, Decl(overloadOnConstInheritance4.ts, 3, 22), Decl(overloadOnConstInheritance4.ts, 4, 49)) +>a : Symbol(a, Decl(overloadOnConstInheritance4.ts, 4, 7)) +>callback : Symbol(callback, Decl(overloadOnConstInheritance4.ts, 4, 17)) +>x : Symbol(x, Decl(overloadOnConstInheritance4.ts, 4, 29)) + + x1(a: number, callback: (x: 'hi') => number) { +>x1 : Symbol(x1, Decl(overloadOnConstInheritance4.ts, 3, 22), Decl(overloadOnConstInheritance4.ts, 4, 49)) +>a : Symbol(a, Decl(overloadOnConstInheritance4.ts, 5, 7)) +>callback : Symbol(callback, Decl(overloadOnConstInheritance4.ts, 5, 17)) +>x : Symbol(x, Decl(overloadOnConstInheritance4.ts, 5, 29)) + } +} + diff --git a/tests/baselines/reference/overloadOnConstInheritance4.types b/tests/baselines/reference/overloadOnConstInheritance4.types new file mode 100644 index 00000000000..cacd3adfcc9 --- /dev/null +++ b/tests/baselines/reference/overloadOnConstInheritance4.types @@ -0,0 +1,28 @@ +=== tests/cases/compiler/overloadOnConstInheritance4.ts === +interface I { +>I : I + + x1(a: number, callback: (x: 'hi') => number); +>x1 : (a: number, callback: (x: "hi") => number) => any +>a : number +>callback : (x: "hi") => number +>x : "hi" +} +class C implements I { +>C : C +>I : I + + x1(a: number, callback: (x: 'hi') => number); +>x1 : (a: number, callback: (x: "hi") => number) => any +>a : number +>callback : (x: "hi") => number +>x : "hi" + + x1(a: number, callback: (x: 'hi') => number) { +>x1 : (a: number, callback: (x: "hi") => number) => any +>a : number +>callback : (x: "hi") => number +>x : "hi" + } +} + diff --git a/tests/baselines/reference/overloadOnConstNoAnyImplementation.errors.txt b/tests/baselines/reference/overloadOnConstNoAnyImplementation.errors.txt index 2827a97ca82..fe5219606ff 100644 --- a/tests/baselines/reference/overloadOnConstNoAnyImplementation.errors.txt +++ b/tests/baselines/reference/overloadOnConstNoAnyImplementation.errors.txt @@ -1,16 +1,9 @@ -tests/cases/compiler/overloadOnConstNoAnyImplementation.ts(1,28): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/compiler/overloadOnConstNoAnyImplementation.ts(2,28): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. tests/cases/compiler/overloadOnConstNoAnyImplementation.ts(9,8): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. -tests/cases/compiler/overloadOnConstNoAnyImplementation.ts(14,7): error TS2381: A signature with an implementation cannot use a string literal type. -==== tests/cases/compiler/overloadOnConstNoAnyImplementation.ts (4 errors) ==== +==== tests/cases/compiler/overloadOnConstNoAnyImplementation.ts (1 errors) ==== function x1(a: number, cb: (x: 'hi') => number); - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function x1(a: number, cb: (x: 'bye') => number); - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function x1(a: number, cb: (x: string) => number) { cb('hi'); cb('bye'); @@ -25,6 +18,4 @@ tests/cases/compiler/overloadOnConstNoAnyImplementation.ts(14,7): error TS2381: var cb: (number) => number = (x: number) => 1; x1(1, cb); x1(1, (x: 'hi') => 1); // error - ~~~~~~~~~~~~~~ -!!! error TS2381: A signature with an implementation cannot use a string literal type. x1(1, (x: string) => 1); \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstNoAnyImplementation2.errors.txt b/tests/baselines/reference/overloadOnConstNoAnyImplementation2.errors.txt index aab390c48e8..a9d4092f6d3 100644 --- a/tests/baselines/reference/overloadOnConstNoAnyImplementation2.errors.txt +++ b/tests/baselines/reference/overloadOnConstNoAnyImplementation2.errors.txt @@ -1,21 +1,13 @@ -tests/cases/compiler/overloadOnConstNoAnyImplementation2.ts(2,29): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/compiler/overloadOnConstNoAnyImplementation2.ts(6,29): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. tests/cases/compiler/overloadOnConstNoAnyImplementation2.ts(12,18): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. -tests/cases/compiler/overloadOnConstNoAnyImplementation2.ts(17,9): error TS2381: A signature with an implementation cannot use a string literal type. -tests/cases/compiler/overloadOnConstNoAnyImplementation2.ts(18,9): error TS2381: A signature with an implementation cannot use a string literal type. -==== tests/cases/compiler/overloadOnConstNoAnyImplementation2.ts (5 errors) ==== +==== tests/cases/compiler/overloadOnConstNoAnyImplementation2.ts (1 errors) ==== interface I { x1(a: number, callback: (x: 'hi') => number); - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. } class C { x1(a: number, callback: (x: 'hi') => number); - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. x1(a: number, callback: (x: string) => number) { callback('hi'); callback('bye'); @@ -29,11 +21,7 @@ tests/cases/compiler/overloadOnConstNoAnyImplementation2.ts(18,9): error TS2381: var c: C; c.x1(1, (x: 'hi') => { return 1; } ); - ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2381: A signature with an implementation cannot use a string literal type. c.x1(1, (x: 'bye') => { return 1; } ); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2381: A signature with an implementation cannot use a string literal type. c.x1(1, (x) => { return 1; } ); c.x1(1, (x: number) => { return 1; } ); \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.errors.txt b/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.errors.txt deleted file mode 100644 index 6b96abce29e..00000000000 --- a/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.errors.txt +++ /dev/null @@ -1,11 +0,0 @@ -tests/cases/compiler/overloadOnConstNoNonSpecializedSignature.ts(2,4): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - - -==== tests/cases/compiler/overloadOnConstNoNonSpecializedSignature.ts (1 errors) ==== - class C { - x1(a: 'hi'); // error, no non-specialized signature in overload list - ~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - x1(a: string) { } - } - \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.symbols b/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.symbols new file mode 100644 index 00000000000..ff7f88f43c3 --- /dev/null +++ b/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.symbols @@ -0,0 +1,13 @@ +=== tests/cases/compiler/overloadOnConstNoNonSpecializedSignature.ts === +class C { +>C : Symbol(C, Decl(overloadOnConstNoNonSpecializedSignature.ts, 0, 0)) + + x1(a: 'hi'); // error, no non-specialized signature in overload list +>x1 : Symbol(x1, Decl(overloadOnConstNoNonSpecializedSignature.ts, 0, 9), Decl(overloadOnConstNoNonSpecializedSignature.ts, 1, 15)) +>a : Symbol(a, Decl(overloadOnConstNoNonSpecializedSignature.ts, 1, 6)) + + x1(a: string) { } +>x1 : Symbol(x1, Decl(overloadOnConstNoNonSpecializedSignature.ts, 0, 9), Decl(overloadOnConstNoNonSpecializedSignature.ts, 1, 15)) +>a : Symbol(a, Decl(overloadOnConstNoNonSpecializedSignature.ts, 2, 6)) +} + diff --git a/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.types b/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.types new file mode 100644 index 00000000000..09360b748c3 --- /dev/null +++ b/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.types @@ -0,0 +1,13 @@ +=== tests/cases/compiler/overloadOnConstNoNonSpecializedSignature.ts === +class C { +>C : C + + x1(a: 'hi'); // error, no non-specialized signature in overload list +>x1 : (a: "hi") => any +>a : "hi" + + x1(a: string) { } +>x1 : (a: "hi") => any +>a : string +} + diff --git a/tests/baselines/reference/overloadOnConstNoStringImplementation.errors.txt b/tests/baselines/reference/overloadOnConstNoStringImplementation.errors.txt deleted file mode 100644 index 12dcdaf9769..00000000000 --- a/tests/baselines/reference/overloadOnConstNoStringImplementation.errors.txt +++ /dev/null @@ -1,27 +0,0 @@ -tests/cases/compiler/overloadOnConstNoStringImplementation.ts(1,28): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/compiler/overloadOnConstNoStringImplementation.ts(2,28): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/compiler/overloadOnConstNoStringImplementation.ts(14,7): error TS2381: A signature with an implementation cannot use a string literal type. - - -==== tests/cases/compiler/overloadOnConstNoStringImplementation.ts (3 errors) ==== - function x2(a: number, cb: (x: 'hi') => number); - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - function x2(a: number, cb: (x: 'bye') => number); - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - function x2(a: number, cb: (x: any) => number) { - cb('hi'); - cb('bye'); - var hm = 'hm'; - cb(hm); // should this work without a string definition? - cb('uh'); - cb(1); - } - - var cb: (number) => number = (x: number) => 1; - x2(1, cb); // error - x2(1, (x: 'hi') => 1); // error - ~~~~~~~~~~~~~~ -!!! error TS2381: A signature with an implementation cannot use a string literal type. - x2(1, (x: string) => 1); \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstNoStringImplementation.symbols b/tests/baselines/reference/overloadOnConstNoStringImplementation.symbols new file mode 100644 index 00000000000..a8d3bd7953d --- /dev/null +++ b/tests/baselines/reference/overloadOnConstNoStringImplementation.symbols @@ -0,0 +1,56 @@ +=== tests/cases/compiler/overloadOnConstNoStringImplementation.ts === +function x2(a: number, cb: (x: 'hi') => number); +>x2 : Symbol(x2, Decl(overloadOnConstNoStringImplementation.ts, 0, 0), Decl(overloadOnConstNoStringImplementation.ts, 0, 48), Decl(overloadOnConstNoStringImplementation.ts, 1, 49)) +>a : Symbol(a, Decl(overloadOnConstNoStringImplementation.ts, 0, 12)) +>cb : Symbol(cb, Decl(overloadOnConstNoStringImplementation.ts, 0, 22)) +>x : Symbol(x, Decl(overloadOnConstNoStringImplementation.ts, 0, 28)) + +function x2(a: number, cb: (x: 'bye') => number); +>x2 : Symbol(x2, Decl(overloadOnConstNoStringImplementation.ts, 0, 0), Decl(overloadOnConstNoStringImplementation.ts, 0, 48), Decl(overloadOnConstNoStringImplementation.ts, 1, 49)) +>a : Symbol(a, Decl(overloadOnConstNoStringImplementation.ts, 1, 12)) +>cb : Symbol(cb, Decl(overloadOnConstNoStringImplementation.ts, 1, 22)) +>x : Symbol(x, Decl(overloadOnConstNoStringImplementation.ts, 1, 28)) + +function x2(a: number, cb: (x: any) => number) { +>x2 : Symbol(x2, Decl(overloadOnConstNoStringImplementation.ts, 0, 0), Decl(overloadOnConstNoStringImplementation.ts, 0, 48), Decl(overloadOnConstNoStringImplementation.ts, 1, 49)) +>a : Symbol(a, Decl(overloadOnConstNoStringImplementation.ts, 2, 12)) +>cb : Symbol(cb, Decl(overloadOnConstNoStringImplementation.ts, 2, 22)) +>x : Symbol(x, Decl(overloadOnConstNoStringImplementation.ts, 2, 28)) + + cb('hi'); +>cb : Symbol(cb, Decl(overloadOnConstNoStringImplementation.ts, 2, 22)) + + cb('bye'); +>cb : Symbol(cb, Decl(overloadOnConstNoStringImplementation.ts, 2, 22)) + + var hm = 'hm'; +>hm : Symbol(hm, Decl(overloadOnConstNoStringImplementation.ts, 5, 7)) + + cb(hm); // should this work without a string definition? +>cb : Symbol(cb, Decl(overloadOnConstNoStringImplementation.ts, 2, 22)) +>hm : Symbol(hm, Decl(overloadOnConstNoStringImplementation.ts, 5, 7)) + + cb('uh'); +>cb : Symbol(cb, Decl(overloadOnConstNoStringImplementation.ts, 2, 22)) + + cb(1); +>cb : Symbol(cb, Decl(overloadOnConstNoStringImplementation.ts, 2, 22)) +} + +var cb: (number) => number = (x: number) => 1; +>cb : Symbol(cb, Decl(overloadOnConstNoStringImplementation.ts, 11, 3)) +>number : Symbol(number, Decl(overloadOnConstNoStringImplementation.ts, 11, 9)) +>x : Symbol(x, Decl(overloadOnConstNoStringImplementation.ts, 11, 30)) + +x2(1, cb); // error +>x2 : Symbol(x2, Decl(overloadOnConstNoStringImplementation.ts, 0, 0), Decl(overloadOnConstNoStringImplementation.ts, 0, 48), Decl(overloadOnConstNoStringImplementation.ts, 1, 49)) +>cb : Symbol(cb, Decl(overloadOnConstNoStringImplementation.ts, 11, 3)) + +x2(1, (x: 'hi') => 1); // error +>x2 : Symbol(x2, Decl(overloadOnConstNoStringImplementation.ts, 0, 0), Decl(overloadOnConstNoStringImplementation.ts, 0, 48), Decl(overloadOnConstNoStringImplementation.ts, 1, 49)) +>x : Symbol(x, Decl(overloadOnConstNoStringImplementation.ts, 13, 7)) + +x2(1, (x: string) => 1); +>x2 : Symbol(x2, Decl(overloadOnConstNoStringImplementation.ts, 0, 0), Decl(overloadOnConstNoStringImplementation.ts, 0, 48), Decl(overloadOnConstNoStringImplementation.ts, 1, 49)) +>x : Symbol(x, Decl(overloadOnConstNoStringImplementation.ts, 14, 7)) + diff --git a/tests/baselines/reference/overloadOnConstNoStringImplementation.types b/tests/baselines/reference/overloadOnConstNoStringImplementation.types new file mode 100644 index 00000000000..9161620841f --- /dev/null +++ b/tests/baselines/reference/overloadOnConstNoStringImplementation.types @@ -0,0 +1,78 @@ +=== tests/cases/compiler/overloadOnConstNoStringImplementation.ts === +function x2(a: number, cb: (x: 'hi') => number); +>x2 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } +>a : number +>cb : (x: "hi") => number +>x : "hi" + +function x2(a: number, cb: (x: 'bye') => number); +>x2 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } +>a : number +>cb : (x: "bye") => number +>x : "bye" + +function x2(a: number, cb: (x: any) => number) { +>x2 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } +>a : number +>cb : (x: any) => number +>x : any + + cb('hi'); +>cb('hi') : number +>cb : (x: any) => number +>'hi' : string + + cb('bye'); +>cb('bye') : number +>cb : (x: any) => number +>'bye' : string + + var hm = 'hm'; +>hm : string +>'hm' : string + + cb(hm); // should this work without a string definition? +>cb(hm) : number +>cb : (x: any) => number +>hm : string + + cb('uh'); +>cb('uh') : number +>cb : (x: any) => number +>'uh' : string + + cb(1); +>cb(1) : number +>cb : (x: any) => number +>1 : number +} + +var cb: (number) => number = (x: number) => 1; +>cb : (number: any) => number +>number : any +>(x: number) => 1 : (x: number) => number +>x : number +>1 : number + +x2(1, cb); // error +>x2(1, cb) : any +>x2 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } +>1 : number +>cb : (number: any) => number + +x2(1, (x: 'hi') => 1); // error +>x2(1, (x: 'hi') => 1) : any +>x2 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } +>1 : number +>(x: 'hi') => 1 : (x: "hi") => number +>x : "hi" +>1 : number + +x2(1, (x: string) => 1); +>x2(1, (x: string) => 1) : any +>x2 : { (a: number, cb: (x: "hi") => number): any; (a: number, cb: (x: "bye") => number): any; } +>1 : number +>(x: string) => 1 : (x: string) => number +>x : string +>1 : number + diff --git a/tests/baselines/reference/overloadOnConstNoStringImplementation2.errors.txt b/tests/baselines/reference/overloadOnConstNoStringImplementation2.errors.txt deleted file mode 100644 index c85b004f160..00000000000 --- a/tests/baselines/reference/overloadOnConstNoStringImplementation2.errors.txt +++ /dev/null @@ -1,35 +0,0 @@ -tests/cases/compiler/overloadOnConstNoStringImplementation2.ts(2,29): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/compiler/overloadOnConstNoStringImplementation2.ts(6,29): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/compiler/overloadOnConstNoStringImplementation2.ts(17,9): error TS2381: A signature with an implementation cannot use a string literal type. -tests/cases/compiler/overloadOnConstNoStringImplementation2.ts(18,9): error TS2381: A signature with an implementation cannot use a string literal type. - - -==== tests/cases/compiler/overloadOnConstNoStringImplementation2.ts (4 errors) ==== - interface I { - x1(a: number, callback: (x: 'hi') => number); - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - } - - class C implements I { - x1(a: number, callback: (x: 'hi') => number); - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - x1(a: number, callback: (x: any) => number) { - callback('hi'); - callback('bye'); - var hm = "hm"; - callback(hm); - callback(1); - } - } - - var c: C; - c.x1(1, (x: 'hi') => { return 1; } ); - ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2381: A signature with an implementation cannot use a string literal type. - c.x1(1, (x: 'bye') => { return 1; } ); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2381: A signature with an implementation cannot use a string literal type. - c.x1(1, (x: string) => { return 1; } ); - c.x1(1, (x: number) => { return 1; } ); \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstNoStringImplementation2.symbols b/tests/baselines/reference/overloadOnConstNoStringImplementation2.symbols new file mode 100644 index 00000000000..8629708d187 --- /dev/null +++ b/tests/baselines/reference/overloadOnConstNoStringImplementation2.symbols @@ -0,0 +1,73 @@ +=== tests/cases/compiler/overloadOnConstNoStringImplementation2.ts === +interface I { +>I : Symbol(I, Decl(overloadOnConstNoStringImplementation2.ts, 0, 0)) + + x1(a: number, callback: (x: 'hi') => number); +>x1 : Symbol(x1, Decl(overloadOnConstNoStringImplementation2.ts, 0, 13)) +>a : Symbol(a, Decl(overloadOnConstNoStringImplementation2.ts, 1, 7)) +>callback : Symbol(callback, Decl(overloadOnConstNoStringImplementation2.ts, 1, 17)) +>x : Symbol(x, Decl(overloadOnConstNoStringImplementation2.ts, 1, 29)) +} + +class C implements I { +>C : Symbol(C, Decl(overloadOnConstNoStringImplementation2.ts, 2, 1)) +>I : Symbol(I, Decl(overloadOnConstNoStringImplementation2.ts, 0, 0)) + + x1(a: number, callback: (x: 'hi') => number); +>x1 : Symbol(x1, Decl(overloadOnConstNoStringImplementation2.ts, 4, 22), Decl(overloadOnConstNoStringImplementation2.ts, 5, 49)) +>a : Symbol(a, Decl(overloadOnConstNoStringImplementation2.ts, 5, 7)) +>callback : Symbol(callback, Decl(overloadOnConstNoStringImplementation2.ts, 5, 17)) +>x : Symbol(x, Decl(overloadOnConstNoStringImplementation2.ts, 5, 29)) + + x1(a: number, callback: (x: any) => number) { +>x1 : Symbol(x1, Decl(overloadOnConstNoStringImplementation2.ts, 4, 22), Decl(overloadOnConstNoStringImplementation2.ts, 5, 49)) +>a : Symbol(a, Decl(overloadOnConstNoStringImplementation2.ts, 6, 7)) +>callback : Symbol(callback, Decl(overloadOnConstNoStringImplementation2.ts, 6, 17)) +>x : Symbol(x, Decl(overloadOnConstNoStringImplementation2.ts, 6, 29)) + + callback('hi'); +>callback : Symbol(callback, Decl(overloadOnConstNoStringImplementation2.ts, 6, 17)) + + callback('bye'); +>callback : Symbol(callback, Decl(overloadOnConstNoStringImplementation2.ts, 6, 17)) + + var hm = "hm"; +>hm : Symbol(hm, Decl(overloadOnConstNoStringImplementation2.ts, 9, 11)) + + callback(hm); +>callback : Symbol(callback, Decl(overloadOnConstNoStringImplementation2.ts, 6, 17)) +>hm : Symbol(hm, Decl(overloadOnConstNoStringImplementation2.ts, 9, 11)) + + callback(1); +>callback : Symbol(callback, Decl(overloadOnConstNoStringImplementation2.ts, 6, 17)) + } +} + +var c: C; +>c : Symbol(c, Decl(overloadOnConstNoStringImplementation2.ts, 15, 3)) +>C : Symbol(C, Decl(overloadOnConstNoStringImplementation2.ts, 2, 1)) + +c.x1(1, (x: 'hi') => { return 1; } ); +>c.x1 : Symbol(C.x1, Decl(overloadOnConstNoStringImplementation2.ts, 4, 22), Decl(overloadOnConstNoStringImplementation2.ts, 5, 49)) +>c : Symbol(c, Decl(overloadOnConstNoStringImplementation2.ts, 15, 3)) +>x1 : Symbol(C.x1, Decl(overloadOnConstNoStringImplementation2.ts, 4, 22), Decl(overloadOnConstNoStringImplementation2.ts, 5, 49)) +>x : Symbol(x, Decl(overloadOnConstNoStringImplementation2.ts, 16, 9)) + +c.x1(1, (x: 'bye') => { return 1; } ); +>c.x1 : Symbol(C.x1, Decl(overloadOnConstNoStringImplementation2.ts, 4, 22), Decl(overloadOnConstNoStringImplementation2.ts, 5, 49)) +>c : Symbol(c, Decl(overloadOnConstNoStringImplementation2.ts, 15, 3)) +>x1 : Symbol(C.x1, Decl(overloadOnConstNoStringImplementation2.ts, 4, 22), Decl(overloadOnConstNoStringImplementation2.ts, 5, 49)) +>x : Symbol(x, Decl(overloadOnConstNoStringImplementation2.ts, 17, 9)) + +c.x1(1, (x: string) => { return 1; } ); +>c.x1 : Symbol(C.x1, Decl(overloadOnConstNoStringImplementation2.ts, 4, 22), Decl(overloadOnConstNoStringImplementation2.ts, 5, 49)) +>c : Symbol(c, Decl(overloadOnConstNoStringImplementation2.ts, 15, 3)) +>x1 : Symbol(C.x1, Decl(overloadOnConstNoStringImplementation2.ts, 4, 22), Decl(overloadOnConstNoStringImplementation2.ts, 5, 49)) +>x : Symbol(x, Decl(overloadOnConstNoStringImplementation2.ts, 18, 9)) + +c.x1(1, (x: number) => { return 1; } ); +>c.x1 : Symbol(C.x1, Decl(overloadOnConstNoStringImplementation2.ts, 4, 22), Decl(overloadOnConstNoStringImplementation2.ts, 5, 49)) +>c : Symbol(c, Decl(overloadOnConstNoStringImplementation2.ts, 15, 3)) +>x1 : Symbol(C.x1, Decl(overloadOnConstNoStringImplementation2.ts, 4, 22), Decl(overloadOnConstNoStringImplementation2.ts, 5, 49)) +>x : Symbol(x, Decl(overloadOnConstNoStringImplementation2.ts, 19, 9)) + diff --git a/tests/baselines/reference/overloadOnConstNoStringImplementation2.types b/tests/baselines/reference/overloadOnConstNoStringImplementation2.types new file mode 100644 index 00000000000..40521db3f89 --- /dev/null +++ b/tests/baselines/reference/overloadOnConstNoStringImplementation2.types @@ -0,0 +1,97 @@ +=== tests/cases/compiler/overloadOnConstNoStringImplementation2.ts === +interface I { +>I : I + + x1(a: number, callback: (x: 'hi') => number); +>x1 : (a: number, callback: (x: "hi") => number) => any +>a : number +>callback : (x: "hi") => number +>x : "hi" +} + +class C implements I { +>C : C +>I : I + + x1(a: number, callback: (x: 'hi') => number); +>x1 : (a: number, callback: (x: "hi") => number) => any +>a : number +>callback : (x: "hi") => number +>x : "hi" + + x1(a: number, callback: (x: any) => number) { +>x1 : (a: number, callback: (x: "hi") => number) => any +>a : number +>callback : (x: any) => number +>x : any + + callback('hi'); +>callback('hi') : number +>callback : (x: any) => number +>'hi' : string + + callback('bye'); +>callback('bye') : number +>callback : (x: any) => number +>'bye' : string + + var hm = "hm"; +>hm : string +>"hm" : string + + callback(hm); +>callback(hm) : number +>callback : (x: any) => number +>hm : string + + callback(1); +>callback(1) : number +>callback : (x: any) => number +>1 : number + } +} + +var c: C; +>c : C +>C : C + +c.x1(1, (x: 'hi') => { return 1; } ); +>c.x1(1, (x: 'hi') => { return 1; } ) : any +>c.x1 : (a: number, callback: (x: "hi") => number) => any +>c : C +>x1 : (a: number, callback: (x: "hi") => number) => any +>1 : number +>(x: 'hi') => { return 1; } : (x: "hi") => number +>x : "hi" +>1 : number + +c.x1(1, (x: 'bye') => { return 1; } ); +>c.x1(1, (x: 'bye') => { return 1; } ) : any +>c.x1 : (a: number, callback: (x: "hi") => number) => any +>c : C +>x1 : (a: number, callback: (x: "hi") => number) => any +>1 : number +>(x: 'bye') => { return 1; } : (x: "bye") => number +>x : "bye" +>1 : number + +c.x1(1, (x: string) => { return 1; } ); +>c.x1(1, (x: string) => { return 1; } ) : any +>c.x1 : (a: number, callback: (x: "hi") => number) => any +>c : C +>x1 : (a: number, callback: (x: "hi") => number) => any +>1 : number +>(x: string) => { return 1; } : (x: string) => number +>x : string +>1 : number + +c.x1(1, (x: number) => { return 1; } ); +>c.x1(1, (x: number) => { return 1; } ) : any +>c.x1 : (a: number, callback: (x: "hi") => number) => any +>c : C +>x1 : (a: number, callback: (x: "hi") => number) => any +>1 : number +>(x: number) => { return 1; } : (x: number) => number +>x : number +>1 : number + diff --git a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.errors.txt b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.errors.txt index 4fea7cc1227..3fe0a43d855 100644 --- a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.errors.txt +++ b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.errors.txt @@ -1,9 +1,8 @@ -tests/cases/compiler/overloadOnConstantsInvalidOverload1.ts(6,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/compiler/overloadOnConstantsInvalidOverload1.ts(7,10): error TS2381: A signature with an implementation cannot use a string literal type. +tests/cases/compiler/overloadOnConstantsInvalidOverload1.ts(6,10): error TS2394: Overload signature is not compatible with function implementation. tests/cases/compiler/overloadOnConstantsInvalidOverload1.ts(11,5): error TS2345: Argument of type '"HI"' is not assignable to parameter of type '"SPAN"'. -==== tests/cases/compiler/overloadOnConstantsInvalidOverload1.ts (3 errors) ==== +==== tests/cases/compiler/overloadOnConstantsInvalidOverload1.ts (2 errors) ==== class Base { foo() { } } class Derived1 extends Base { bar() { } } class Derived2 extends Base { baz() { } } @@ -11,10 +10,8 @@ tests/cases/compiler/overloadOnConstantsInvalidOverload1.ts(11,5): error TS2345: function foo(name: "SPAN"): Derived1; ~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2394: Overload signature is not compatible with function implementation. function foo(name: "DIV"): Derived2 { - ~~~ -!!! error TS2381: A signature with an implementation cannot use a string literal type. return null; } diff --git a/tests/baselines/reference/overloadingOnConstants2.errors.txt b/tests/baselines/reference/overloadingOnConstants2.errors.txt index b448deaadc7..f50a6bbd8c3 100644 --- a/tests/baselines/reference/overloadingOnConstants2.errors.txt +++ b/tests/baselines/reference/overloadingOnConstants2.errors.txt @@ -1,10 +1,9 @@ -tests/cases/compiler/overloadingOnConstants2.ts(8,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/compiler/overloadingOnConstants2.ts(9,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/overloadingOnConstants2.ts(9,10): error TS2394: Overload signature is not compatible with function implementation. tests/cases/compiler/overloadingOnConstants2.ts(15,13): error TS2345: Argument of type '"um"' is not assignable to parameter of type '"bye"'. -tests/cases/compiler/overloadingOnConstants2.ts(19,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/compiler/overloadingOnConstants2.ts(19,10): error TS2394: Overload signature is not compatible with function implementation. -==== tests/cases/compiler/overloadingOnConstants2.ts (4 errors) ==== +==== tests/cases/compiler/overloadingOnConstants2.ts (3 errors) ==== class C { private x = 1; } @@ -13,11 +12,9 @@ tests/cases/compiler/overloadingOnConstants2.ts(19,10): error TS2382: Specialize private y = 1; } function foo(x: "hi", items: string[]): D; - ~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function foo(x: "bye", items: string[]): E; ~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2394: Overload signature is not compatible with function implementation. function foo(x: string, items: string[]): C { return null; } @@ -31,7 +28,7 @@ tests/cases/compiler/overloadingOnConstants2.ts(19,10): error TS2382: Specialize //function bar(x: "hi", items: string[]): D; function bar(x: "bye", items: string[]): E; ~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2394: Overload signature is not compatible with function implementation. function bar(x: string, items: string[]): C; function bar(x: string, items: string[]): C { return null; diff --git a/tests/baselines/reference/overloadingOnConstantsInImplementation.errors.txt b/tests/baselines/reference/overloadingOnConstantsInImplementation.errors.txt deleted file mode 100644 index 19afdb26806..00000000000 --- a/tests/baselines/reference/overloadingOnConstantsInImplementation.errors.txt +++ /dev/null @@ -1,16 +0,0 @@ -tests/cases/compiler/overloadingOnConstantsInImplementation.ts(1,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/compiler/overloadingOnConstantsInImplementation.ts(2,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/compiler/overloadingOnConstantsInImplementation.ts(3,10): error TS2381: A signature with an implementation cannot use a string literal type. - - -==== tests/cases/compiler/overloadingOnConstantsInImplementation.ts (3 errors) ==== - function foo(a: 'hi', x: string); - ~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - function foo(a: 'hi', x: string); - ~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - function foo(a: 'hi', x: any) { - ~~~ -!!! error TS2381: A signature with an implementation cannot use a string literal type. - } \ No newline at end of file diff --git a/tests/baselines/reference/overloadingOnConstantsInImplementation.symbols b/tests/baselines/reference/overloadingOnConstantsInImplementation.symbols new file mode 100644 index 00000000000..5cf7b2ba928 --- /dev/null +++ b/tests/baselines/reference/overloadingOnConstantsInImplementation.symbols @@ -0,0 +1,16 @@ +=== tests/cases/compiler/overloadingOnConstantsInImplementation.ts === +function foo(a: 'hi', x: string); +>foo : Symbol(foo, Decl(overloadingOnConstantsInImplementation.ts, 0, 0), Decl(overloadingOnConstantsInImplementation.ts, 0, 33), Decl(overloadingOnConstantsInImplementation.ts, 1, 33)) +>a : Symbol(a, Decl(overloadingOnConstantsInImplementation.ts, 0, 13)) +>x : Symbol(x, Decl(overloadingOnConstantsInImplementation.ts, 0, 21)) + +function foo(a: 'hi', x: string); +>foo : Symbol(foo, Decl(overloadingOnConstantsInImplementation.ts, 0, 0), Decl(overloadingOnConstantsInImplementation.ts, 0, 33), Decl(overloadingOnConstantsInImplementation.ts, 1, 33)) +>a : Symbol(a, Decl(overloadingOnConstantsInImplementation.ts, 1, 13)) +>x : Symbol(x, Decl(overloadingOnConstantsInImplementation.ts, 1, 21)) + +function foo(a: 'hi', x: any) { +>foo : Symbol(foo, Decl(overloadingOnConstantsInImplementation.ts, 0, 0), Decl(overloadingOnConstantsInImplementation.ts, 0, 33), Decl(overloadingOnConstantsInImplementation.ts, 1, 33)) +>a : Symbol(a, Decl(overloadingOnConstantsInImplementation.ts, 2, 13)) +>x : Symbol(x, Decl(overloadingOnConstantsInImplementation.ts, 2, 21)) +} diff --git a/tests/baselines/reference/overloadingOnConstantsInImplementation.types b/tests/baselines/reference/overloadingOnConstantsInImplementation.types new file mode 100644 index 00000000000..0cdb13e995f --- /dev/null +++ b/tests/baselines/reference/overloadingOnConstantsInImplementation.types @@ -0,0 +1,16 @@ +=== tests/cases/compiler/overloadingOnConstantsInImplementation.ts === +function foo(a: 'hi', x: string); +>foo : { (a: "hi", x: string): any; (a: "hi", x: string): any; } +>a : "hi" +>x : string + +function foo(a: 'hi', x: string); +>foo : { (a: "hi", x: string): any; (a: "hi", x: string): any; } +>a : "hi" +>x : string + +function foo(a: 'hi', x: any) { +>foo : { (a: "hi", x: string): any; (a: "hi", x: string): any; } +>a : "hi" +>x : any +} diff --git a/tests/baselines/reference/specializedOverloadWithRestParameters.errors.txt b/tests/baselines/reference/specializedOverloadWithRestParameters.errors.txt deleted file mode 100644 index 0e67cc37f32..00000000000 --- a/tests/baselines/reference/specializedOverloadWithRestParameters.errors.txt +++ /dev/null @@ -1,21 +0,0 @@ -tests/cases/compiler/specializedOverloadWithRestParameters.ts(3,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/compiler/specializedOverloadWithRestParameters.ts(8,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - - -==== tests/cases/compiler/specializedOverloadWithRestParameters.ts (2 errors) ==== - class Base { foo() { } } - class Derived1 extends Base { bar() { } } - function f(tagName: 'span', ...args): Derived1; // error - ~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - function f(tagName: number, ...args): Base; - function f(tagName: any): Base { - return null; - } - function g(tagName: 'span', arg): Derived1; // error - ~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - function g(tagName: number, arg): Base; - function g(tagName: any): Base { - return null; - } \ No newline at end of file diff --git a/tests/baselines/reference/specializedOverloadWithRestParameters.symbols b/tests/baselines/reference/specializedOverloadWithRestParameters.symbols new file mode 100644 index 00000000000..77e16aced4d --- /dev/null +++ b/tests/baselines/reference/specializedOverloadWithRestParameters.symbols @@ -0,0 +1,48 @@ +=== tests/cases/compiler/specializedOverloadWithRestParameters.ts === +class Base { foo() { } } +>Base : Symbol(Base, Decl(specializedOverloadWithRestParameters.ts, 0, 0)) +>foo : Symbol(foo, Decl(specializedOverloadWithRestParameters.ts, 0, 12)) + +class Derived1 extends Base { bar() { } } +>Derived1 : Symbol(Derived1, Decl(specializedOverloadWithRestParameters.ts, 0, 24)) +>Base : Symbol(Base, Decl(specializedOverloadWithRestParameters.ts, 0, 0)) +>bar : Symbol(bar, Decl(specializedOverloadWithRestParameters.ts, 1, 29)) + +function f(tagName: 'span', ...args): Derived1; // error +>f : Symbol(f, Decl(specializedOverloadWithRestParameters.ts, 1, 41), Decl(specializedOverloadWithRestParameters.ts, 2, 47), Decl(specializedOverloadWithRestParameters.ts, 3, 43)) +>tagName : Symbol(tagName, Decl(specializedOverloadWithRestParameters.ts, 2, 11)) +>args : Symbol(args, Decl(specializedOverloadWithRestParameters.ts, 2, 27)) +>Derived1 : Symbol(Derived1, Decl(specializedOverloadWithRestParameters.ts, 0, 24)) + +function f(tagName: number, ...args): Base; +>f : Symbol(f, Decl(specializedOverloadWithRestParameters.ts, 1, 41), Decl(specializedOverloadWithRestParameters.ts, 2, 47), Decl(specializedOverloadWithRestParameters.ts, 3, 43)) +>tagName : Symbol(tagName, Decl(specializedOverloadWithRestParameters.ts, 3, 11)) +>args : Symbol(args, Decl(specializedOverloadWithRestParameters.ts, 3, 27)) +>Base : Symbol(Base, Decl(specializedOverloadWithRestParameters.ts, 0, 0)) + +function f(tagName: any): Base { +>f : Symbol(f, Decl(specializedOverloadWithRestParameters.ts, 1, 41), Decl(specializedOverloadWithRestParameters.ts, 2, 47), Decl(specializedOverloadWithRestParameters.ts, 3, 43)) +>tagName : Symbol(tagName, Decl(specializedOverloadWithRestParameters.ts, 4, 11)) +>Base : Symbol(Base, Decl(specializedOverloadWithRestParameters.ts, 0, 0)) + + return null; +} +function g(tagName: 'span', arg): Derived1; // error +>g : Symbol(g, Decl(specializedOverloadWithRestParameters.ts, 6, 1), Decl(specializedOverloadWithRestParameters.ts, 7, 43), Decl(specializedOverloadWithRestParameters.ts, 8, 39)) +>tagName : Symbol(tagName, Decl(specializedOverloadWithRestParameters.ts, 7, 11)) +>arg : Symbol(arg, Decl(specializedOverloadWithRestParameters.ts, 7, 27)) +>Derived1 : Symbol(Derived1, Decl(specializedOverloadWithRestParameters.ts, 0, 24)) + +function g(tagName: number, arg): Base; +>g : Symbol(g, Decl(specializedOverloadWithRestParameters.ts, 6, 1), Decl(specializedOverloadWithRestParameters.ts, 7, 43), Decl(specializedOverloadWithRestParameters.ts, 8, 39)) +>tagName : Symbol(tagName, Decl(specializedOverloadWithRestParameters.ts, 8, 11)) +>arg : Symbol(arg, Decl(specializedOverloadWithRestParameters.ts, 8, 27)) +>Base : Symbol(Base, Decl(specializedOverloadWithRestParameters.ts, 0, 0)) + +function g(tagName: any): Base { +>g : Symbol(g, Decl(specializedOverloadWithRestParameters.ts, 6, 1), Decl(specializedOverloadWithRestParameters.ts, 7, 43), Decl(specializedOverloadWithRestParameters.ts, 8, 39)) +>tagName : Symbol(tagName, Decl(specializedOverloadWithRestParameters.ts, 9, 11)) +>Base : Symbol(Base, Decl(specializedOverloadWithRestParameters.ts, 0, 0)) + + return null; +} diff --git a/tests/baselines/reference/specializedOverloadWithRestParameters.types b/tests/baselines/reference/specializedOverloadWithRestParameters.types new file mode 100644 index 00000000000..1f7fd391ec7 --- /dev/null +++ b/tests/baselines/reference/specializedOverloadWithRestParameters.types @@ -0,0 +1,50 @@ +=== tests/cases/compiler/specializedOverloadWithRestParameters.ts === +class Base { foo() { } } +>Base : Base +>foo : () => void + +class Derived1 extends Base { bar() { } } +>Derived1 : Derived1 +>Base : Base +>bar : () => void + +function f(tagName: 'span', ...args): Derived1; // error +>f : { (tagName: "span", ...args: any[]): Derived1; (tagName: number, ...args: any[]): Base; } +>tagName : "span" +>args : any[] +>Derived1 : Derived1 + +function f(tagName: number, ...args): Base; +>f : { (tagName: "span", ...args: any[]): Derived1; (tagName: number, ...args: any[]): Base; } +>tagName : number +>args : any[] +>Base : Base + +function f(tagName: any): Base { +>f : { (tagName: "span", ...args: any[]): Derived1; (tagName: number, ...args: any[]): Base; } +>tagName : any +>Base : Base + + return null; +>null : null +} +function g(tagName: 'span', arg): Derived1; // error +>g : { (tagName: "span", arg: any): Derived1; (tagName: number, arg: any): Base; } +>tagName : "span" +>arg : any +>Derived1 : Derived1 + +function g(tagName: number, arg): Base; +>g : { (tagName: "span", arg: any): Derived1; (tagName: number, arg: any): Base; } +>tagName : number +>arg : any +>Base : Base + +function g(tagName: any): Base { +>g : { (tagName: "span", arg: any): Derived1; (tagName: number, arg: any): Base; } +>tagName : any +>Base : Base + + return null; +>null : null +} diff --git a/tests/baselines/reference/specializedSignatureAsCallbackParameter1.errors.txt b/tests/baselines/reference/specializedSignatureAsCallbackParameter1.errors.txt index 1fb3082622a..61b499e0aee 100644 --- a/tests/baselines/reference/specializedSignatureAsCallbackParameter1.errors.txt +++ b/tests/baselines/reference/specializedSignatureAsCallbackParameter1.errors.txt @@ -1,9 +1,8 @@ tests/cases/compiler/specializedSignatureAsCallbackParameter1.ts(7,4): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. tests/cases/compiler/specializedSignatureAsCallbackParameter1.ts(8,4): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. -tests/cases/compiler/specializedSignatureAsCallbackParameter1.ts(8,7): error TS2381: A signature with an implementation cannot use a string literal type. -==== tests/cases/compiler/specializedSignatureAsCallbackParameter1.ts (3 errors) ==== +==== tests/cases/compiler/specializedSignatureAsCallbackParameter1.ts (2 errors) ==== function x3(a: number, cb: (x: number) => number); function x3(a: string, cb: (x: number) => number); function x3(a: any, cb: (x: number) => number) { @@ -15,6 +14,4 @@ tests/cases/compiler/specializedSignatureAsCallbackParameter1.ts(8,7): error TS2 !!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. x3(1, (x: 'hm') => 1); ~ -!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. - ~~~~~~~~~~~~~~ -!!! error TS2381: A signature with an implementation cannot use a string literal type. \ No newline at end of file +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.errors.txt b/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.errors.txt index a9293a83a13..d698193d02b 100644 --- a/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.errors.txt +++ b/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.errors.txt @@ -1,91 +1,58 @@ -tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts(4,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts(8,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts(14,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts(20,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts(26,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts(28,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts(33,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts(35,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts(40,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts(42,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts(47,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts(49,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts(4,10): error TS2394: Overload signature is not compatible with function implementation. -==== tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts (12 errors) ==== +==== tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts (1 errors) ==== // Specialized signatures must be a subtype of a non-specialized signature // All the below should be errors function foo(x: 'a'); ~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2394: Overload signature is not compatible with function implementation. function foo(x: number) { } class C { foo(x: 'a'); - ~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. foo(x: number); foo(x: any) { } } class C2 { foo(x: 'a'); - ~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. foo(x: T); foo(x: any) { } } class C3 { foo(x: 'a'); - ~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. foo(x: T); foo(x: any) { } } interface I { (x: 'a'); - ~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. (x: number); foo(x: 'a'); - ~~~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. foo(x: number); } interface I2 { (x: 'a'); - ~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. (x: T); foo(x: 'a'); - ~~~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. foo(x: T); } interface I3 { (x: 'a'); - ~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. (x: T); foo(x: 'a'); - ~~~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. foo(x: T); } var a: { (x: 'a'); - ~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. (x: number); foo(x: 'a'); - ~~~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. foo(x: number); } diff --git a/tests/baselines/reference/specializedSignatureOverloadReturnTypeWithIndexers.errors.txt b/tests/baselines/reference/specializedSignatureOverloadReturnTypeWithIndexers.errors.txt deleted file mode 100644 index 788a8092ec7..00000000000 --- a/tests/baselines/reference/specializedSignatureOverloadReturnTypeWithIndexers.errors.txt +++ /dev/null @@ -1,22 +0,0 @@ -tests/cases/compiler/specializedSignatureOverloadReturnTypeWithIndexers.ts(15,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - - -==== tests/cases/compiler/specializedSignatureOverloadReturnTypeWithIndexers.ts (1 errors) ==== - interface A { - f(p: string): { [p: string]: string; }; - f(p: "spec"): { [p: string]: any; } // Should be ok - } - interface B { - f(p: string): { [p: number]: string; }; - f(p: "spec"): { [p: string]: any; } // Should be ok - } - interface C { - f(p: string): { [p: number]: string; }; - f(p: "spec"): { [p: number]: any; } // Should be ok - } - interface D { - f(p: string): { [p: string]: string; }; - f(p: "spec"): { [p: number]: any; } // Should be error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - } \ No newline at end of file diff --git a/tests/baselines/reference/specializedSignatureOverloadReturnTypeWithIndexers.symbols b/tests/baselines/reference/specializedSignatureOverloadReturnTypeWithIndexers.symbols new file mode 100644 index 00000000000..ea966cfda18 --- /dev/null +++ b/tests/baselines/reference/specializedSignatureOverloadReturnTypeWithIndexers.symbols @@ -0,0 +1,53 @@ +=== tests/cases/compiler/specializedSignatureOverloadReturnTypeWithIndexers.ts === +interface A { +>A : Symbol(A, Decl(specializedSignatureOverloadReturnTypeWithIndexers.ts, 0, 0)) + + f(p: string): { [p: string]: string; }; +>f : Symbol(f, Decl(specializedSignatureOverloadReturnTypeWithIndexers.ts, 0, 13), Decl(specializedSignatureOverloadReturnTypeWithIndexers.ts, 1, 43)) +>p : Symbol(p, Decl(specializedSignatureOverloadReturnTypeWithIndexers.ts, 1, 6)) +>p : Symbol(p, Decl(specializedSignatureOverloadReturnTypeWithIndexers.ts, 1, 21)) + + f(p: "spec"): { [p: string]: any; } // Should be ok +>f : Symbol(f, Decl(specializedSignatureOverloadReturnTypeWithIndexers.ts, 0, 13), Decl(specializedSignatureOverloadReturnTypeWithIndexers.ts, 1, 43)) +>p : Symbol(p, Decl(specializedSignatureOverloadReturnTypeWithIndexers.ts, 2, 6)) +>p : Symbol(p, Decl(specializedSignatureOverloadReturnTypeWithIndexers.ts, 2, 21)) +} +interface B { +>B : Symbol(B, Decl(specializedSignatureOverloadReturnTypeWithIndexers.ts, 3, 1)) + + f(p: string): { [p: number]: string; }; +>f : Symbol(f, Decl(specializedSignatureOverloadReturnTypeWithIndexers.ts, 4, 13), Decl(specializedSignatureOverloadReturnTypeWithIndexers.ts, 5, 43)) +>p : Symbol(p, Decl(specializedSignatureOverloadReturnTypeWithIndexers.ts, 5, 6)) +>p : Symbol(p, Decl(specializedSignatureOverloadReturnTypeWithIndexers.ts, 5, 21)) + + f(p: "spec"): { [p: string]: any; } // Should be ok +>f : Symbol(f, Decl(specializedSignatureOverloadReturnTypeWithIndexers.ts, 4, 13), Decl(specializedSignatureOverloadReturnTypeWithIndexers.ts, 5, 43)) +>p : Symbol(p, Decl(specializedSignatureOverloadReturnTypeWithIndexers.ts, 6, 6)) +>p : Symbol(p, Decl(specializedSignatureOverloadReturnTypeWithIndexers.ts, 6, 21)) +} +interface C { +>C : Symbol(C, Decl(specializedSignatureOverloadReturnTypeWithIndexers.ts, 7, 1)) + + f(p: string): { [p: number]: string; }; +>f : Symbol(f, Decl(specializedSignatureOverloadReturnTypeWithIndexers.ts, 8, 13), Decl(specializedSignatureOverloadReturnTypeWithIndexers.ts, 9, 43)) +>p : Symbol(p, Decl(specializedSignatureOverloadReturnTypeWithIndexers.ts, 9, 6)) +>p : Symbol(p, Decl(specializedSignatureOverloadReturnTypeWithIndexers.ts, 9, 21)) + + f(p: "spec"): { [p: number]: any; } // Should be ok +>f : Symbol(f, Decl(specializedSignatureOverloadReturnTypeWithIndexers.ts, 8, 13), Decl(specializedSignatureOverloadReturnTypeWithIndexers.ts, 9, 43)) +>p : Symbol(p, Decl(specializedSignatureOverloadReturnTypeWithIndexers.ts, 10, 6)) +>p : Symbol(p, Decl(specializedSignatureOverloadReturnTypeWithIndexers.ts, 10, 21)) +} +interface D { +>D : Symbol(D, Decl(specializedSignatureOverloadReturnTypeWithIndexers.ts, 11, 1)) + + f(p: string): { [p: string]: string; }; +>f : Symbol(f, Decl(specializedSignatureOverloadReturnTypeWithIndexers.ts, 12, 13), Decl(specializedSignatureOverloadReturnTypeWithIndexers.ts, 13, 43)) +>p : Symbol(p, Decl(specializedSignatureOverloadReturnTypeWithIndexers.ts, 13, 6)) +>p : Symbol(p, Decl(specializedSignatureOverloadReturnTypeWithIndexers.ts, 13, 21)) + + f(p: "spec"): { [p: number]: any; } // Should be error +>f : Symbol(f, Decl(specializedSignatureOverloadReturnTypeWithIndexers.ts, 12, 13), Decl(specializedSignatureOverloadReturnTypeWithIndexers.ts, 13, 43)) +>p : Symbol(p, Decl(specializedSignatureOverloadReturnTypeWithIndexers.ts, 14, 6)) +>p : Symbol(p, Decl(specializedSignatureOverloadReturnTypeWithIndexers.ts, 14, 21)) +} diff --git a/tests/baselines/reference/specializedSignatureOverloadReturnTypeWithIndexers.types b/tests/baselines/reference/specializedSignatureOverloadReturnTypeWithIndexers.types new file mode 100644 index 00000000000..1a7e9549327 --- /dev/null +++ b/tests/baselines/reference/specializedSignatureOverloadReturnTypeWithIndexers.types @@ -0,0 +1,53 @@ +=== tests/cases/compiler/specializedSignatureOverloadReturnTypeWithIndexers.ts === +interface A { +>A : A + + f(p: string): { [p: string]: string; }; +>f : { (p: string): { [p: string]: string; }; (p: "spec"): { [p: string]: any; }; } +>p : string +>p : string + + f(p: "spec"): { [p: string]: any; } // Should be ok +>f : { (p: string): { [p: string]: string; }; (p: "spec"): { [p: string]: any; }; } +>p : "spec" +>p : string +} +interface B { +>B : B + + f(p: string): { [p: number]: string; }; +>f : { (p: string): { [p: number]: string; }; (p: "spec"): { [p: string]: any; }; } +>p : string +>p : number + + f(p: "spec"): { [p: string]: any; } // Should be ok +>f : { (p: string): { [p: number]: string; }; (p: "spec"): { [p: string]: any; }; } +>p : "spec" +>p : string +} +interface C { +>C : C + + f(p: string): { [p: number]: string; }; +>f : { (p: string): { [p: number]: string; }; (p: "spec"): { [p: number]: any; }; } +>p : string +>p : number + + f(p: "spec"): { [p: number]: any; } // Should be ok +>f : { (p: string): { [p: number]: string; }; (p: "spec"): { [p: number]: any; }; } +>p : "spec" +>p : number +} +interface D { +>D : D + + f(p: string): { [p: string]: string; }; +>f : { (p: string): { [p: string]: string; }; (p: "spec"): { [p: number]: any; }; } +>p : string +>p : string + + f(p: "spec"): { [p: number]: any; } // Should be error +>f : { (p: string): { [p: string]: string; }; (p: "spec"): { [p: number]: any; }; } +>p : "spec" +>p : number +} diff --git a/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.errors.txt b/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.errors.txt deleted file mode 100644 index af75273ade3..00000000000 --- a/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.errors.txt +++ /dev/null @@ -1,124 +0,0 @@ -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLiteralTypeIsSubtypeOfString.ts(22,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLiteralTypeIsSubtypeOfString.ts(26,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLiteralTypeIsSubtypeOfString.ts(30,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLiteralTypeIsSubtypeOfString.ts(34,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLiteralTypeIsSubtypeOfString.ts(38,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLiteralTypeIsSubtypeOfString.ts(77,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLiteralTypeIsSubtypeOfString.ts(90,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - - -==== tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLiteralTypeIsSubtypeOfString.ts (7 errors) ==== - // string literal types are subtypes of string, any - - // ok - function f1(x: 'a'); - function f1(x: string); - function f1(x: string) { } - - // ok - function f2(x: 'a'); - function f2(x: any); - function f2(x: any) { } - - // errors - function f3(x: 'a'); - function f3(x: Object); - function f3(x: any) { } - - function f4(x: 'a'); - function f4(x: {}); - function f4(x: any) { } - - function f5(x: 'a'); - ~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - function f5(x: number); - function f5(x: any) { } - - function f6(x: 'a'); - ~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - function f6(x: boolean); - function f6(x: any) { } - - function f7(x: 'a'); - ~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - function f7(x: Date); - function f7(x: any) { } - - function f8(x: 'a'); - ~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - function f8(x: RegExp); - function f8(x: any) { } - - function f9(x: 'a'); - ~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - function f9(x: () => {}); - function f9(x: any) { } - - class C implements String { - toString(): string { return null; } - charAt(pos: number): string { return null; } - charCodeAt(index: number): number { return null; } - concat(...strings: string[]): string { return null; } - indexOf(searchString: string, position?: number): number { return null; } - lastIndexOf(searchString: string, position?: number): number { return null; } - localeCompare(that: string): number { return null; } - match(regexp: any): string[] { return null; } - replace(searchValue: any, replaceValue: any): string { return null; } - search(regexp: any): number { return null; } - slice(start?: number, end?: number): string { return null; } - split(separator: any, limit?: number): string[] { return null; } - substring(start: number, end?: number): string { return null; } - toLowerCase(): string { return null; } - toLocaleLowerCase(): string { return null; } - toUpperCase(): string { return null; } - toLocaleUpperCase(): string { return null; } - trim(): string { return null; } - length: number; - substr(from: number, length?: number): string { return null; } - valueOf(): string { return null; } - [index: number]: string; - } - - // BUG 831846 - function f10(x: 'a'); - function f10(x: C); - function f10(x: any) { } - - interface I extends String { - foo: string; - } - - // BUG 831846 - function f11(x: 'a'); - ~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - function f11(x: I); - function f11(x: any) { } - - function f12(x: 'a'); - function f12(x: T); - function f12(x: any) { } - - function f13(x: 'a'); - function f13(x: T); - function f13(x: any) { } - - enum E { A } - function f14(x: 'a'); - ~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - function f14(x: E); - function f14(x: any) { } - - function f15(x: 'a'); - function f15(x: U); - function f15(x: any) { } - - function f16(x: 'a'); - function f16(x: U); - function f16(x: any) { } \ No newline at end of file diff --git a/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.symbols b/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.symbols new file mode 100644 index 00000000000..1a49a6a6c47 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.symbols @@ -0,0 +1,343 @@ +=== tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLiteralTypeIsSubtypeOfString.ts === +// string literal types are subtypes of string, any + +// ok +function f1(x: 'a'); +>f1 : Symbol(f1, Decl(stringLiteralTypeIsSubtypeOfString.ts, 0, 0), Decl(stringLiteralTypeIsSubtypeOfString.ts, 3, 20), Decl(stringLiteralTypeIsSubtypeOfString.ts, 4, 23)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 3, 12)) + +function f1(x: string); +>f1 : Symbol(f1, Decl(stringLiteralTypeIsSubtypeOfString.ts, 0, 0), Decl(stringLiteralTypeIsSubtypeOfString.ts, 3, 20), Decl(stringLiteralTypeIsSubtypeOfString.ts, 4, 23)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 4, 12)) + +function f1(x: string) { } +>f1 : Symbol(f1, Decl(stringLiteralTypeIsSubtypeOfString.ts, 0, 0), Decl(stringLiteralTypeIsSubtypeOfString.ts, 3, 20), Decl(stringLiteralTypeIsSubtypeOfString.ts, 4, 23)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 5, 12)) + +// ok +function f2(x: 'a'); +>f2 : Symbol(f2, Decl(stringLiteralTypeIsSubtypeOfString.ts, 5, 26), Decl(stringLiteralTypeIsSubtypeOfString.ts, 8, 20), Decl(stringLiteralTypeIsSubtypeOfString.ts, 9, 20)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 8, 12)) + +function f2(x: any); +>f2 : Symbol(f2, Decl(stringLiteralTypeIsSubtypeOfString.ts, 5, 26), Decl(stringLiteralTypeIsSubtypeOfString.ts, 8, 20), Decl(stringLiteralTypeIsSubtypeOfString.ts, 9, 20)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 9, 12)) + +function f2(x: any) { } +>f2 : Symbol(f2, Decl(stringLiteralTypeIsSubtypeOfString.ts, 5, 26), Decl(stringLiteralTypeIsSubtypeOfString.ts, 8, 20), Decl(stringLiteralTypeIsSubtypeOfString.ts, 9, 20)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 10, 12)) + +// errors +function f3(x: 'a'); +>f3 : Symbol(f3, Decl(stringLiteralTypeIsSubtypeOfString.ts, 10, 23), Decl(stringLiteralTypeIsSubtypeOfString.ts, 13, 20), Decl(stringLiteralTypeIsSubtypeOfString.ts, 14, 23)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 13, 12)) + +function f3(x: Object); +>f3 : Symbol(f3, Decl(stringLiteralTypeIsSubtypeOfString.ts, 10, 23), Decl(stringLiteralTypeIsSubtypeOfString.ts, 13, 20), Decl(stringLiteralTypeIsSubtypeOfString.ts, 14, 23)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 14, 12)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) + +function f3(x: any) { } +>f3 : Symbol(f3, Decl(stringLiteralTypeIsSubtypeOfString.ts, 10, 23), Decl(stringLiteralTypeIsSubtypeOfString.ts, 13, 20), Decl(stringLiteralTypeIsSubtypeOfString.ts, 14, 23)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 15, 12)) + +function f4(x: 'a'); +>f4 : Symbol(f4, Decl(stringLiteralTypeIsSubtypeOfString.ts, 15, 23), Decl(stringLiteralTypeIsSubtypeOfString.ts, 17, 20), Decl(stringLiteralTypeIsSubtypeOfString.ts, 18, 19)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 17, 12)) + +function f4(x: {}); +>f4 : Symbol(f4, Decl(stringLiteralTypeIsSubtypeOfString.ts, 15, 23), Decl(stringLiteralTypeIsSubtypeOfString.ts, 17, 20), Decl(stringLiteralTypeIsSubtypeOfString.ts, 18, 19)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 18, 12)) + +function f4(x: any) { } +>f4 : Symbol(f4, Decl(stringLiteralTypeIsSubtypeOfString.ts, 15, 23), Decl(stringLiteralTypeIsSubtypeOfString.ts, 17, 20), Decl(stringLiteralTypeIsSubtypeOfString.ts, 18, 19)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 19, 12)) + +function f5(x: 'a'); +>f5 : Symbol(f5, Decl(stringLiteralTypeIsSubtypeOfString.ts, 19, 23), Decl(stringLiteralTypeIsSubtypeOfString.ts, 21, 20), Decl(stringLiteralTypeIsSubtypeOfString.ts, 22, 23)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 21, 12)) + +function f5(x: number); +>f5 : Symbol(f5, Decl(stringLiteralTypeIsSubtypeOfString.ts, 19, 23), Decl(stringLiteralTypeIsSubtypeOfString.ts, 21, 20), Decl(stringLiteralTypeIsSubtypeOfString.ts, 22, 23)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 22, 12)) + +function f5(x: any) { } +>f5 : Symbol(f5, Decl(stringLiteralTypeIsSubtypeOfString.ts, 19, 23), Decl(stringLiteralTypeIsSubtypeOfString.ts, 21, 20), Decl(stringLiteralTypeIsSubtypeOfString.ts, 22, 23)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 23, 12)) + +function f6(x: 'a'); +>f6 : Symbol(f6, Decl(stringLiteralTypeIsSubtypeOfString.ts, 23, 23), Decl(stringLiteralTypeIsSubtypeOfString.ts, 25, 20), Decl(stringLiteralTypeIsSubtypeOfString.ts, 26, 24)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 25, 12)) + +function f6(x: boolean); +>f6 : Symbol(f6, Decl(stringLiteralTypeIsSubtypeOfString.ts, 23, 23), Decl(stringLiteralTypeIsSubtypeOfString.ts, 25, 20), Decl(stringLiteralTypeIsSubtypeOfString.ts, 26, 24)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 26, 12)) + +function f6(x: any) { } +>f6 : Symbol(f6, Decl(stringLiteralTypeIsSubtypeOfString.ts, 23, 23), Decl(stringLiteralTypeIsSubtypeOfString.ts, 25, 20), Decl(stringLiteralTypeIsSubtypeOfString.ts, 26, 24)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 27, 12)) + +function f7(x: 'a'); +>f7 : Symbol(f7, Decl(stringLiteralTypeIsSubtypeOfString.ts, 27, 23), Decl(stringLiteralTypeIsSubtypeOfString.ts, 29, 20), Decl(stringLiteralTypeIsSubtypeOfString.ts, 30, 21)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 29, 12)) + +function f7(x: Date); +>f7 : Symbol(f7, Decl(stringLiteralTypeIsSubtypeOfString.ts, 27, 23), Decl(stringLiteralTypeIsSubtypeOfString.ts, 29, 20), Decl(stringLiteralTypeIsSubtypeOfString.ts, 30, 21)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 30, 12)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) + +function f7(x: any) { } +>f7 : Symbol(f7, Decl(stringLiteralTypeIsSubtypeOfString.ts, 27, 23), Decl(stringLiteralTypeIsSubtypeOfString.ts, 29, 20), Decl(stringLiteralTypeIsSubtypeOfString.ts, 30, 21)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 31, 12)) + +function f8(x: 'a'); +>f8 : Symbol(f8, Decl(stringLiteralTypeIsSubtypeOfString.ts, 31, 23), Decl(stringLiteralTypeIsSubtypeOfString.ts, 33, 20), Decl(stringLiteralTypeIsSubtypeOfString.ts, 34, 23)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 33, 12)) + +function f8(x: RegExp); +>f8 : Symbol(f8, Decl(stringLiteralTypeIsSubtypeOfString.ts, 31, 23), Decl(stringLiteralTypeIsSubtypeOfString.ts, 33, 20), Decl(stringLiteralTypeIsSubtypeOfString.ts, 34, 23)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 34, 12)) +>RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) + +function f8(x: any) { } +>f8 : Symbol(f8, Decl(stringLiteralTypeIsSubtypeOfString.ts, 31, 23), Decl(stringLiteralTypeIsSubtypeOfString.ts, 33, 20), Decl(stringLiteralTypeIsSubtypeOfString.ts, 34, 23)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 35, 12)) + +function f9(x: 'a'); +>f9 : Symbol(f9, Decl(stringLiteralTypeIsSubtypeOfString.ts, 35, 23), Decl(stringLiteralTypeIsSubtypeOfString.ts, 37, 20), Decl(stringLiteralTypeIsSubtypeOfString.ts, 38, 25)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 37, 12)) + +function f9(x: () => {}); +>f9 : Symbol(f9, Decl(stringLiteralTypeIsSubtypeOfString.ts, 35, 23), Decl(stringLiteralTypeIsSubtypeOfString.ts, 37, 20), Decl(stringLiteralTypeIsSubtypeOfString.ts, 38, 25)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 38, 12)) + +function f9(x: any) { } +>f9 : Symbol(f9, Decl(stringLiteralTypeIsSubtypeOfString.ts, 35, 23), Decl(stringLiteralTypeIsSubtypeOfString.ts, 37, 20), Decl(stringLiteralTypeIsSubtypeOfString.ts, 38, 25)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 39, 12)) + +class C implements String { +>C : Symbol(C, Decl(stringLiteralTypeIsSubtypeOfString.ts, 39, 23)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) + + toString(): string { return null; } +>toString : Symbol(toString, Decl(stringLiteralTypeIsSubtypeOfString.ts, 41, 27)) + + charAt(pos: number): string { return null; } +>charAt : Symbol(charAt, Decl(stringLiteralTypeIsSubtypeOfString.ts, 42, 39)) +>pos : Symbol(pos, Decl(stringLiteralTypeIsSubtypeOfString.ts, 43, 11)) + + charCodeAt(index: number): number { return null; } +>charCodeAt : Symbol(charCodeAt, Decl(stringLiteralTypeIsSubtypeOfString.ts, 43, 48)) +>index : Symbol(index, Decl(stringLiteralTypeIsSubtypeOfString.ts, 44, 15)) + + concat(...strings: string[]): string { return null; } +>concat : Symbol(concat, Decl(stringLiteralTypeIsSubtypeOfString.ts, 44, 54)) +>strings : Symbol(strings, Decl(stringLiteralTypeIsSubtypeOfString.ts, 45, 11)) + + indexOf(searchString: string, position?: number): number { return null; } +>indexOf : Symbol(indexOf, Decl(stringLiteralTypeIsSubtypeOfString.ts, 45, 57)) +>searchString : Symbol(searchString, Decl(stringLiteralTypeIsSubtypeOfString.ts, 46, 12)) +>position : Symbol(position, Decl(stringLiteralTypeIsSubtypeOfString.ts, 46, 33)) + + lastIndexOf(searchString: string, position?: number): number { return null; } +>lastIndexOf : Symbol(lastIndexOf, Decl(stringLiteralTypeIsSubtypeOfString.ts, 46, 77)) +>searchString : Symbol(searchString, Decl(stringLiteralTypeIsSubtypeOfString.ts, 47, 16)) +>position : Symbol(position, Decl(stringLiteralTypeIsSubtypeOfString.ts, 47, 37)) + + localeCompare(that: string): number { return null; } +>localeCompare : Symbol(localeCompare, Decl(stringLiteralTypeIsSubtypeOfString.ts, 47, 81)) +>that : Symbol(that, Decl(stringLiteralTypeIsSubtypeOfString.ts, 48, 18)) + + match(regexp: any): string[] { return null; } +>match : Symbol(match, Decl(stringLiteralTypeIsSubtypeOfString.ts, 48, 56)) +>regexp : Symbol(regexp, Decl(stringLiteralTypeIsSubtypeOfString.ts, 49, 10)) + + replace(searchValue: any, replaceValue: any): string { return null; } +>replace : Symbol(replace, Decl(stringLiteralTypeIsSubtypeOfString.ts, 49, 49)) +>searchValue : Symbol(searchValue, Decl(stringLiteralTypeIsSubtypeOfString.ts, 50, 12)) +>replaceValue : Symbol(replaceValue, Decl(stringLiteralTypeIsSubtypeOfString.ts, 50, 29)) + + search(regexp: any): number { return null; } +>search : Symbol(search, Decl(stringLiteralTypeIsSubtypeOfString.ts, 50, 73)) +>regexp : Symbol(regexp, Decl(stringLiteralTypeIsSubtypeOfString.ts, 51, 11)) + + slice(start?: number, end?: number): string { return null; } +>slice : Symbol(slice, Decl(stringLiteralTypeIsSubtypeOfString.ts, 51, 48)) +>start : Symbol(start, Decl(stringLiteralTypeIsSubtypeOfString.ts, 52, 10)) +>end : Symbol(end, Decl(stringLiteralTypeIsSubtypeOfString.ts, 52, 25)) + + split(separator: any, limit?: number): string[] { return null; } +>split : Symbol(split, Decl(stringLiteralTypeIsSubtypeOfString.ts, 52, 64)) +>separator : Symbol(separator, Decl(stringLiteralTypeIsSubtypeOfString.ts, 53, 10)) +>limit : Symbol(limit, Decl(stringLiteralTypeIsSubtypeOfString.ts, 53, 25)) + + substring(start: number, end?: number): string { return null; } +>substring : Symbol(substring, Decl(stringLiteralTypeIsSubtypeOfString.ts, 53, 68)) +>start : Symbol(start, Decl(stringLiteralTypeIsSubtypeOfString.ts, 54, 14)) +>end : Symbol(end, Decl(stringLiteralTypeIsSubtypeOfString.ts, 54, 28)) + + toLowerCase(): string { return null; } +>toLowerCase : Symbol(toLowerCase, Decl(stringLiteralTypeIsSubtypeOfString.ts, 54, 67)) + + toLocaleLowerCase(): string { return null; } +>toLocaleLowerCase : Symbol(toLocaleLowerCase, Decl(stringLiteralTypeIsSubtypeOfString.ts, 55, 42)) + + toUpperCase(): string { return null; } +>toUpperCase : Symbol(toUpperCase, Decl(stringLiteralTypeIsSubtypeOfString.ts, 56, 48)) + + toLocaleUpperCase(): string { return null; } +>toLocaleUpperCase : Symbol(toLocaleUpperCase, Decl(stringLiteralTypeIsSubtypeOfString.ts, 57, 42)) + + trim(): string { return null; } +>trim : Symbol(trim, Decl(stringLiteralTypeIsSubtypeOfString.ts, 58, 48)) + + length: number; +>length : Symbol(length, Decl(stringLiteralTypeIsSubtypeOfString.ts, 59, 35)) + + substr(from: number, length?: number): string { return null; } +>substr : Symbol(substr, Decl(stringLiteralTypeIsSubtypeOfString.ts, 60, 19)) +>from : Symbol(from, Decl(stringLiteralTypeIsSubtypeOfString.ts, 61, 11)) +>length : Symbol(length, Decl(stringLiteralTypeIsSubtypeOfString.ts, 61, 24)) + + valueOf(): string { return null; } +>valueOf : Symbol(valueOf, Decl(stringLiteralTypeIsSubtypeOfString.ts, 61, 66)) + + [index: number]: string; +>index : Symbol(index, Decl(stringLiteralTypeIsSubtypeOfString.ts, 63, 5)) +} + +// BUG 831846 +function f10(x: 'a'); +>f10 : Symbol(f10, Decl(stringLiteralTypeIsSubtypeOfString.ts, 64, 1), Decl(stringLiteralTypeIsSubtypeOfString.ts, 67, 21), Decl(stringLiteralTypeIsSubtypeOfString.ts, 68, 19)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 67, 13)) + +function f10(x: C); +>f10 : Symbol(f10, Decl(stringLiteralTypeIsSubtypeOfString.ts, 64, 1), Decl(stringLiteralTypeIsSubtypeOfString.ts, 67, 21), Decl(stringLiteralTypeIsSubtypeOfString.ts, 68, 19)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 68, 13)) +>C : Symbol(C, Decl(stringLiteralTypeIsSubtypeOfString.ts, 39, 23)) + +function f10(x: any) { } +>f10 : Symbol(f10, Decl(stringLiteralTypeIsSubtypeOfString.ts, 64, 1), Decl(stringLiteralTypeIsSubtypeOfString.ts, 67, 21), Decl(stringLiteralTypeIsSubtypeOfString.ts, 68, 19)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 69, 13)) + +interface I extends String { +>I : Symbol(I, Decl(stringLiteralTypeIsSubtypeOfString.ts, 69, 24)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) + + foo: string; +>foo : Symbol(foo, Decl(stringLiteralTypeIsSubtypeOfString.ts, 71, 28)) +} + +// BUG 831846 +function f11(x: 'a'); +>f11 : Symbol(f11, Decl(stringLiteralTypeIsSubtypeOfString.ts, 73, 1), Decl(stringLiteralTypeIsSubtypeOfString.ts, 76, 21), Decl(stringLiteralTypeIsSubtypeOfString.ts, 77, 19)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 76, 13)) + +function f11(x: I); +>f11 : Symbol(f11, Decl(stringLiteralTypeIsSubtypeOfString.ts, 73, 1), Decl(stringLiteralTypeIsSubtypeOfString.ts, 76, 21), Decl(stringLiteralTypeIsSubtypeOfString.ts, 77, 19)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 77, 13)) +>I : Symbol(I, Decl(stringLiteralTypeIsSubtypeOfString.ts, 69, 24)) + +function f11(x: any) { } +>f11 : Symbol(f11, Decl(stringLiteralTypeIsSubtypeOfString.ts, 73, 1), Decl(stringLiteralTypeIsSubtypeOfString.ts, 76, 21), Decl(stringLiteralTypeIsSubtypeOfString.ts, 77, 19)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 78, 13)) + +function f12(x: 'a'); +>f12 : Symbol(f12, Decl(stringLiteralTypeIsSubtypeOfString.ts, 78, 24), Decl(stringLiteralTypeIsSubtypeOfString.ts, 80, 24), Decl(stringLiteralTypeIsSubtypeOfString.ts, 81, 22)) +>T : Symbol(T, Decl(stringLiteralTypeIsSubtypeOfString.ts, 80, 13)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 80, 16)) + +function f12(x: T); +>f12 : Symbol(f12, Decl(stringLiteralTypeIsSubtypeOfString.ts, 78, 24), Decl(stringLiteralTypeIsSubtypeOfString.ts, 80, 24), Decl(stringLiteralTypeIsSubtypeOfString.ts, 81, 22)) +>T : Symbol(T, Decl(stringLiteralTypeIsSubtypeOfString.ts, 81, 13)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 81, 16)) +>T : Symbol(T, Decl(stringLiteralTypeIsSubtypeOfString.ts, 81, 13)) + +function f12(x: any) { } +>f12 : Symbol(f12, Decl(stringLiteralTypeIsSubtypeOfString.ts, 78, 24), Decl(stringLiteralTypeIsSubtypeOfString.ts, 80, 24), Decl(stringLiteralTypeIsSubtypeOfString.ts, 81, 22)) +>T : Symbol(T, Decl(stringLiteralTypeIsSubtypeOfString.ts, 82, 13)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 82, 16)) + +function f13(x: 'a'); +>f13 : Symbol(f13, Decl(stringLiteralTypeIsSubtypeOfString.ts, 82, 27), Decl(stringLiteralTypeIsSubtypeOfString.ts, 84, 39), Decl(stringLiteralTypeIsSubtypeOfString.ts, 85, 37)) +>T : Symbol(T, Decl(stringLiteralTypeIsSubtypeOfString.ts, 84, 13)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 84, 31)) + +function f13(x: T); +>f13 : Symbol(f13, Decl(stringLiteralTypeIsSubtypeOfString.ts, 82, 27), Decl(stringLiteralTypeIsSubtypeOfString.ts, 84, 39), Decl(stringLiteralTypeIsSubtypeOfString.ts, 85, 37)) +>T : Symbol(T, Decl(stringLiteralTypeIsSubtypeOfString.ts, 85, 13)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 85, 31)) +>T : Symbol(T, Decl(stringLiteralTypeIsSubtypeOfString.ts, 85, 13)) + +function f13(x: any) { } +>f13 : Symbol(f13, Decl(stringLiteralTypeIsSubtypeOfString.ts, 82, 27), Decl(stringLiteralTypeIsSubtypeOfString.ts, 84, 39), Decl(stringLiteralTypeIsSubtypeOfString.ts, 85, 37)) +>T : Symbol(T, Decl(stringLiteralTypeIsSubtypeOfString.ts, 86, 13)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 86, 31)) + +enum E { A } +>E : Symbol(E, Decl(stringLiteralTypeIsSubtypeOfString.ts, 86, 42)) +>A : Symbol(E.A, Decl(stringLiteralTypeIsSubtypeOfString.ts, 88, 8)) + +function f14(x: 'a'); +>f14 : Symbol(f14, Decl(stringLiteralTypeIsSubtypeOfString.ts, 88, 12), Decl(stringLiteralTypeIsSubtypeOfString.ts, 89, 21), Decl(stringLiteralTypeIsSubtypeOfString.ts, 90, 19)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 89, 13)) + +function f14(x: E); +>f14 : Symbol(f14, Decl(stringLiteralTypeIsSubtypeOfString.ts, 88, 12), Decl(stringLiteralTypeIsSubtypeOfString.ts, 89, 21), Decl(stringLiteralTypeIsSubtypeOfString.ts, 90, 19)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 90, 13)) +>E : Symbol(E, Decl(stringLiteralTypeIsSubtypeOfString.ts, 86, 42)) + +function f14(x: any) { } +>f14 : Symbol(f14, Decl(stringLiteralTypeIsSubtypeOfString.ts, 88, 12), Decl(stringLiteralTypeIsSubtypeOfString.ts, 89, 21), Decl(stringLiteralTypeIsSubtypeOfString.ts, 90, 19)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 91, 13)) + +function f15(x: 'a'); +>f15 : Symbol(f15, Decl(stringLiteralTypeIsSubtypeOfString.ts, 91, 24), Decl(stringLiteralTypeIsSubtypeOfString.ts, 93, 37), Decl(stringLiteralTypeIsSubtypeOfString.ts, 94, 35)) +>T : Symbol(T, Decl(stringLiteralTypeIsSubtypeOfString.ts, 93, 13)) +>U : Symbol(U, Decl(stringLiteralTypeIsSubtypeOfString.ts, 93, 15)) +>T : Symbol(T, Decl(stringLiteralTypeIsSubtypeOfString.ts, 93, 13)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 93, 29)) + +function f15(x: U); +>f15 : Symbol(f15, Decl(stringLiteralTypeIsSubtypeOfString.ts, 91, 24), Decl(stringLiteralTypeIsSubtypeOfString.ts, 93, 37), Decl(stringLiteralTypeIsSubtypeOfString.ts, 94, 35)) +>T : Symbol(T, Decl(stringLiteralTypeIsSubtypeOfString.ts, 94, 13)) +>U : Symbol(U, Decl(stringLiteralTypeIsSubtypeOfString.ts, 94, 15)) +>T : Symbol(T, Decl(stringLiteralTypeIsSubtypeOfString.ts, 94, 13)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 94, 29)) +>U : Symbol(U, Decl(stringLiteralTypeIsSubtypeOfString.ts, 94, 15)) + +function f15(x: any) { } +>f15 : Symbol(f15, Decl(stringLiteralTypeIsSubtypeOfString.ts, 91, 24), Decl(stringLiteralTypeIsSubtypeOfString.ts, 93, 37), Decl(stringLiteralTypeIsSubtypeOfString.ts, 94, 35)) +>T : Symbol(T, Decl(stringLiteralTypeIsSubtypeOfString.ts, 95, 13)) +>U : Symbol(U, Decl(stringLiteralTypeIsSubtypeOfString.ts, 95, 15)) +>T : Symbol(T, Decl(stringLiteralTypeIsSubtypeOfString.ts, 95, 13)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 95, 29)) + +function f16(x: 'a'); +>f16 : Symbol(f16, Decl(stringLiteralTypeIsSubtypeOfString.ts, 95, 40), Decl(stringLiteralTypeIsSubtypeOfString.ts, 97, 52), Decl(stringLiteralTypeIsSubtypeOfString.ts, 98, 50)) +>T : Symbol(T, Decl(stringLiteralTypeIsSubtypeOfString.ts, 97, 13)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>U : Symbol(U, Decl(stringLiteralTypeIsSubtypeOfString.ts, 97, 30)) +>T : Symbol(T, Decl(stringLiteralTypeIsSubtypeOfString.ts, 97, 13)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 97, 44)) + +function f16(x: U); +>f16 : Symbol(f16, Decl(stringLiteralTypeIsSubtypeOfString.ts, 95, 40), Decl(stringLiteralTypeIsSubtypeOfString.ts, 97, 52), Decl(stringLiteralTypeIsSubtypeOfString.ts, 98, 50)) +>T : Symbol(T, Decl(stringLiteralTypeIsSubtypeOfString.ts, 98, 13)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>U : Symbol(U, Decl(stringLiteralTypeIsSubtypeOfString.ts, 98, 30)) +>T : Symbol(T, Decl(stringLiteralTypeIsSubtypeOfString.ts, 98, 13)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 98, 44)) +>U : Symbol(U, Decl(stringLiteralTypeIsSubtypeOfString.ts, 98, 30)) + +function f16(x: any) { } +>f16 : Symbol(f16, Decl(stringLiteralTypeIsSubtypeOfString.ts, 95, 40), Decl(stringLiteralTypeIsSubtypeOfString.ts, 97, 52), Decl(stringLiteralTypeIsSubtypeOfString.ts, 98, 50)) +>T : Symbol(T, Decl(stringLiteralTypeIsSubtypeOfString.ts, 99, 13)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>U : Symbol(U, Decl(stringLiteralTypeIsSubtypeOfString.ts, 99, 30)) +>T : Symbol(T, Decl(stringLiteralTypeIsSubtypeOfString.ts, 99, 13)) +>x : Symbol(x, Decl(stringLiteralTypeIsSubtypeOfString.ts, 99, 44)) + diff --git a/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.types b/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.types new file mode 100644 index 00000000000..e5185476173 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.types @@ -0,0 +1,363 @@ +=== tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/stringLiteralTypeIsSubtypeOfString.ts === +// string literal types are subtypes of string, any + +// ok +function f1(x: 'a'); +>f1 : { (x: "a"): any; (x: string): any; } +>x : "a" + +function f1(x: string); +>f1 : { (x: "a"): any; (x: string): any; } +>x : string + +function f1(x: string) { } +>f1 : { (x: "a"): any; (x: string): any; } +>x : string + +// ok +function f2(x: 'a'); +>f2 : { (x: "a"): any; (x: any): any; } +>x : "a" + +function f2(x: any); +>f2 : { (x: "a"): any; (x: any): any; } +>x : any + +function f2(x: any) { } +>f2 : { (x: "a"): any; (x: any): any; } +>x : any + +// errors +function f3(x: 'a'); +>f3 : { (x: "a"): any; (x: Object): any; } +>x : "a" + +function f3(x: Object); +>f3 : { (x: "a"): any; (x: Object): any; } +>x : Object +>Object : Object + +function f3(x: any) { } +>f3 : { (x: "a"): any; (x: Object): any; } +>x : any + +function f4(x: 'a'); +>f4 : { (x: "a"): any; (x: {}): any; } +>x : "a" + +function f4(x: {}); +>f4 : { (x: "a"): any; (x: {}): any; } +>x : {} + +function f4(x: any) { } +>f4 : { (x: "a"): any; (x: {}): any; } +>x : any + +function f5(x: 'a'); +>f5 : { (x: "a"): any; (x: number): any; } +>x : "a" + +function f5(x: number); +>f5 : { (x: "a"): any; (x: number): any; } +>x : number + +function f5(x: any) { } +>f5 : { (x: "a"): any; (x: number): any; } +>x : any + +function f6(x: 'a'); +>f6 : { (x: "a"): any; (x: boolean): any; } +>x : "a" + +function f6(x: boolean); +>f6 : { (x: "a"): any; (x: boolean): any; } +>x : boolean + +function f6(x: any) { } +>f6 : { (x: "a"): any; (x: boolean): any; } +>x : any + +function f7(x: 'a'); +>f7 : { (x: "a"): any; (x: Date): any; } +>x : "a" + +function f7(x: Date); +>f7 : { (x: "a"): any; (x: Date): any; } +>x : Date +>Date : Date + +function f7(x: any) { } +>f7 : { (x: "a"): any; (x: Date): any; } +>x : any + +function f8(x: 'a'); +>f8 : { (x: "a"): any; (x: RegExp): any; } +>x : "a" + +function f8(x: RegExp); +>f8 : { (x: "a"): any; (x: RegExp): any; } +>x : RegExp +>RegExp : RegExp + +function f8(x: any) { } +>f8 : { (x: "a"): any; (x: RegExp): any; } +>x : any + +function f9(x: 'a'); +>f9 : { (x: "a"): any; (x: () => {}): any; } +>x : "a" + +function f9(x: () => {}); +>f9 : { (x: "a"): any; (x: () => {}): any; } +>x : () => {} + +function f9(x: any) { } +>f9 : { (x: "a"): any; (x: () => {}): any; } +>x : any + +class C implements String { +>C : C +>String : String + + toString(): string { return null; } +>toString : () => string +>null : null + + charAt(pos: number): string { return null; } +>charAt : (pos: number) => string +>pos : number +>null : null + + charCodeAt(index: number): number { return null; } +>charCodeAt : (index: number) => number +>index : number +>null : null + + concat(...strings: string[]): string { return null; } +>concat : (...strings: string[]) => string +>strings : string[] +>null : null + + indexOf(searchString: string, position?: number): number { return null; } +>indexOf : (searchString: string, position?: number) => number +>searchString : string +>position : number +>null : null + + lastIndexOf(searchString: string, position?: number): number { return null; } +>lastIndexOf : (searchString: string, position?: number) => number +>searchString : string +>position : number +>null : null + + localeCompare(that: string): number { return null; } +>localeCompare : (that: string) => number +>that : string +>null : null + + match(regexp: any): string[] { return null; } +>match : (regexp: any) => string[] +>regexp : any +>null : null + + replace(searchValue: any, replaceValue: any): string { return null; } +>replace : (searchValue: any, replaceValue: any) => string +>searchValue : any +>replaceValue : any +>null : null + + search(regexp: any): number { return null; } +>search : (regexp: any) => number +>regexp : any +>null : null + + slice(start?: number, end?: number): string { return null; } +>slice : (start?: number, end?: number) => string +>start : number +>end : number +>null : null + + split(separator: any, limit?: number): string[] { return null; } +>split : (separator: any, limit?: number) => string[] +>separator : any +>limit : number +>null : null + + substring(start: number, end?: number): string { return null; } +>substring : (start: number, end?: number) => string +>start : number +>end : number +>null : null + + toLowerCase(): string { return null; } +>toLowerCase : () => string +>null : null + + toLocaleLowerCase(): string { return null; } +>toLocaleLowerCase : () => string +>null : null + + toUpperCase(): string { return null; } +>toUpperCase : () => string +>null : null + + toLocaleUpperCase(): string { return null; } +>toLocaleUpperCase : () => string +>null : null + + trim(): string { return null; } +>trim : () => string +>null : null + + length: number; +>length : number + + substr(from: number, length?: number): string { return null; } +>substr : (from: number, length?: number) => string +>from : number +>length : number +>null : null + + valueOf(): string { return null; } +>valueOf : () => string +>null : null + + [index: number]: string; +>index : number +} + +// BUG 831846 +function f10(x: 'a'); +>f10 : { (x: "a"): any; (x: C): any; } +>x : "a" + +function f10(x: C); +>f10 : { (x: "a"): any; (x: C): any; } +>x : C +>C : C + +function f10(x: any) { } +>f10 : { (x: "a"): any; (x: C): any; } +>x : any + +interface I extends String { +>I : I +>String : String + + foo: string; +>foo : string +} + +// BUG 831846 +function f11(x: 'a'); +>f11 : { (x: "a"): any; (x: I): any; } +>x : "a" + +function f11(x: I); +>f11 : { (x: "a"): any; (x: I): any; } +>x : I +>I : I + +function f11(x: any) { } +>f11 : { (x: "a"): any; (x: I): any; } +>x : any + +function f12(x: 'a'); +>f12 : { (x: "a"): any; (x: T): any; } +>T : T +>x : "a" + +function f12(x: T); +>f12 : { (x: "a"): any; (x: T): any; } +>T : T +>x : T +>T : T + +function f12(x: any) { } +>f12 : { (x: "a"): any; (x: T): any; } +>T : T +>x : any + +function f13(x: 'a'); +>f13 : { (x: "a"): any; (x: T): any; } +>T : T +>String : String +>x : "a" + +function f13(x: T); +>f13 : { (x: "a"): any; (x: T): any; } +>T : T +>String : String +>x : T +>T : T + +function f13(x: any) { } +>f13 : { (x: "a"): any; (x: T): any; } +>T : T +>String : String +>x : any + +enum E { A } +>E : E +>A : E + +function f14(x: 'a'); +>f14 : { (x: "a"): any; (x: E): any; } +>x : "a" + +function f14(x: E); +>f14 : { (x: "a"): any; (x: E): any; } +>x : E +>E : E + +function f14(x: any) { } +>f14 : { (x: "a"): any; (x: E): any; } +>x : any + +function f15(x: 'a'); +>f15 : { (x: "a"): any; (x: U): any; } +>T : T +>U : U +>T : T +>x : "a" + +function f15(x: U); +>f15 : { (x: "a"): any; (x: U): any; } +>T : T +>U : U +>T : T +>x : U +>U : U + +function f15(x: any) { } +>f15 : { (x: "a"): any; (x: U): any; } +>T : T +>U : U +>T : T +>x : any + +function f16(x: 'a'); +>f16 : { (x: "a"): any; (x: U): any; } +>T : T +>String : String +>U : U +>T : T +>x : "a" + +function f16(x: U); +>f16 : { (x: "a"): any; (x: U): any; } +>T : T +>String : String +>U : U +>T : T +>x : U +>U : U + +function f16(x: any) { } +>f16 : { (x: "a"): any; (x: U): any; } +>T : T +>String : String +>U : U +>T : T +>x : any + diff --git a/tests/baselines/reference/stringLiteralTypesAsTags02.errors.txt b/tests/baselines/reference/stringLiteralTypesAsTags02.errors.txt deleted file mode 100644 index 077113632d0..00000000000 --- a/tests/baselines/reference/stringLiteralTypesAsTags02.errors.txt +++ /dev/null @@ -1,50 +0,0 @@ -tests/cases/conformance/types/stringLiteral/stringLiteralTypesAsTags02.ts(18,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/stringLiteral/stringLiteralTypesAsTags02.ts(19,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - - -==== tests/cases/conformance/types/stringLiteral/stringLiteralTypesAsTags02.ts (2 errors) ==== - - type Kind = "A" | "B" - - interface Entity { - kind: Kind; - } - - interface A extends Entity { - kind: "A"; - a: number; - } - - interface B extends Entity { - kind: "B"; - b: string; - } - - function hasKind(entity: Entity, kind: "A"): entity is A; - ~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - function hasKind(entity: Entity, kind: "B"): entity is B; - ~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - function hasKind(entity: Entity, kind: Kind): entity is (A | B) { - return entity.kind === kind; - } - - let x: A = { - kind: "A", - a: 100, - } - - if (hasKind(x, "A")) { - let a = x; - } - else { - let b = x; - } - - if (!hasKind(x, "B")) { - let c = x; - } - else { - let d = x; - } \ No newline at end of file diff --git a/tests/baselines/reference/stringLiteralTypesAsTags02.symbols b/tests/baselines/reference/stringLiteralTypesAsTags02.symbols new file mode 100644 index 00000000000..61d50230993 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesAsTags02.symbols @@ -0,0 +1,106 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesAsTags02.ts === + +type Kind = "A" | "B" +>Kind : Symbol(Kind, Decl(stringLiteralTypesAsTags02.ts, 0, 0)) + +interface Entity { +>Entity : Symbol(Entity, Decl(stringLiteralTypesAsTags02.ts, 1, 21)) + + kind: Kind; +>kind : Symbol(kind, Decl(stringLiteralTypesAsTags02.ts, 3, 18)) +>Kind : Symbol(Kind, Decl(stringLiteralTypesAsTags02.ts, 0, 0)) +} + +interface A extends Entity { +>A : Symbol(A, Decl(stringLiteralTypesAsTags02.ts, 5, 1)) +>Entity : Symbol(Entity, Decl(stringLiteralTypesAsTags02.ts, 1, 21)) + + kind: "A"; +>kind : Symbol(kind, Decl(stringLiteralTypesAsTags02.ts, 7, 28)) + + a: number; +>a : Symbol(a, Decl(stringLiteralTypesAsTags02.ts, 8, 14)) +} + +interface B extends Entity { +>B : Symbol(B, Decl(stringLiteralTypesAsTags02.ts, 10, 1)) +>Entity : Symbol(Entity, Decl(stringLiteralTypesAsTags02.ts, 1, 21)) + + kind: "B"; +>kind : Symbol(kind, Decl(stringLiteralTypesAsTags02.ts, 12, 28)) + + b: string; +>b : Symbol(b, Decl(stringLiteralTypesAsTags02.ts, 13, 14)) +} + +function hasKind(entity: Entity, kind: "A"): entity is A; +>hasKind : Symbol(hasKind, Decl(stringLiteralTypesAsTags02.ts, 15, 1), Decl(stringLiteralTypesAsTags02.ts, 17, 57), Decl(stringLiteralTypesAsTags02.ts, 18, 57)) +>entity : Symbol(entity, Decl(stringLiteralTypesAsTags02.ts, 17, 17)) +>Entity : Symbol(Entity, Decl(stringLiteralTypesAsTags02.ts, 1, 21)) +>kind : Symbol(kind, Decl(stringLiteralTypesAsTags02.ts, 17, 32)) +>entity : Symbol(entity, Decl(stringLiteralTypesAsTags02.ts, 17, 17)) +>A : Symbol(A, Decl(stringLiteralTypesAsTags02.ts, 5, 1)) + +function hasKind(entity: Entity, kind: "B"): entity is B; +>hasKind : Symbol(hasKind, Decl(stringLiteralTypesAsTags02.ts, 15, 1), Decl(stringLiteralTypesAsTags02.ts, 17, 57), Decl(stringLiteralTypesAsTags02.ts, 18, 57)) +>entity : Symbol(entity, Decl(stringLiteralTypesAsTags02.ts, 18, 17)) +>Entity : Symbol(Entity, Decl(stringLiteralTypesAsTags02.ts, 1, 21)) +>kind : Symbol(kind, Decl(stringLiteralTypesAsTags02.ts, 18, 32)) +>entity : Symbol(entity, Decl(stringLiteralTypesAsTags02.ts, 18, 17)) +>B : Symbol(B, Decl(stringLiteralTypesAsTags02.ts, 10, 1)) + +function hasKind(entity: Entity, kind: Kind): entity is (A | B) { +>hasKind : Symbol(hasKind, Decl(stringLiteralTypesAsTags02.ts, 15, 1), Decl(stringLiteralTypesAsTags02.ts, 17, 57), Decl(stringLiteralTypesAsTags02.ts, 18, 57)) +>entity : Symbol(entity, Decl(stringLiteralTypesAsTags02.ts, 19, 17)) +>Entity : Symbol(Entity, Decl(stringLiteralTypesAsTags02.ts, 1, 21)) +>kind : Symbol(kind, Decl(stringLiteralTypesAsTags02.ts, 19, 32)) +>Kind : Symbol(Kind, Decl(stringLiteralTypesAsTags02.ts, 0, 0)) +>entity : Symbol(entity, Decl(stringLiteralTypesAsTags02.ts, 19, 17)) +>A : Symbol(A, Decl(stringLiteralTypesAsTags02.ts, 5, 1)) +>B : Symbol(B, Decl(stringLiteralTypesAsTags02.ts, 10, 1)) + + return entity.kind === kind; +>entity.kind : Symbol(Entity.kind, Decl(stringLiteralTypesAsTags02.ts, 3, 18)) +>entity : Symbol(entity, Decl(stringLiteralTypesAsTags02.ts, 19, 17)) +>kind : Symbol(Entity.kind, Decl(stringLiteralTypesAsTags02.ts, 3, 18)) +>kind : Symbol(kind, Decl(stringLiteralTypesAsTags02.ts, 19, 32)) +} + +let x: A = { +>x : Symbol(x, Decl(stringLiteralTypesAsTags02.ts, 23, 3)) +>A : Symbol(A, Decl(stringLiteralTypesAsTags02.ts, 5, 1)) + + kind: "A", +>kind : Symbol(kind, Decl(stringLiteralTypesAsTags02.ts, 23, 12)) + + a: 100, +>a : Symbol(a, Decl(stringLiteralTypesAsTags02.ts, 24, 14)) +} + +if (hasKind(x, "A")) { +>hasKind : Symbol(hasKind, Decl(stringLiteralTypesAsTags02.ts, 15, 1), Decl(stringLiteralTypesAsTags02.ts, 17, 57), Decl(stringLiteralTypesAsTags02.ts, 18, 57)) +>x : Symbol(x, Decl(stringLiteralTypesAsTags02.ts, 23, 3)) + + let a = x; +>a : Symbol(a, Decl(stringLiteralTypesAsTags02.ts, 29, 7)) +>x : Symbol(x, Decl(stringLiteralTypesAsTags02.ts, 23, 3)) +} +else { + let b = x; +>b : Symbol(b, Decl(stringLiteralTypesAsTags02.ts, 32, 7)) +>x : Symbol(x, Decl(stringLiteralTypesAsTags02.ts, 23, 3)) +} + +if (!hasKind(x, "B")) { +>hasKind : Symbol(hasKind, Decl(stringLiteralTypesAsTags02.ts, 15, 1), Decl(stringLiteralTypesAsTags02.ts, 17, 57), Decl(stringLiteralTypesAsTags02.ts, 18, 57)) +>x : Symbol(x, Decl(stringLiteralTypesAsTags02.ts, 23, 3)) + + let c = x; +>c : Symbol(c, Decl(stringLiteralTypesAsTags02.ts, 36, 7)) +>x : Symbol(x, Decl(stringLiteralTypesAsTags02.ts, 23, 3)) +} +else { + let d = x; +>d : Symbol(d, Decl(stringLiteralTypesAsTags02.ts, 39, 7)) +>x : Symbol(x, Decl(stringLiteralTypesAsTags02.ts, 23, 3)) +} diff --git a/tests/baselines/reference/stringLiteralTypesAsTags02.types b/tests/baselines/reference/stringLiteralTypesAsTags02.types new file mode 100644 index 00000000000..0b8ea0faf67 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesAsTags02.types @@ -0,0 +1,115 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesAsTags02.ts === + +type Kind = "A" | "B" +>Kind : "A" | "B" + +interface Entity { +>Entity : Entity + + kind: Kind; +>kind : "A" | "B" +>Kind : "A" | "B" +} + +interface A extends Entity { +>A : A +>Entity : Entity + + kind: "A"; +>kind : "A" + + a: number; +>a : number +} + +interface B extends Entity { +>B : B +>Entity : Entity + + kind: "B"; +>kind : "B" + + b: string; +>b : string +} + +function hasKind(entity: Entity, kind: "A"): entity is A; +>hasKind : { (entity: Entity, kind: "A"): entity is A; (entity: Entity, kind: "B"): entity is B; } +>entity : Entity +>Entity : Entity +>kind : "A" +>entity : any +>A : A + +function hasKind(entity: Entity, kind: "B"): entity is B; +>hasKind : { (entity: Entity, kind: "A"): entity is A; (entity: Entity, kind: "B"): entity is B; } +>entity : Entity +>Entity : Entity +>kind : "B" +>entity : any +>B : B + +function hasKind(entity: Entity, kind: Kind): entity is (A | B) { +>hasKind : { (entity: Entity, kind: "A"): entity is A; (entity: Entity, kind: "B"): entity is B; } +>entity : Entity +>Entity : Entity +>kind : "A" | "B" +>Kind : "A" | "B" +>entity : any +>A : A +>B : B + + return entity.kind === kind; +>entity.kind === kind : boolean +>entity.kind : "A" | "B" +>entity : Entity +>kind : "A" | "B" +>kind : "A" | "B" +} + +let x: A = { +>x : A +>A : A +>{ kind: "A", a: 100,} : { kind: "A"; a: number; } + + kind: "A", +>kind : "A" +>"A" : "A" + + a: 100, +>a : number +>100 : number +} + +if (hasKind(x, "A")) { +>hasKind(x, "A") : entity is A +>hasKind : { (entity: Entity, kind: "A"): entity is A; (entity: Entity, kind: "B"): entity is B; } +>x : A +>"A" : "A" + + let a = x; +>a : A +>x : A +} +else { + let b = x; +>b : A +>x : A +} + +if (!hasKind(x, "B")) { +>!hasKind(x, "B") : boolean +>hasKind(x, "B") : entity is B +>hasKind : { (entity: Entity, kind: "A"): entity is A; (entity: Entity, kind: "B"): entity is B; } +>x : A +>"B" : "B" + + let c = x; +>c : A +>x : A +} +else { + let d = x; +>d : A +>x : A +} diff --git a/tests/baselines/reference/stringLiteralTypesAsTypeParameterConstraint01.js b/tests/baselines/reference/stringLiteralTypesAsTypeParameterConstraint01.js index 558f6bdf4c2..4f49d326ec0 100644 --- a/tests/baselines/reference/stringLiteralTypesAsTypeParameterConstraint01.js +++ b/tests/baselines/reference/stringLiteralTypesAsTypeParameterConstraint01.js @@ -43,26 +43,3 @@ declare let g: (x: "foo") => "foo"; declare let gResult: "foo"; declare let h: (x: "foo" | "bar") => "foo" | "bar"; declare let hResult: "foo" | "bar"; - - -//// [DtsFileErrors] - - -tests/cases/conformance/types/stringLiteral/stringLiteralTypesAsTypeParameterConstraint01.d.ts(3,16): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/stringLiteral/stringLiteralTypesAsTypeParameterConstraint01.d.ts(5,16): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - - -==== tests/cases/conformance/types/stringLiteral/stringLiteralTypesAsTypeParameterConstraint01.d.ts (2 errors) ==== - declare function foo(f: (x: T) => T): (x: T) => T; - declare function bar(f: (x: T) => T): (x: T) => T; - declare let f: (x: "foo") => "foo"; - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - declare let fResult: "foo"; - declare let g: (x: "foo") => "foo"; - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - declare let gResult: "foo"; - declare let h: (x: "foo" | "bar") => "foo" | "bar"; - declare let hResult: "foo" | "bar"; - \ No newline at end of file diff --git a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures.errors.txt b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures.errors.txt deleted file mode 100644 index 2bff320197a..00000000000 --- a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures.errors.txt +++ /dev/null @@ -1,62 +0,0 @@ -tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures.ts(3,10): error TS2381: A signature with an implementation cannot use a string literal type. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures.ts(4,18): error TS2381: A signature with an implementation cannot use a string literal type. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures.ts(5,10): error TS2381: A signature with an implementation cannot use a string literal type. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures.ts(8,5): error TS2381: A signature with an implementation cannot use a string literal type. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures.ts(12,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures.ts(13,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures.ts(17,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures.ts(18,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures.ts(22,5): error TS2381: A signature with an implementation cannot use a string literal type. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures.ts(23,17): error TS2381: A signature with an implementation cannot use a string literal type. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures.ts(24,8): error TS2381: A signature with an implementation cannot use a string literal type. - - -==== tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures.ts (11 errors) ==== - // String literal types are only valid in overload signatures - - function foo(x: 'hi') { } - ~~~ -!!! error TS2381: A signature with an implementation cannot use a string literal type. - var f = function foo(x: 'hi') { } - ~~~ -!!! error TS2381: A signature with an implementation cannot use a string literal type. - var f2 = (x: 'hi', y: 'hi') => { } - ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2381: A signature with an implementation cannot use a string literal type. - - class C { - foo(x: 'hi') { } - ~~~ -!!! error TS2381: A signature with an implementation cannot use a string literal type. - } - - interface I { - (x: 'hi'); - ~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - foo(x: 'hi', y: 'hi'); - ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - } - - var a: { - (x: 'hi'); - ~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - foo(x: 'hi'); - ~~~~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - } - - var b = { - foo(x: 'hi') { }, - ~~~ -!!! error TS2381: A signature with an implementation cannot use a string literal type. - a: function foo(x: 'hi', y: 'hi') { }, - ~~~ -!!! error TS2381: A signature with an implementation cannot use a string literal type. - b: (x: 'hi') => { } - ~~~~~~~~~~~~~~~~ -!!! error TS2381: A signature with an implementation cannot use a string literal type. - } - \ No newline at end of file diff --git a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures.symbols b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures.symbols new file mode 100644 index 00000000000..6f764b5c271 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures.symbols @@ -0,0 +1,66 @@ +=== tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures.ts === +// String literal types are only valid in overload signatures + +function foo(x: 'hi') { } +>foo : Symbol(foo, Decl(stringLiteralTypesInImplementationSignatures.ts, 0, 0)) +>x : Symbol(x, Decl(stringLiteralTypesInImplementationSignatures.ts, 2, 13)) + +var f = function foo(x: 'hi') { } +>f : Symbol(f, Decl(stringLiteralTypesInImplementationSignatures.ts, 3, 3)) +>foo : Symbol(foo, Decl(stringLiteralTypesInImplementationSignatures.ts, 3, 7)) +>x : Symbol(x, Decl(stringLiteralTypesInImplementationSignatures.ts, 3, 21)) + +var f2 = (x: 'hi', y: 'hi') => { } +>f2 : Symbol(f2, Decl(stringLiteralTypesInImplementationSignatures.ts, 4, 3)) +>x : Symbol(x, Decl(stringLiteralTypesInImplementationSignatures.ts, 4, 10)) +>y : Symbol(y, Decl(stringLiteralTypesInImplementationSignatures.ts, 4, 18)) + +class C { +>C : Symbol(C, Decl(stringLiteralTypesInImplementationSignatures.ts, 4, 34)) + + foo(x: 'hi') { } +>foo : Symbol(foo, Decl(stringLiteralTypesInImplementationSignatures.ts, 6, 9)) +>x : Symbol(x, Decl(stringLiteralTypesInImplementationSignatures.ts, 7, 8)) +} + +interface I { +>I : Symbol(I, Decl(stringLiteralTypesInImplementationSignatures.ts, 8, 1)) + + (x: 'hi'); +>x : Symbol(x, Decl(stringLiteralTypesInImplementationSignatures.ts, 11, 5)) + + foo(x: 'hi', y: 'hi'); +>foo : Symbol(foo, Decl(stringLiteralTypesInImplementationSignatures.ts, 11, 14)) +>x : Symbol(x, Decl(stringLiteralTypesInImplementationSignatures.ts, 12, 8)) +>y : Symbol(y, Decl(stringLiteralTypesInImplementationSignatures.ts, 12, 16)) +} + +var a: { +>a : Symbol(a, Decl(stringLiteralTypesInImplementationSignatures.ts, 15, 3)) + + (x: 'hi'); +>x : Symbol(x, Decl(stringLiteralTypesInImplementationSignatures.ts, 16, 5)) + + foo(x: 'hi'); +>foo : Symbol(foo, Decl(stringLiteralTypesInImplementationSignatures.ts, 16, 14)) +>x : Symbol(x, Decl(stringLiteralTypesInImplementationSignatures.ts, 17, 8)) +} + +var b = { +>b : Symbol(b, Decl(stringLiteralTypesInImplementationSignatures.ts, 20, 3)) + + foo(x: 'hi') { }, +>foo : Symbol(foo, Decl(stringLiteralTypesInImplementationSignatures.ts, 20, 9)) +>x : Symbol(x, Decl(stringLiteralTypesInImplementationSignatures.ts, 21, 8)) + + a: function foo(x: 'hi', y: 'hi') { }, +>a : Symbol(a, Decl(stringLiteralTypesInImplementationSignatures.ts, 21, 21)) +>foo : Symbol(foo, Decl(stringLiteralTypesInImplementationSignatures.ts, 22, 6)) +>x : Symbol(x, Decl(stringLiteralTypesInImplementationSignatures.ts, 22, 20)) +>y : Symbol(y, Decl(stringLiteralTypesInImplementationSignatures.ts, 22, 28)) + + b: (x: 'hi') => { } +>b : Symbol(b, Decl(stringLiteralTypesInImplementationSignatures.ts, 22, 42)) +>x : Symbol(x, Decl(stringLiteralTypesInImplementationSignatures.ts, 23, 8)) +} + diff --git a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures.types b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures.types new file mode 100644 index 00000000000..356d19fce3a --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures.types @@ -0,0 +1,71 @@ +=== tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures.ts === +// String literal types are only valid in overload signatures + +function foo(x: 'hi') { } +>foo : (x: "hi") => void +>x : "hi" + +var f = function foo(x: 'hi') { } +>f : (x: "hi") => void +>function foo(x: 'hi') { } : (x: "hi") => void +>foo : (x: "hi") => void +>x : "hi" + +var f2 = (x: 'hi', y: 'hi') => { } +>f2 : (x: "hi", y: "hi") => void +>(x: 'hi', y: 'hi') => { } : (x: "hi", y: "hi") => void +>x : "hi" +>y : "hi" + +class C { +>C : C + + foo(x: 'hi') { } +>foo : (x: "hi") => void +>x : "hi" +} + +interface I { +>I : I + + (x: 'hi'); +>x : "hi" + + foo(x: 'hi', y: 'hi'); +>foo : (x: "hi", y: "hi") => any +>x : "hi" +>y : "hi" +} + +var a: { +>a : { (x: "hi"): any; foo(x: "hi"): any; } + + (x: 'hi'); +>x : "hi" + + foo(x: 'hi'); +>foo : (x: "hi") => any +>x : "hi" +} + +var b = { +>b : { foo(x: "hi"): void; a: (x: "hi", y: "hi") => void; b: (x: "hi") => void; } +>{ foo(x: 'hi') { }, a: function foo(x: 'hi', y: 'hi') { }, b: (x: 'hi') => { }} : { foo(x: "hi"): void; a: (x: "hi", y: "hi") => void; b: (x: "hi") => void; } + + foo(x: 'hi') { }, +>foo : (x: "hi") => void +>x : "hi" + + a: function foo(x: 'hi', y: 'hi') { }, +>a : (x: "hi", y: "hi") => void +>function foo(x: 'hi', y: 'hi') { } : (x: "hi", y: "hi") => void +>foo : (x: "hi", y: "hi") => void +>x : "hi" +>y : "hi" + + b: (x: 'hi') => { } +>b : (x: "hi") => void +>(x: 'hi') => { } : (x: "hi") => void +>x : "hi" +} + diff --git a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.errors.txt b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.errors.txt index 4f94bad7441..b0ab5010ea5 100644 --- a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.errors.txt +++ b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.errors.txt @@ -1,74 +1,38 @@ -tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures2.ts(4,10): error TS2381: A signature with an implementation cannot use a string literal type. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures2.ts(8,5): error TS2381: A signature with an implementation cannot use a string literal type. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures2.ts(12,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures2.ts(13,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures2.ts(14,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures2.ts(15,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures2.ts(19,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures2.ts(20,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures2.ts(21,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures2.ts(22,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures2.ts(26,5): error TS2300: Duplicate identifier 'foo'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures2.ts(26,5): error TS2381: A signature with an implementation cannot use a string literal type. tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures2.ts(27,5): error TS2300: Duplicate identifier 'foo'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures2.ts(27,5): error TS2381: A signature with an implementation cannot use a string literal type. -==== tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures2.ts (14 errors) ==== +==== tests/cases/conformance/types/objectTypeLiteral/callSignatures/stringLiteralTypesInImplementationSignatures2.ts (2 errors) ==== // String literal types are only valid in overload signatures function foo(x: any); function foo(x: 'hi') { } - ~~~ -!!! error TS2381: A signature with an implementation cannot use a string literal type. class C { foo(x: string); foo(x: 'hi') { } - ~~~ -!!! error TS2381: A signature with an implementation cannot use a string literal type. } interface I { (x: 'a'); - ~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. (x: 'hi'); - ~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. foo(x: 'a', y: 'a'); - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. foo(x: 'hi', y: 'hi'); - ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. } var a: { (x: 'hi'); - ~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. (x: 'a'); - ~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. foo(x: 'hi'); - ~~~~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. foo(x: 'a'); - ~~~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. } var b = { foo(x: 'hi') { }, ~~~ !!! error TS2300: Duplicate identifier 'foo'. - ~~~ -!!! error TS2381: A signature with an implementation cannot use a string literal type. foo(x: 'a') { }, ~~~ !!! error TS2300: Duplicate identifier 'foo'. - ~~~ -!!! error TS2381: A signature with an implementation cannot use a string literal type. } \ No newline at end of file diff --git a/tests/baselines/reference/stringLiteralTypesOverloadAssignability01.errors.txt b/tests/baselines/reference/stringLiteralTypesOverloadAssignability01.errors.txt deleted file mode 100644 index 56fa60a795c..00000000000 --- a/tests/baselines/reference/stringLiteralTypesOverloadAssignability01.errors.txt +++ /dev/null @@ -1,25 +0,0 @@ -tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability01.ts(2,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability01.ts(7,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - - -==== tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability01.ts (2 errors) ==== - - function f(x: "foo"): number; - ~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - function f(x: string): number { - return 0; - } - - function g(x: "bar"): number; - ~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - function g(x: string): number { - return 0; - } - - let a = f; - let b = g; - - a = b; - b = a; \ No newline at end of file diff --git a/tests/baselines/reference/stringLiteralTypesOverloadAssignability01.symbols b/tests/baselines/reference/stringLiteralTypesOverloadAssignability01.symbols new file mode 100644 index 00000000000..0704bbfb891 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesOverloadAssignability01.symbols @@ -0,0 +1,40 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability01.ts === + +function f(x: "foo"): number; +>f : Symbol(f, Decl(stringLiteralTypesOverloadAssignability01.ts, 0, 0), Decl(stringLiteralTypesOverloadAssignability01.ts, 1, 29)) +>x : Symbol(x, Decl(stringLiteralTypesOverloadAssignability01.ts, 1, 11)) + +function f(x: string): number { +>f : Symbol(f, Decl(stringLiteralTypesOverloadAssignability01.ts, 0, 0), Decl(stringLiteralTypesOverloadAssignability01.ts, 1, 29)) +>x : Symbol(x, Decl(stringLiteralTypesOverloadAssignability01.ts, 2, 11)) + + return 0; +} + +function g(x: "bar"): number; +>g : Symbol(g, Decl(stringLiteralTypesOverloadAssignability01.ts, 4, 1), Decl(stringLiteralTypesOverloadAssignability01.ts, 6, 29)) +>x : Symbol(x, Decl(stringLiteralTypesOverloadAssignability01.ts, 6, 11)) + +function g(x: string): number { +>g : Symbol(g, Decl(stringLiteralTypesOverloadAssignability01.ts, 4, 1), Decl(stringLiteralTypesOverloadAssignability01.ts, 6, 29)) +>x : Symbol(x, Decl(stringLiteralTypesOverloadAssignability01.ts, 7, 11)) + + return 0; +} + +let a = f; +>a : Symbol(a, Decl(stringLiteralTypesOverloadAssignability01.ts, 11, 3)) +>f : Symbol(f, Decl(stringLiteralTypesOverloadAssignability01.ts, 0, 0), Decl(stringLiteralTypesOverloadAssignability01.ts, 1, 29)) + +let b = g; +>b : Symbol(b, Decl(stringLiteralTypesOverloadAssignability01.ts, 12, 3)) +>g : Symbol(g, Decl(stringLiteralTypesOverloadAssignability01.ts, 4, 1), Decl(stringLiteralTypesOverloadAssignability01.ts, 6, 29)) + +a = b; +>a : Symbol(a, Decl(stringLiteralTypesOverloadAssignability01.ts, 11, 3)) +>b : Symbol(b, Decl(stringLiteralTypesOverloadAssignability01.ts, 12, 3)) + +b = a; +>b : Symbol(b, Decl(stringLiteralTypesOverloadAssignability01.ts, 12, 3)) +>a : Symbol(a, Decl(stringLiteralTypesOverloadAssignability01.ts, 11, 3)) + diff --git a/tests/baselines/reference/stringLiteralTypesOverloadAssignability01.types b/tests/baselines/reference/stringLiteralTypesOverloadAssignability01.types new file mode 100644 index 00000000000..021c209fdb5 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesOverloadAssignability01.types @@ -0,0 +1,44 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability01.ts === + +function f(x: "foo"): number; +>f : (x: "foo") => number +>x : "foo" + +function f(x: string): number { +>f : (x: "foo") => number +>x : string + + return 0; +>0 : number +} + +function g(x: "bar"): number; +>g : (x: "bar") => number +>x : "bar" + +function g(x: string): number { +>g : (x: "bar") => number +>x : string + + return 0; +>0 : number +} + +let a = f; +>a : (x: "foo") => number +>f : (x: "foo") => number + +let b = g; +>b : (x: "bar") => number +>g : (x: "bar") => number + +a = b; +>a = b : (x: "bar") => number +>a : (x: "foo") => number +>b : (x: "bar") => number + +b = a; +>b = a : (x: "foo") => number +>b : (x: "bar") => number +>a : (x: "foo") => number + diff --git a/tests/baselines/reference/stringLiteralTypesOverloadAssignability02.errors.txt b/tests/baselines/reference/stringLiteralTypesOverloadAssignability02.errors.txt deleted file mode 100644 index 47862617afa..00000000000 --- a/tests/baselines/reference/stringLiteralTypesOverloadAssignability02.errors.txt +++ /dev/null @@ -1,31 +0,0 @@ -tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability02.ts(2,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability02.ts(3,10): error TS2381: A signature with an implementation cannot use a string literal type. -tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability02.ts(7,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability02.ts(8,10): error TS2381: A signature with an implementation cannot use a string literal type. - - -==== tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability02.ts (4 errors) ==== - - function f(x: "foo"): number; - ~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - function f(x: "foo"): number { - ~ -!!! error TS2381: A signature with an implementation cannot use a string literal type. - return 0; - } - - function g(x: "bar"): number; - ~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - function g(x: "bar"): number { - ~ -!!! error TS2381: A signature with an implementation cannot use a string literal type. - return 0; - } - - let a = f; - let b = g; - - a = b; - b = a; \ No newline at end of file diff --git a/tests/baselines/reference/stringLiteralTypesOverloadAssignability02.symbols b/tests/baselines/reference/stringLiteralTypesOverloadAssignability02.symbols new file mode 100644 index 00000000000..5554b3e8768 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesOverloadAssignability02.symbols @@ -0,0 +1,40 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability02.ts === + +function f(x: "foo"): number; +>f : Symbol(f, Decl(stringLiteralTypesOverloadAssignability02.ts, 0, 0), Decl(stringLiteralTypesOverloadAssignability02.ts, 1, 29)) +>x : Symbol(x, Decl(stringLiteralTypesOverloadAssignability02.ts, 1, 11)) + +function f(x: "foo"): number { +>f : Symbol(f, Decl(stringLiteralTypesOverloadAssignability02.ts, 0, 0), Decl(stringLiteralTypesOverloadAssignability02.ts, 1, 29)) +>x : Symbol(x, Decl(stringLiteralTypesOverloadAssignability02.ts, 2, 11)) + + return 0; +} + +function g(x: "bar"): number; +>g : Symbol(g, Decl(stringLiteralTypesOverloadAssignability02.ts, 4, 1), Decl(stringLiteralTypesOverloadAssignability02.ts, 6, 29)) +>x : Symbol(x, Decl(stringLiteralTypesOverloadAssignability02.ts, 6, 11)) + +function g(x: "bar"): number { +>g : Symbol(g, Decl(stringLiteralTypesOverloadAssignability02.ts, 4, 1), Decl(stringLiteralTypesOverloadAssignability02.ts, 6, 29)) +>x : Symbol(x, Decl(stringLiteralTypesOverloadAssignability02.ts, 7, 11)) + + return 0; +} + +let a = f; +>a : Symbol(a, Decl(stringLiteralTypesOverloadAssignability02.ts, 11, 3)) +>f : Symbol(f, Decl(stringLiteralTypesOverloadAssignability02.ts, 0, 0), Decl(stringLiteralTypesOverloadAssignability02.ts, 1, 29)) + +let b = g; +>b : Symbol(b, Decl(stringLiteralTypesOverloadAssignability02.ts, 12, 3)) +>g : Symbol(g, Decl(stringLiteralTypesOverloadAssignability02.ts, 4, 1), Decl(stringLiteralTypesOverloadAssignability02.ts, 6, 29)) + +a = b; +>a : Symbol(a, Decl(stringLiteralTypesOverloadAssignability02.ts, 11, 3)) +>b : Symbol(b, Decl(stringLiteralTypesOverloadAssignability02.ts, 12, 3)) + +b = a; +>b : Symbol(b, Decl(stringLiteralTypesOverloadAssignability02.ts, 12, 3)) +>a : Symbol(a, Decl(stringLiteralTypesOverloadAssignability02.ts, 11, 3)) + diff --git a/tests/baselines/reference/stringLiteralTypesOverloadAssignability02.types b/tests/baselines/reference/stringLiteralTypesOverloadAssignability02.types new file mode 100644 index 00000000000..5e272a38326 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesOverloadAssignability02.types @@ -0,0 +1,44 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability02.ts === + +function f(x: "foo"): number; +>f : (x: "foo") => number +>x : "foo" + +function f(x: "foo"): number { +>f : (x: "foo") => number +>x : "foo" + + return 0; +>0 : number +} + +function g(x: "bar"): number; +>g : (x: "bar") => number +>x : "bar" + +function g(x: "bar"): number { +>g : (x: "bar") => number +>x : "bar" + + return 0; +>0 : number +} + +let a = f; +>a : (x: "foo") => number +>f : (x: "foo") => number + +let b = g; +>b : (x: "bar") => number +>g : (x: "bar") => number + +a = b; +>a = b : (x: "bar") => number +>a : (x: "foo") => number +>b : (x: "bar") => number + +b = a; +>b = a : (x: "foo") => number +>b : (x: "bar") => number +>a : (x: "foo") => number + diff --git a/tests/baselines/reference/stringLiteralTypesOverloadAssignability03.errors.txt b/tests/baselines/reference/stringLiteralTypesOverloadAssignability03.errors.txt deleted file mode 100644 index 1e58fc9028f..00000000000 --- a/tests/baselines/reference/stringLiteralTypesOverloadAssignability03.errors.txt +++ /dev/null @@ -1,25 +0,0 @@ -tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability03.ts(2,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability03.ts(7,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - - -==== tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability03.ts (2 errors) ==== - - function f(x: "foo"): number; - ~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - function f(x: string): number { - return 0; - } - - function g(x: "foo"): number; - ~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - function g(x: string): number { - return 0; - } - - let a = f; - let b = g; - - a = b; - b = a; \ No newline at end of file diff --git a/tests/baselines/reference/stringLiteralTypesOverloadAssignability03.symbols b/tests/baselines/reference/stringLiteralTypesOverloadAssignability03.symbols new file mode 100644 index 00000000000..361f9e9db4d --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesOverloadAssignability03.symbols @@ -0,0 +1,40 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability03.ts === + +function f(x: "foo"): number; +>f : Symbol(f, Decl(stringLiteralTypesOverloadAssignability03.ts, 0, 0), Decl(stringLiteralTypesOverloadAssignability03.ts, 1, 29)) +>x : Symbol(x, Decl(stringLiteralTypesOverloadAssignability03.ts, 1, 11)) + +function f(x: string): number { +>f : Symbol(f, Decl(stringLiteralTypesOverloadAssignability03.ts, 0, 0), Decl(stringLiteralTypesOverloadAssignability03.ts, 1, 29)) +>x : Symbol(x, Decl(stringLiteralTypesOverloadAssignability03.ts, 2, 11)) + + return 0; +} + +function g(x: "foo"): number; +>g : Symbol(g, Decl(stringLiteralTypesOverloadAssignability03.ts, 4, 1), Decl(stringLiteralTypesOverloadAssignability03.ts, 6, 29)) +>x : Symbol(x, Decl(stringLiteralTypesOverloadAssignability03.ts, 6, 11)) + +function g(x: string): number { +>g : Symbol(g, Decl(stringLiteralTypesOverloadAssignability03.ts, 4, 1), Decl(stringLiteralTypesOverloadAssignability03.ts, 6, 29)) +>x : Symbol(x, Decl(stringLiteralTypesOverloadAssignability03.ts, 7, 11)) + + return 0; +} + +let a = f; +>a : Symbol(a, Decl(stringLiteralTypesOverloadAssignability03.ts, 11, 3)) +>f : Symbol(f, Decl(stringLiteralTypesOverloadAssignability03.ts, 0, 0), Decl(stringLiteralTypesOverloadAssignability03.ts, 1, 29)) + +let b = g; +>b : Symbol(b, Decl(stringLiteralTypesOverloadAssignability03.ts, 12, 3)) +>g : Symbol(g, Decl(stringLiteralTypesOverloadAssignability03.ts, 4, 1), Decl(stringLiteralTypesOverloadAssignability03.ts, 6, 29)) + +a = b; +>a : Symbol(a, Decl(stringLiteralTypesOverloadAssignability03.ts, 11, 3)) +>b : Symbol(b, Decl(stringLiteralTypesOverloadAssignability03.ts, 12, 3)) + +b = a; +>b : Symbol(b, Decl(stringLiteralTypesOverloadAssignability03.ts, 12, 3)) +>a : Symbol(a, Decl(stringLiteralTypesOverloadAssignability03.ts, 11, 3)) + diff --git a/tests/baselines/reference/stringLiteralTypesOverloadAssignability03.types b/tests/baselines/reference/stringLiteralTypesOverloadAssignability03.types new file mode 100644 index 00000000000..8150eedd7b8 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesOverloadAssignability03.types @@ -0,0 +1,44 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability03.ts === + +function f(x: "foo"): number; +>f : (x: "foo") => number +>x : "foo" + +function f(x: string): number { +>f : (x: "foo") => number +>x : string + + return 0; +>0 : number +} + +function g(x: "foo"): number; +>g : (x: "foo") => number +>x : "foo" + +function g(x: string): number { +>g : (x: "foo") => number +>x : string + + return 0; +>0 : number +} + +let a = f; +>a : (x: "foo") => number +>f : (x: "foo") => number + +let b = g; +>b : (x: "foo") => number +>g : (x: "foo") => number + +a = b; +>a = b : (x: "foo") => number +>a : (x: "foo") => number +>b : (x: "foo") => number + +b = a; +>b = a : (x: "foo") => number +>b : (x: "foo") => number +>a : (x: "foo") => number + diff --git a/tests/baselines/reference/stringLiteralTypesOverloadAssignability04.errors.txt b/tests/baselines/reference/stringLiteralTypesOverloadAssignability04.errors.txt deleted file mode 100644 index 1b179b95fe6..00000000000 --- a/tests/baselines/reference/stringLiteralTypesOverloadAssignability04.errors.txt +++ /dev/null @@ -1,31 +0,0 @@ -tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability04.ts(2,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability04.ts(3,10): error TS2381: A signature with an implementation cannot use a string literal type. -tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability04.ts(7,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability04.ts(8,10): error TS2381: A signature with an implementation cannot use a string literal type. - - -==== tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability04.ts (4 errors) ==== - - function f(x: "foo"): number; - ~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - function f(x: "foo"): number { - ~ -!!! error TS2381: A signature with an implementation cannot use a string literal type. - return 0; - } - - function g(x: "foo"): number; - ~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - function g(x: "foo"): number { - ~ -!!! error TS2381: A signature with an implementation cannot use a string literal type. - return 0; - } - - let a = f; - let b = g; - - a = b; - b = a; \ No newline at end of file diff --git a/tests/baselines/reference/stringLiteralTypesOverloadAssignability04.symbols b/tests/baselines/reference/stringLiteralTypesOverloadAssignability04.symbols new file mode 100644 index 00000000000..75f7d12c25f --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesOverloadAssignability04.symbols @@ -0,0 +1,40 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability04.ts === + +function f(x: "foo"): number; +>f : Symbol(f, Decl(stringLiteralTypesOverloadAssignability04.ts, 0, 0), Decl(stringLiteralTypesOverloadAssignability04.ts, 1, 29)) +>x : Symbol(x, Decl(stringLiteralTypesOverloadAssignability04.ts, 1, 11)) + +function f(x: "foo"): number { +>f : Symbol(f, Decl(stringLiteralTypesOverloadAssignability04.ts, 0, 0), Decl(stringLiteralTypesOverloadAssignability04.ts, 1, 29)) +>x : Symbol(x, Decl(stringLiteralTypesOverloadAssignability04.ts, 2, 11)) + + return 0; +} + +function g(x: "foo"): number; +>g : Symbol(g, Decl(stringLiteralTypesOverloadAssignability04.ts, 4, 1), Decl(stringLiteralTypesOverloadAssignability04.ts, 6, 29)) +>x : Symbol(x, Decl(stringLiteralTypesOverloadAssignability04.ts, 6, 11)) + +function g(x: "foo"): number { +>g : Symbol(g, Decl(stringLiteralTypesOverloadAssignability04.ts, 4, 1), Decl(stringLiteralTypesOverloadAssignability04.ts, 6, 29)) +>x : Symbol(x, Decl(stringLiteralTypesOverloadAssignability04.ts, 7, 11)) + + return 0; +} + +let a = f; +>a : Symbol(a, Decl(stringLiteralTypesOverloadAssignability04.ts, 11, 3)) +>f : Symbol(f, Decl(stringLiteralTypesOverloadAssignability04.ts, 0, 0), Decl(stringLiteralTypesOverloadAssignability04.ts, 1, 29)) + +let b = g; +>b : Symbol(b, Decl(stringLiteralTypesOverloadAssignability04.ts, 12, 3)) +>g : Symbol(g, Decl(stringLiteralTypesOverloadAssignability04.ts, 4, 1), Decl(stringLiteralTypesOverloadAssignability04.ts, 6, 29)) + +a = b; +>a : Symbol(a, Decl(stringLiteralTypesOverloadAssignability04.ts, 11, 3)) +>b : Symbol(b, Decl(stringLiteralTypesOverloadAssignability04.ts, 12, 3)) + +b = a; +>b : Symbol(b, Decl(stringLiteralTypesOverloadAssignability04.ts, 12, 3)) +>a : Symbol(a, Decl(stringLiteralTypesOverloadAssignability04.ts, 11, 3)) + diff --git a/tests/baselines/reference/stringLiteralTypesOverloadAssignability04.types b/tests/baselines/reference/stringLiteralTypesOverloadAssignability04.types new file mode 100644 index 00000000000..7187e276fe4 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesOverloadAssignability04.types @@ -0,0 +1,44 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability04.ts === + +function f(x: "foo"): number; +>f : (x: "foo") => number +>x : "foo" + +function f(x: "foo"): number { +>f : (x: "foo") => number +>x : "foo" + + return 0; +>0 : number +} + +function g(x: "foo"): number; +>g : (x: "foo") => number +>x : "foo" + +function g(x: "foo"): number { +>g : (x: "foo") => number +>x : "foo" + + return 0; +>0 : number +} + +let a = f; +>a : (x: "foo") => number +>f : (x: "foo") => number + +let b = g; +>b : (x: "foo") => number +>g : (x: "foo") => number + +a = b; +>a = b : (x: "foo") => number +>a : (x: "foo") => number +>b : (x: "foo") => number + +b = a; +>b = a : (x: "foo") => number +>b : (x: "foo") => number +>a : (x: "foo") => number + diff --git a/tests/baselines/reference/stringLiteralTypesOverloadAssignability05.errors.txt b/tests/baselines/reference/stringLiteralTypesOverloadAssignability05.errors.txt index 0830f08fb80..b08f98564f8 100644 --- a/tests/baselines/reference/stringLiteralTypesOverloadAssignability05.errors.txt +++ b/tests/baselines/reference/stringLiteralTypesOverloadAssignability05.errors.txt @@ -1,9 +1,8 @@ -tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability05.ts(8,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability05.ts(16,1): error TS2322: Type '(x: "foo") => number' is not assignable to type '{ (x: "foo"): number; (x: string): number; }'. Type '(x: "foo") => number' provides no match for the signature '(x: string): number' -==== tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability05.ts (2 errors) ==== +==== tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability05.ts (1 errors) ==== function f(x: "foo"): number; function f(x: string): number; @@ -12,8 +11,6 @@ tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignabil } function g(x: "foo"): number; - ~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function g(x: string): number { return 0; } diff --git a/tests/baselines/reference/stringLiteralTypesTypePredicates01.errors.txt b/tests/baselines/reference/stringLiteralTypesTypePredicates01.errors.txt deleted file mode 100644 index b888c3ca77e..00000000000 --- a/tests/baselines/reference/stringLiteralTypesTypePredicates01.errors.txt +++ /dev/null @@ -1,33 +0,0 @@ -tests/cases/conformance/types/stringLiteral/stringLiteralTypesTypePredicates01.ts(4,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/types/stringLiteral/stringLiteralTypesTypePredicates01.ts(5,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - - -==== tests/cases/conformance/types/stringLiteral/stringLiteralTypesTypePredicates01.ts (2 errors) ==== - - type Kind = "A" | "B" - - function kindIs(kind: Kind, is: "A"): kind is "A"; - ~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - function kindIs(kind: Kind, is: "B"): kind is "B"; - ~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. - function kindIs(kind: Kind, is: Kind): boolean { - return kind === is; - } - - var x: Kind = "A"; - - if (kindIs(x, "A")) { - let a = x; - } - else { - let b = x; - } - - if (!kindIs(x, "B")) { - let c = x; - } - else { - let d = x; - } \ No newline at end of file diff --git a/tests/baselines/reference/stringLiteralTypesTypePredicates01.symbols b/tests/baselines/reference/stringLiteralTypesTypePredicates01.symbols new file mode 100644 index 00000000000..6b18cab7432 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesTypePredicates01.symbols @@ -0,0 +1,62 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesTypePredicates01.ts === + +type Kind = "A" | "B" +>Kind : Symbol(Kind, Decl(stringLiteralTypesTypePredicates01.ts, 0, 0)) + +function kindIs(kind: Kind, is: "A"): kind is "A"; +>kindIs : Symbol(kindIs, Decl(stringLiteralTypesTypePredicates01.ts, 1, 21), Decl(stringLiteralTypesTypePredicates01.ts, 3, 50), Decl(stringLiteralTypesTypePredicates01.ts, 4, 50)) +>kind : Symbol(kind, Decl(stringLiteralTypesTypePredicates01.ts, 3, 16)) +>Kind : Symbol(Kind, Decl(stringLiteralTypesTypePredicates01.ts, 0, 0)) +>is : Symbol(is, Decl(stringLiteralTypesTypePredicates01.ts, 3, 27)) +>kind : Symbol(kind, Decl(stringLiteralTypesTypePredicates01.ts, 3, 16)) + +function kindIs(kind: Kind, is: "B"): kind is "B"; +>kindIs : Symbol(kindIs, Decl(stringLiteralTypesTypePredicates01.ts, 1, 21), Decl(stringLiteralTypesTypePredicates01.ts, 3, 50), Decl(stringLiteralTypesTypePredicates01.ts, 4, 50)) +>kind : Symbol(kind, Decl(stringLiteralTypesTypePredicates01.ts, 4, 16)) +>Kind : Symbol(Kind, Decl(stringLiteralTypesTypePredicates01.ts, 0, 0)) +>is : Symbol(is, Decl(stringLiteralTypesTypePredicates01.ts, 4, 27)) +>kind : Symbol(kind, Decl(stringLiteralTypesTypePredicates01.ts, 4, 16)) + +function kindIs(kind: Kind, is: Kind): boolean { +>kindIs : Symbol(kindIs, Decl(stringLiteralTypesTypePredicates01.ts, 1, 21), Decl(stringLiteralTypesTypePredicates01.ts, 3, 50), Decl(stringLiteralTypesTypePredicates01.ts, 4, 50)) +>kind : Symbol(kind, Decl(stringLiteralTypesTypePredicates01.ts, 5, 16)) +>Kind : Symbol(Kind, Decl(stringLiteralTypesTypePredicates01.ts, 0, 0)) +>is : Symbol(is, Decl(stringLiteralTypesTypePredicates01.ts, 5, 27)) +>Kind : Symbol(Kind, Decl(stringLiteralTypesTypePredicates01.ts, 0, 0)) + + return kind === is; +>kind : Symbol(kind, Decl(stringLiteralTypesTypePredicates01.ts, 5, 16)) +>is : Symbol(is, Decl(stringLiteralTypesTypePredicates01.ts, 5, 27)) +} + +var x: Kind = "A"; +>x : Symbol(x, Decl(stringLiteralTypesTypePredicates01.ts, 9, 3)) +>Kind : Symbol(Kind, Decl(stringLiteralTypesTypePredicates01.ts, 0, 0)) + +if (kindIs(x, "A")) { +>kindIs : Symbol(kindIs, Decl(stringLiteralTypesTypePredicates01.ts, 1, 21), Decl(stringLiteralTypesTypePredicates01.ts, 3, 50), Decl(stringLiteralTypesTypePredicates01.ts, 4, 50)) +>x : Symbol(x, Decl(stringLiteralTypesTypePredicates01.ts, 9, 3)) + + let a = x; +>a : Symbol(a, Decl(stringLiteralTypesTypePredicates01.ts, 12, 7)) +>x : Symbol(x, Decl(stringLiteralTypesTypePredicates01.ts, 9, 3)) +} +else { + let b = x; +>b : Symbol(b, Decl(stringLiteralTypesTypePredicates01.ts, 15, 7)) +>x : Symbol(x, Decl(stringLiteralTypesTypePredicates01.ts, 9, 3)) +} + +if (!kindIs(x, "B")) { +>kindIs : Symbol(kindIs, Decl(stringLiteralTypesTypePredicates01.ts, 1, 21), Decl(stringLiteralTypesTypePredicates01.ts, 3, 50), Decl(stringLiteralTypesTypePredicates01.ts, 4, 50)) +>x : Symbol(x, Decl(stringLiteralTypesTypePredicates01.ts, 9, 3)) + + let c = x; +>c : Symbol(c, Decl(stringLiteralTypesTypePredicates01.ts, 19, 7)) +>x : Symbol(x, Decl(stringLiteralTypesTypePredicates01.ts, 9, 3)) +} +else { + let d = x; +>d : Symbol(d, Decl(stringLiteralTypesTypePredicates01.ts, 22, 7)) +>x : Symbol(x, Decl(stringLiteralTypesTypePredicates01.ts, 9, 3)) +} diff --git a/tests/baselines/reference/stringLiteralTypesTypePredicates01.types b/tests/baselines/reference/stringLiteralTypesTypePredicates01.types new file mode 100644 index 00000000000..43c8271b76b --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesTypePredicates01.types @@ -0,0 +1,69 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesTypePredicates01.ts === + +type Kind = "A" | "B" +>Kind : "A" | "B" + +function kindIs(kind: Kind, is: "A"): kind is "A"; +>kindIs : { (kind: "A" | "B", is: "A"): kind is "A"; (kind: "A" | "B", is: "B"): kind is "B"; } +>kind : "A" | "B" +>Kind : "A" | "B" +>is : "A" +>kind : any + +function kindIs(kind: Kind, is: "B"): kind is "B"; +>kindIs : { (kind: "A" | "B", is: "A"): kind is "A"; (kind: "A" | "B", is: "B"): kind is "B"; } +>kind : "A" | "B" +>Kind : "A" | "B" +>is : "B" +>kind : any + +function kindIs(kind: Kind, is: Kind): boolean { +>kindIs : { (kind: "A" | "B", is: "A"): kind is "A"; (kind: "A" | "B", is: "B"): kind is "B"; } +>kind : "A" | "B" +>Kind : "A" | "B" +>is : "A" | "B" +>Kind : "A" | "B" + + return kind === is; +>kind === is : boolean +>kind : "A" | "B" +>is : "A" | "B" +} + +var x: Kind = "A"; +>x : "A" | "B" +>Kind : "A" | "B" +>"A" : "A" + +if (kindIs(x, "A")) { +>kindIs(x, "A") : kind is "A" +>kindIs : { (kind: "A" | "B", is: "A"): kind is "A"; (kind: "A" | "B", is: "B"): kind is "B"; } +>x : "A" | "B" +>"A" : "A" + + let a = x; +>a : "A" +>x : "A" +} +else { + let b = x; +>b : "B" +>x : "B" +} + +if (!kindIs(x, "B")) { +>!kindIs(x, "B") : boolean +>kindIs(x, "B") : kind is "B" +>kindIs : { (kind: "A" | "B", is: "A"): kind is "A"; (kind: "A" | "B", is: "B"): kind is "B"; } +>x : "A" | "B" +>"B" : "B" + + let c = x; +>c : "A" +>x : "A" +} +else { + let d = x; +>d : "B" +>x : "B" +} diff --git a/tests/baselines/reference/typeArgumentsWithStringLiteralTypes01.errors.txt b/tests/baselines/reference/typeArgumentsWithStringLiteralTypes01.errors.txt index 49f17e7891d..ef582ab9b26 100644 --- a/tests/baselines/reference/typeArgumentsWithStringLiteralTypes01.errors.txt +++ b/tests/baselines/reference/typeArgumentsWithStringLiteralTypes01.errors.txt @@ -1,4 +1,3 @@ -tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(4,18): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(37,25): error TS2345: Argument of type 'string' is not assignable to parameter of type '"Hello"'. tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(38,25): error TS2345: Argument of type 'string' is not assignable to parameter of type '"Hello"'. tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts(39,25): error TS2345: Argument of type 'string' is not assignable to parameter of type '"Hello"'. @@ -36,13 +35,11 @@ tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes0 Type '"World"' is not assignable to type '"Hello"'. -==== tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts (25 errors) ==== +==== tests/cases/conformance/types/stringLiteral/typeArgumentsWithStringLiteralTypes01.ts (24 errors) ==== declare function randBool(): boolean; declare function takeReturnString(str: string): string; declare function takeReturnHello(str: "Hello"): "Hello"; - ~~~~~~~~~~~~~~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. declare function takeReturnHelloWorld(str: "Hello" | "World"): "Hello" | "World"; function fun1(x: T, y: T) { From 4ec234aa93d329df484177e0046e56c5fa8eb0b4 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 28 Dec 2015 15:38:34 -0500 Subject: [PATCH 026/160] Don't skip over specialized signatures when checking for assignability. --- src/compiler/checker.ts | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 16e957f35b5..9aaf0b93f31 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -5568,29 +5568,25 @@ namespace ts { const saveErrorInfo = errorInfo; outer: for (const t of targetSignatures) { - if (!t.hasStringLiterals || target.flags & TypeFlags.FromSignature) { - // Only elaborate errors from the first failure - let shouldElaborateErrors = reportErrors; - for (const s of sourceSignatures) { - if (!s.hasStringLiterals || source.flags & TypeFlags.FromSignature) { - const related = signatureRelatedTo(s, t, shouldElaborateErrors); - if (related) { - result &= related; - errorInfo = saveErrorInfo; - continue outer; - } - shouldElaborateErrors = false; - } + // Only elaborate errors from the first failure + let shouldElaborateErrors = reportErrors; + for (const s of sourceSignatures) { + const related = signatureRelatedTo(s, t, shouldElaborateErrors); + if (related) { + result &= related; + errorInfo = saveErrorInfo; + continue outer; } - // don't elaborate the primitive apparent types (like Number) - // because the actual primitives will have already been reported. - if (shouldElaborateErrors && !isPrimitiveApparentType(source)) { - reportError(Diagnostics.Type_0_provides_no_match_for_the_signature_1, - typeToString(source), - signatureToString(t, /*enclosingDeclaration*/ undefined, /*flags*/ undefined, kind)); - } - return Ternary.False; + shouldElaborateErrors = false; } + // don't elaborate the primitive apparent types (like Number) + // because the actual primitives will have already been reported. + if (shouldElaborateErrors && !isPrimitiveApparentType(source)) { + reportError(Diagnostics.Type_0_provides_no_match_for_the_signature_1, + typeToString(source), + signatureToString(t, /*enclosingDeclaration*/ undefined, /*flags*/ undefined, kind)); + } + return Ternary.False; } return result; } From c8b459f32c98c8c68f27235e6cf6b9c02ed2f724 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 28 Dec 2015 15:39:46 -0500 Subject: [PATCH 027/160] Accepted baselines. --- ...overloadOnConstAsTypeAnnotation.errors.txt | 5 +- .../overloadOnConstInheritance2.errors.txt | 6 +- .../overloadOnConstInheritance3.errors.txt | 21 ---- .../overloadOnConstInheritance3.symbols | 22 +++++ .../overloadOnConstInheritance3.types | 22 +++++ ...loadOnConstNoAnyImplementation2.errors.txt | 18 +++- ...dOnConstNoStringImplementation2.errors.txt | 37 +++++++ ...loadOnConstNoStringImplementation2.symbols | 73 -------------- ...erloadOnConstNoStringImplementation2.types | 97 ------------------- ...ralTypesOverloadAssignability01.errors.txt | 33 +++++++ ...iteralTypesOverloadAssignability01.symbols | 40 -------- ...gLiteralTypesOverloadAssignability01.types | 44 --------- ...ralTypesOverloadAssignability02.errors.txt | 33 +++++++ ...iteralTypesOverloadAssignability02.symbols | 40 -------- ...gLiteralTypesOverloadAssignability02.types | 44 --------- ...ralTypesOverloadAssignability05.errors.txt | 25 ----- ...iteralTypesOverloadAssignability05.symbols | 44 +++++++++ ...gLiteralTypesOverloadAssignability05.types | 48 +++++++++ 18 files changed, 263 insertions(+), 389 deletions(-) delete mode 100644 tests/baselines/reference/overloadOnConstInheritance3.errors.txt create mode 100644 tests/baselines/reference/overloadOnConstInheritance3.symbols create mode 100644 tests/baselines/reference/overloadOnConstInheritance3.types create mode 100644 tests/baselines/reference/overloadOnConstNoStringImplementation2.errors.txt delete mode 100644 tests/baselines/reference/overloadOnConstNoStringImplementation2.symbols delete mode 100644 tests/baselines/reference/overloadOnConstNoStringImplementation2.types create mode 100644 tests/baselines/reference/stringLiteralTypesOverloadAssignability01.errors.txt delete mode 100644 tests/baselines/reference/stringLiteralTypesOverloadAssignability01.symbols delete mode 100644 tests/baselines/reference/stringLiteralTypesOverloadAssignability01.types create mode 100644 tests/baselines/reference/stringLiteralTypesOverloadAssignability02.errors.txt delete mode 100644 tests/baselines/reference/stringLiteralTypesOverloadAssignability02.symbols delete mode 100644 tests/baselines/reference/stringLiteralTypesOverloadAssignability02.types delete mode 100644 tests/baselines/reference/stringLiteralTypesOverloadAssignability05.errors.txt create mode 100644 tests/baselines/reference/stringLiteralTypesOverloadAssignability05.symbols create mode 100644 tests/baselines/reference/stringLiteralTypesOverloadAssignability05.types diff --git a/tests/baselines/reference/overloadOnConstAsTypeAnnotation.errors.txt b/tests/baselines/reference/overloadOnConstAsTypeAnnotation.errors.txt index 45f61055ede..7c651707eeb 100644 --- a/tests/baselines/reference/overloadOnConstAsTypeAnnotation.errors.txt +++ b/tests/baselines/reference/overloadOnConstAsTypeAnnotation.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/overloadOnConstAsTypeAnnotation.ts(2,5): error TS2322: Type 'string' is not assignable to type '(x: "hi") => number'. tests/cases/compiler/overloadOnConstAsTypeAnnotation.ts(2,37): error TS1005: ';' expected. -==== tests/cases/compiler/overloadOnConstAsTypeAnnotation.ts (1 errors) ==== +==== tests/cases/compiler/overloadOnConstAsTypeAnnotation.ts (2 errors) ==== var f: (x: 'hi') => number = ('hi') => { return 1; }; + ~ +!!! error TS2322: Type 'string' is not assignable to type '(x: "hi") => number'. ~~ !!! error TS1005: ';' expected. \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstInheritance2.errors.txt b/tests/baselines/reference/overloadOnConstInheritance2.errors.txt index 5d3930a4e45..3e25a825d1a 100644 --- a/tests/baselines/reference/overloadOnConstInheritance2.errors.txt +++ b/tests/baselines/reference/overloadOnConstInheritance2.errors.txt @@ -1,7 +1,8 @@ tests/cases/compiler/overloadOnConstInheritance2.ts(5,11): error TS2430: Interface 'Deriver' incorrectly extends interface 'Base'. Types of property 'addEventListener' are incompatible. Type '(x: "bar") => string' is not assignable to type '{ (x: string): any; (x: "foo"): string; }'. - Type '(x: "bar") => string' provides no match for the signature '(x: string): any' + Types of parameters 'x' and 'x' are incompatible. + Type '"bar"' is not assignable to type '"foo"'. ==== tests/cases/compiler/overloadOnConstInheritance2.ts (1 errors) ==== @@ -14,7 +15,8 @@ tests/cases/compiler/overloadOnConstInheritance2.ts(5,11): error TS2430: Interfa !!! error TS2430: Interface 'Deriver' incorrectly extends interface 'Base'. !!! error TS2430: Types of property 'addEventListener' are incompatible. !!! error TS2430: Type '(x: "bar") => string' is not assignable to type '{ (x: string): any; (x: "foo"): string; }'. -!!! error TS2430: Type '(x: "bar") => string' provides no match for the signature '(x: string): any' +!!! error TS2430: Types of parameters 'x' and 'x' are incompatible. +!!! error TS2430: Type '"bar"' is not assignable to type '"foo"'. addEventListener(x: 'bar'): string; // shouldn't need to redeclare the string overload } \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstInheritance3.errors.txt b/tests/baselines/reference/overloadOnConstInheritance3.errors.txt deleted file mode 100644 index bedff91fc27..00000000000 --- a/tests/baselines/reference/overloadOnConstInheritance3.errors.txt +++ /dev/null @@ -1,21 +0,0 @@ -tests/cases/compiler/overloadOnConstInheritance3.ts(4,11): error TS2430: Interface 'Deriver' incorrectly extends interface 'Base'. - Types of property 'addEventListener' are incompatible. - Type '{ (x: "bar"): string; (x: "foo"): string; }' is not assignable to type '(x: string) => any'. - Type '{ (x: "bar"): string; (x: "foo"): string; }' provides no match for the signature '(x: string): any' - - -==== tests/cases/compiler/overloadOnConstInheritance3.ts (1 errors) ==== - interface Base { - addEventListener(x: string): any; - } - interface Deriver extends Base { - ~~~~~~~ -!!! error TS2430: Interface 'Deriver' incorrectly extends interface 'Base'. -!!! error TS2430: Types of property 'addEventListener' are incompatible. -!!! error TS2430: Type '{ (x: "bar"): string; (x: "foo"): string; }' is not assignable to type '(x: string) => any'. -!!! error TS2430: Type '{ (x: "bar"): string; (x: "foo"): string; }' provides no match for the signature '(x: string): any' - // shouldn't need to redeclare the string overload - addEventListener(x: 'bar'): string; - addEventListener(x: 'foo'): string; - } - \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstInheritance3.symbols b/tests/baselines/reference/overloadOnConstInheritance3.symbols new file mode 100644 index 00000000000..32d07b19285 --- /dev/null +++ b/tests/baselines/reference/overloadOnConstInheritance3.symbols @@ -0,0 +1,22 @@ +=== tests/cases/compiler/overloadOnConstInheritance3.ts === +interface Base { +>Base : Symbol(Base, Decl(overloadOnConstInheritance3.ts, 0, 0)) + + addEventListener(x: string): any; +>addEventListener : Symbol(addEventListener, Decl(overloadOnConstInheritance3.ts, 0, 16)) +>x : Symbol(x, Decl(overloadOnConstInheritance3.ts, 1, 21)) +} +interface Deriver extends Base { +>Deriver : Symbol(Deriver, Decl(overloadOnConstInheritance3.ts, 2, 1)) +>Base : Symbol(Base, Decl(overloadOnConstInheritance3.ts, 0, 0)) + + // shouldn't need to redeclare the string overload + addEventListener(x: 'bar'): string; +>addEventListener : Symbol(addEventListener, Decl(overloadOnConstInheritance3.ts, 3, 32), Decl(overloadOnConstInheritance3.ts, 5, 39)) +>x : Symbol(x, Decl(overloadOnConstInheritance3.ts, 5, 21)) + + addEventListener(x: 'foo'): string; +>addEventListener : Symbol(addEventListener, Decl(overloadOnConstInheritance3.ts, 3, 32), Decl(overloadOnConstInheritance3.ts, 5, 39)) +>x : Symbol(x, Decl(overloadOnConstInheritance3.ts, 6, 21)) +} + diff --git a/tests/baselines/reference/overloadOnConstInheritance3.types b/tests/baselines/reference/overloadOnConstInheritance3.types new file mode 100644 index 00000000000..bd8d4ba1917 --- /dev/null +++ b/tests/baselines/reference/overloadOnConstInheritance3.types @@ -0,0 +1,22 @@ +=== tests/cases/compiler/overloadOnConstInheritance3.ts === +interface Base { +>Base : Base + + addEventListener(x: string): any; +>addEventListener : (x: string) => any +>x : string +} +interface Deriver extends Base { +>Deriver : Deriver +>Base : Base + + // shouldn't need to redeclare the string overload + addEventListener(x: 'bar'): string; +>addEventListener : { (x: "bar"): string; (x: "foo"): string; } +>x : "bar" + + addEventListener(x: 'foo'): string; +>addEventListener : { (x: "bar"): string; (x: "foo"): string; } +>x : "foo" +} + diff --git a/tests/baselines/reference/overloadOnConstNoAnyImplementation2.errors.txt b/tests/baselines/reference/overloadOnConstNoAnyImplementation2.errors.txt index a9d4092f6d3..bfd888c9912 100644 --- a/tests/baselines/reference/overloadOnConstNoAnyImplementation2.errors.txt +++ b/tests/baselines/reference/overloadOnConstNoAnyImplementation2.errors.txt @@ -1,7 +1,13 @@ tests/cases/compiler/overloadOnConstNoAnyImplementation2.ts(12,18): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. +tests/cases/compiler/overloadOnConstNoAnyImplementation2.ts(18,9): error TS2345: Argument of type '(x: "bye") => number' is not assignable to parameter of type '(x: "hi") => number'. + Types of parameters 'x' and 'x' are incompatible. + Type '"bye"' is not assignable to type '"hi"'. +tests/cases/compiler/overloadOnConstNoAnyImplementation2.ts(21,9): error TS2345: Argument of type '(x: number) => number' is not assignable to parameter of type '(x: "hi") => number'. + Types of parameters 'x' and 'x' are incompatible. + Type 'number' is not assignable to type '"hi"'. -==== tests/cases/compiler/overloadOnConstNoAnyImplementation2.ts (1 errors) ==== +==== tests/cases/compiler/overloadOnConstNoAnyImplementation2.ts (3 errors) ==== interface I { x1(a: number, callback: (x: 'hi') => number); } @@ -22,6 +28,14 @@ tests/cases/compiler/overloadOnConstNoAnyImplementation2.ts(12,18): error TS2345 var c: C; c.x1(1, (x: 'hi') => { return 1; } ); c.x1(1, (x: 'bye') => { return 1; } ); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2345: Argument of type '(x: "bye") => number' is not assignable to parameter of type '(x: "hi") => number'. +!!! error TS2345: Types of parameters 'x' and 'x' are incompatible. +!!! error TS2345: Type '"bye"' is not assignable to type '"hi"'. c.x1(1, (x) => { return 1; } ); - c.x1(1, (x: number) => { return 1; } ); \ No newline at end of file + c.x1(1, (x: number) => { return 1; } ); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2345: Argument of type '(x: number) => number' is not assignable to parameter of type '(x: "hi") => number'. +!!! error TS2345: Types of parameters 'x' and 'x' are incompatible. +!!! error TS2345: Type 'number' is not assignable to type '"hi"'. \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstNoStringImplementation2.errors.txt b/tests/baselines/reference/overloadOnConstNoStringImplementation2.errors.txt new file mode 100644 index 00000000000..fddfa04eef7 --- /dev/null +++ b/tests/baselines/reference/overloadOnConstNoStringImplementation2.errors.txt @@ -0,0 +1,37 @@ +tests/cases/compiler/overloadOnConstNoStringImplementation2.ts(18,9): error TS2345: Argument of type '(x: "bye") => number' is not assignable to parameter of type '(x: "hi") => number'. + Types of parameters 'x' and 'x' are incompatible. + Type '"bye"' is not assignable to type '"hi"'. +tests/cases/compiler/overloadOnConstNoStringImplementation2.ts(20,9): error TS2345: Argument of type '(x: number) => number' is not assignable to parameter of type '(x: "hi") => number'. + Types of parameters 'x' and 'x' are incompatible. + Type 'number' is not assignable to type '"hi"'. + + +==== tests/cases/compiler/overloadOnConstNoStringImplementation2.ts (2 errors) ==== + interface I { + x1(a: number, callback: (x: 'hi') => number); + } + + class C implements I { + x1(a: number, callback: (x: 'hi') => number); + x1(a: number, callback: (x: any) => number) { + callback('hi'); + callback('bye'); + var hm = "hm"; + callback(hm); + callback(1); + } + } + + var c: C; + c.x1(1, (x: 'hi') => { return 1; } ); + c.x1(1, (x: 'bye') => { return 1; } ); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2345: Argument of type '(x: "bye") => number' is not assignable to parameter of type '(x: "hi") => number'. +!!! error TS2345: Types of parameters 'x' and 'x' are incompatible. +!!! error TS2345: Type '"bye"' is not assignable to type '"hi"'. + c.x1(1, (x: string) => { return 1; } ); + c.x1(1, (x: number) => { return 1; } ); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2345: Argument of type '(x: number) => number' is not assignable to parameter of type '(x: "hi") => number'. +!!! error TS2345: Types of parameters 'x' and 'x' are incompatible. +!!! error TS2345: Type 'number' is not assignable to type '"hi"'. \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstNoStringImplementation2.symbols b/tests/baselines/reference/overloadOnConstNoStringImplementation2.symbols deleted file mode 100644 index 8629708d187..00000000000 --- a/tests/baselines/reference/overloadOnConstNoStringImplementation2.symbols +++ /dev/null @@ -1,73 +0,0 @@ -=== tests/cases/compiler/overloadOnConstNoStringImplementation2.ts === -interface I { ->I : Symbol(I, Decl(overloadOnConstNoStringImplementation2.ts, 0, 0)) - - x1(a: number, callback: (x: 'hi') => number); ->x1 : Symbol(x1, Decl(overloadOnConstNoStringImplementation2.ts, 0, 13)) ->a : Symbol(a, Decl(overloadOnConstNoStringImplementation2.ts, 1, 7)) ->callback : Symbol(callback, Decl(overloadOnConstNoStringImplementation2.ts, 1, 17)) ->x : Symbol(x, Decl(overloadOnConstNoStringImplementation2.ts, 1, 29)) -} - -class C implements I { ->C : Symbol(C, Decl(overloadOnConstNoStringImplementation2.ts, 2, 1)) ->I : Symbol(I, Decl(overloadOnConstNoStringImplementation2.ts, 0, 0)) - - x1(a: number, callback: (x: 'hi') => number); ->x1 : Symbol(x1, Decl(overloadOnConstNoStringImplementation2.ts, 4, 22), Decl(overloadOnConstNoStringImplementation2.ts, 5, 49)) ->a : Symbol(a, Decl(overloadOnConstNoStringImplementation2.ts, 5, 7)) ->callback : Symbol(callback, Decl(overloadOnConstNoStringImplementation2.ts, 5, 17)) ->x : Symbol(x, Decl(overloadOnConstNoStringImplementation2.ts, 5, 29)) - - x1(a: number, callback: (x: any) => number) { ->x1 : Symbol(x1, Decl(overloadOnConstNoStringImplementation2.ts, 4, 22), Decl(overloadOnConstNoStringImplementation2.ts, 5, 49)) ->a : Symbol(a, Decl(overloadOnConstNoStringImplementation2.ts, 6, 7)) ->callback : Symbol(callback, Decl(overloadOnConstNoStringImplementation2.ts, 6, 17)) ->x : Symbol(x, Decl(overloadOnConstNoStringImplementation2.ts, 6, 29)) - - callback('hi'); ->callback : Symbol(callback, Decl(overloadOnConstNoStringImplementation2.ts, 6, 17)) - - callback('bye'); ->callback : Symbol(callback, Decl(overloadOnConstNoStringImplementation2.ts, 6, 17)) - - var hm = "hm"; ->hm : Symbol(hm, Decl(overloadOnConstNoStringImplementation2.ts, 9, 11)) - - callback(hm); ->callback : Symbol(callback, Decl(overloadOnConstNoStringImplementation2.ts, 6, 17)) ->hm : Symbol(hm, Decl(overloadOnConstNoStringImplementation2.ts, 9, 11)) - - callback(1); ->callback : Symbol(callback, Decl(overloadOnConstNoStringImplementation2.ts, 6, 17)) - } -} - -var c: C; ->c : Symbol(c, Decl(overloadOnConstNoStringImplementation2.ts, 15, 3)) ->C : Symbol(C, Decl(overloadOnConstNoStringImplementation2.ts, 2, 1)) - -c.x1(1, (x: 'hi') => { return 1; } ); ->c.x1 : Symbol(C.x1, Decl(overloadOnConstNoStringImplementation2.ts, 4, 22), Decl(overloadOnConstNoStringImplementation2.ts, 5, 49)) ->c : Symbol(c, Decl(overloadOnConstNoStringImplementation2.ts, 15, 3)) ->x1 : Symbol(C.x1, Decl(overloadOnConstNoStringImplementation2.ts, 4, 22), Decl(overloadOnConstNoStringImplementation2.ts, 5, 49)) ->x : Symbol(x, Decl(overloadOnConstNoStringImplementation2.ts, 16, 9)) - -c.x1(1, (x: 'bye') => { return 1; } ); ->c.x1 : Symbol(C.x1, Decl(overloadOnConstNoStringImplementation2.ts, 4, 22), Decl(overloadOnConstNoStringImplementation2.ts, 5, 49)) ->c : Symbol(c, Decl(overloadOnConstNoStringImplementation2.ts, 15, 3)) ->x1 : Symbol(C.x1, Decl(overloadOnConstNoStringImplementation2.ts, 4, 22), Decl(overloadOnConstNoStringImplementation2.ts, 5, 49)) ->x : Symbol(x, Decl(overloadOnConstNoStringImplementation2.ts, 17, 9)) - -c.x1(1, (x: string) => { return 1; } ); ->c.x1 : Symbol(C.x1, Decl(overloadOnConstNoStringImplementation2.ts, 4, 22), Decl(overloadOnConstNoStringImplementation2.ts, 5, 49)) ->c : Symbol(c, Decl(overloadOnConstNoStringImplementation2.ts, 15, 3)) ->x1 : Symbol(C.x1, Decl(overloadOnConstNoStringImplementation2.ts, 4, 22), Decl(overloadOnConstNoStringImplementation2.ts, 5, 49)) ->x : Symbol(x, Decl(overloadOnConstNoStringImplementation2.ts, 18, 9)) - -c.x1(1, (x: number) => { return 1; } ); ->c.x1 : Symbol(C.x1, Decl(overloadOnConstNoStringImplementation2.ts, 4, 22), Decl(overloadOnConstNoStringImplementation2.ts, 5, 49)) ->c : Symbol(c, Decl(overloadOnConstNoStringImplementation2.ts, 15, 3)) ->x1 : Symbol(C.x1, Decl(overloadOnConstNoStringImplementation2.ts, 4, 22), Decl(overloadOnConstNoStringImplementation2.ts, 5, 49)) ->x : Symbol(x, Decl(overloadOnConstNoStringImplementation2.ts, 19, 9)) - diff --git a/tests/baselines/reference/overloadOnConstNoStringImplementation2.types b/tests/baselines/reference/overloadOnConstNoStringImplementation2.types deleted file mode 100644 index 40521db3f89..00000000000 --- a/tests/baselines/reference/overloadOnConstNoStringImplementation2.types +++ /dev/null @@ -1,97 +0,0 @@ -=== tests/cases/compiler/overloadOnConstNoStringImplementation2.ts === -interface I { ->I : I - - x1(a: number, callback: (x: 'hi') => number); ->x1 : (a: number, callback: (x: "hi") => number) => any ->a : number ->callback : (x: "hi") => number ->x : "hi" -} - -class C implements I { ->C : C ->I : I - - x1(a: number, callback: (x: 'hi') => number); ->x1 : (a: number, callback: (x: "hi") => number) => any ->a : number ->callback : (x: "hi") => number ->x : "hi" - - x1(a: number, callback: (x: any) => number) { ->x1 : (a: number, callback: (x: "hi") => number) => any ->a : number ->callback : (x: any) => number ->x : any - - callback('hi'); ->callback('hi') : number ->callback : (x: any) => number ->'hi' : string - - callback('bye'); ->callback('bye') : number ->callback : (x: any) => number ->'bye' : string - - var hm = "hm"; ->hm : string ->"hm" : string - - callback(hm); ->callback(hm) : number ->callback : (x: any) => number ->hm : string - - callback(1); ->callback(1) : number ->callback : (x: any) => number ->1 : number - } -} - -var c: C; ->c : C ->C : C - -c.x1(1, (x: 'hi') => { return 1; } ); ->c.x1(1, (x: 'hi') => { return 1; } ) : any ->c.x1 : (a: number, callback: (x: "hi") => number) => any ->c : C ->x1 : (a: number, callback: (x: "hi") => number) => any ->1 : number ->(x: 'hi') => { return 1; } : (x: "hi") => number ->x : "hi" ->1 : number - -c.x1(1, (x: 'bye') => { return 1; } ); ->c.x1(1, (x: 'bye') => { return 1; } ) : any ->c.x1 : (a: number, callback: (x: "hi") => number) => any ->c : C ->x1 : (a: number, callback: (x: "hi") => number) => any ->1 : number ->(x: 'bye') => { return 1; } : (x: "bye") => number ->x : "bye" ->1 : number - -c.x1(1, (x: string) => { return 1; } ); ->c.x1(1, (x: string) => { return 1; } ) : any ->c.x1 : (a: number, callback: (x: "hi") => number) => any ->c : C ->x1 : (a: number, callback: (x: "hi") => number) => any ->1 : number ->(x: string) => { return 1; } : (x: string) => number ->x : string ->1 : number - -c.x1(1, (x: number) => { return 1; } ); ->c.x1(1, (x: number) => { return 1; } ) : any ->c.x1 : (a: number, callback: (x: "hi") => number) => any ->c : C ->x1 : (a: number, callback: (x: "hi") => number) => any ->1 : number ->(x: number) => { return 1; } : (x: number) => number ->x : number ->1 : number - diff --git a/tests/baselines/reference/stringLiteralTypesOverloadAssignability01.errors.txt b/tests/baselines/reference/stringLiteralTypesOverloadAssignability01.errors.txt new file mode 100644 index 00000000000..4c66c2000f9 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesOverloadAssignability01.errors.txt @@ -0,0 +1,33 @@ +tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability01.ts(15,1): error TS2322: Type '(x: "bar") => number' is not assignable to type '(x: "foo") => number'. + Types of parameters 'x' and 'x' are incompatible. + Type '"bar"' is not assignable to type '"foo"'. +tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability01.ts(16,1): error TS2322: Type '(x: "foo") => number' is not assignable to type '(x: "bar") => number'. + Types of parameters 'x' and 'x' are incompatible. + Type '"foo"' is not assignable to type '"bar"'. + + +==== tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability01.ts (2 errors) ==== + + function f(x: "foo"): number; + function f(x: string): number { + return 0; + } + + function g(x: "bar"): number; + function g(x: string): number { + return 0; + } + + let a = f; + let b = g; + + a = b; + ~ +!!! error TS2322: Type '(x: "bar") => number' is not assignable to type '(x: "foo") => number'. +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible. +!!! error TS2322: Type '"bar"' is not assignable to type '"foo"'. + b = a; + ~ +!!! error TS2322: Type '(x: "foo") => number' is not assignable to type '(x: "bar") => number'. +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible. +!!! error TS2322: Type '"foo"' is not assignable to type '"bar"'. \ No newline at end of file diff --git a/tests/baselines/reference/stringLiteralTypesOverloadAssignability01.symbols b/tests/baselines/reference/stringLiteralTypesOverloadAssignability01.symbols deleted file mode 100644 index 0704bbfb891..00000000000 --- a/tests/baselines/reference/stringLiteralTypesOverloadAssignability01.symbols +++ /dev/null @@ -1,40 +0,0 @@ -=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability01.ts === - -function f(x: "foo"): number; ->f : Symbol(f, Decl(stringLiteralTypesOverloadAssignability01.ts, 0, 0), Decl(stringLiteralTypesOverloadAssignability01.ts, 1, 29)) ->x : Symbol(x, Decl(stringLiteralTypesOverloadAssignability01.ts, 1, 11)) - -function f(x: string): number { ->f : Symbol(f, Decl(stringLiteralTypesOverloadAssignability01.ts, 0, 0), Decl(stringLiteralTypesOverloadAssignability01.ts, 1, 29)) ->x : Symbol(x, Decl(stringLiteralTypesOverloadAssignability01.ts, 2, 11)) - - return 0; -} - -function g(x: "bar"): number; ->g : Symbol(g, Decl(stringLiteralTypesOverloadAssignability01.ts, 4, 1), Decl(stringLiteralTypesOverloadAssignability01.ts, 6, 29)) ->x : Symbol(x, Decl(stringLiteralTypesOverloadAssignability01.ts, 6, 11)) - -function g(x: string): number { ->g : Symbol(g, Decl(stringLiteralTypesOverloadAssignability01.ts, 4, 1), Decl(stringLiteralTypesOverloadAssignability01.ts, 6, 29)) ->x : Symbol(x, Decl(stringLiteralTypesOverloadAssignability01.ts, 7, 11)) - - return 0; -} - -let a = f; ->a : Symbol(a, Decl(stringLiteralTypesOverloadAssignability01.ts, 11, 3)) ->f : Symbol(f, Decl(stringLiteralTypesOverloadAssignability01.ts, 0, 0), Decl(stringLiteralTypesOverloadAssignability01.ts, 1, 29)) - -let b = g; ->b : Symbol(b, Decl(stringLiteralTypesOverloadAssignability01.ts, 12, 3)) ->g : Symbol(g, Decl(stringLiteralTypesOverloadAssignability01.ts, 4, 1), Decl(stringLiteralTypesOverloadAssignability01.ts, 6, 29)) - -a = b; ->a : Symbol(a, Decl(stringLiteralTypesOverloadAssignability01.ts, 11, 3)) ->b : Symbol(b, Decl(stringLiteralTypesOverloadAssignability01.ts, 12, 3)) - -b = a; ->b : Symbol(b, Decl(stringLiteralTypesOverloadAssignability01.ts, 12, 3)) ->a : Symbol(a, Decl(stringLiteralTypesOverloadAssignability01.ts, 11, 3)) - diff --git a/tests/baselines/reference/stringLiteralTypesOverloadAssignability01.types b/tests/baselines/reference/stringLiteralTypesOverloadAssignability01.types deleted file mode 100644 index 021c209fdb5..00000000000 --- a/tests/baselines/reference/stringLiteralTypesOverloadAssignability01.types +++ /dev/null @@ -1,44 +0,0 @@ -=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability01.ts === - -function f(x: "foo"): number; ->f : (x: "foo") => number ->x : "foo" - -function f(x: string): number { ->f : (x: "foo") => number ->x : string - - return 0; ->0 : number -} - -function g(x: "bar"): number; ->g : (x: "bar") => number ->x : "bar" - -function g(x: string): number { ->g : (x: "bar") => number ->x : string - - return 0; ->0 : number -} - -let a = f; ->a : (x: "foo") => number ->f : (x: "foo") => number - -let b = g; ->b : (x: "bar") => number ->g : (x: "bar") => number - -a = b; ->a = b : (x: "bar") => number ->a : (x: "foo") => number ->b : (x: "bar") => number - -b = a; ->b = a : (x: "foo") => number ->b : (x: "bar") => number ->a : (x: "foo") => number - diff --git a/tests/baselines/reference/stringLiteralTypesOverloadAssignability02.errors.txt b/tests/baselines/reference/stringLiteralTypesOverloadAssignability02.errors.txt new file mode 100644 index 00000000000..952fd7aae86 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesOverloadAssignability02.errors.txt @@ -0,0 +1,33 @@ +tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability02.ts(15,1): error TS2322: Type '(x: "bar") => number' is not assignable to type '(x: "foo") => number'. + Types of parameters 'x' and 'x' are incompatible. + Type '"bar"' is not assignable to type '"foo"'. +tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability02.ts(16,1): error TS2322: Type '(x: "foo") => number' is not assignable to type '(x: "bar") => number'. + Types of parameters 'x' and 'x' are incompatible. + Type '"foo"' is not assignable to type '"bar"'. + + +==== tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability02.ts (2 errors) ==== + + function f(x: "foo"): number; + function f(x: "foo"): number { + return 0; + } + + function g(x: "bar"): number; + function g(x: "bar"): number { + return 0; + } + + let a = f; + let b = g; + + a = b; + ~ +!!! error TS2322: Type '(x: "bar") => number' is not assignable to type '(x: "foo") => number'. +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible. +!!! error TS2322: Type '"bar"' is not assignable to type '"foo"'. + b = a; + ~ +!!! error TS2322: Type '(x: "foo") => number' is not assignable to type '(x: "bar") => number'. +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible. +!!! error TS2322: Type '"foo"' is not assignable to type '"bar"'. \ No newline at end of file diff --git a/tests/baselines/reference/stringLiteralTypesOverloadAssignability02.symbols b/tests/baselines/reference/stringLiteralTypesOverloadAssignability02.symbols deleted file mode 100644 index 5554b3e8768..00000000000 --- a/tests/baselines/reference/stringLiteralTypesOverloadAssignability02.symbols +++ /dev/null @@ -1,40 +0,0 @@ -=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability02.ts === - -function f(x: "foo"): number; ->f : Symbol(f, Decl(stringLiteralTypesOverloadAssignability02.ts, 0, 0), Decl(stringLiteralTypesOverloadAssignability02.ts, 1, 29)) ->x : Symbol(x, Decl(stringLiteralTypesOverloadAssignability02.ts, 1, 11)) - -function f(x: "foo"): number { ->f : Symbol(f, Decl(stringLiteralTypesOverloadAssignability02.ts, 0, 0), Decl(stringLiteralTypesOverloadAssignability02.ts, 1, 29)) ->x : Symbol(x, Decl(stringLiteralTypesOverloadAssignability02.ts, 2, 11)) - - return 0; -} - -function g(x: "bar"): number; ->g : Symbol(g, Decl(stringLiteralTypesOverloadAssignability02.ts, 4, 1), Decl(stringLiteralTypesOverloadAssignability02.ts, 6, 29)) ->x : Symbol(x, Decl(stringLiteralTypesOverloadAssignability02.ts, 6, 11)) - -function g(x: "bar"): number { ->g : Symbol(g, Decl(stringLiteralTypesOverloadAssignability02.ts, 4, 1), Decl(stringLiteralTypesOverloadAssignability02.ts, 6, 29)) ->x : Symbol(x, Decl(stringLiteralTypesOverloadAssignability02.ts, 7, 11)) - - return 0; -} - -let a = f; ->a : Symbol(a, Decl(stringLiteralTypesOverloadAssignability02.ts, 11, 3)) ->f : Symbol(f, Decl(stringLiteralTypesOverloadAssignability02.ts, 0, 0), Decl(stringLiteralTypesOverloadAssignability02.ts, 1, 29)) - -let b = g; ->b : Symbol(b, Decl(stringLiteralTypesOverloadAssignability02.ts, 12, 3)) ->g : Symbol(g, Decl(stringLiteralTypesOverloadAssignability02.ts, 4, 1), Decl(stringLiteralTypesOverloadAssignability02.ts, 6, 29)) - -a = b; ->a : Symbol(a, Decl(stringLiteralTypesOverloadAssignability02.ts, 11, 3)) ->b : Symbol(b, Decl(stringLiteralTypesOverloadAssignability02.ts, 12, 3)) - -b = a; ->b : Symbol(b, Decl(stringLiteralTypesOverloadAssignability02.ts, 12, 3)) ->a : Symbol(a, Decl(stringLiteralTypesOverloadAssignability02.ts, 11, 3)) - diff --git a/tests/baselines/reference/stringLiteralTypesOverloadAssignability02.types b/tests/baselines/reference/stringLiteralTypesOverloadAssignability02.types deleted file mode 100644 index 5e272a38326..00000000000 --- a/tests/baselines/reference/stringLiteralTypesOverloadAssignability02.types +++ /dev/null @@ -1,44 +0,0 @@ -=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability02.ts === - -function f(x: "foo"): number; ->f : (x: "foo") => number ->x : "foo" - -function f(x: "foo"): number { ->f : (x: "foo") => number ->x : "foo" - - return 0; ->0 : number -} - -function g(x: "bar"): number; ->g : (x: "bar") => number ->x : "bar" - -function g(x: "bar"): number { ->g : (x: "bar") => number ->x : "bar" - - return 0; ->0 : number -} - -let a = f; ->a : (x: "foo") => number ->f : (x: "foo") => number - -let b = g; ->b : (x: "bar") => number ->g : (x: "bar") => number - -a = b; ->a = b : (x: "bar") => number ->a : (x: "foo") => number ->b : (x: "bar") => number - -b = a; ->b = a : (x: "foo") => number ->b : (x: "bar") => number ->a : (x: "foo") => number - diff --git a/tests/baselines/reference/stringLiteralTypesOverloadAssignability05.errors.txt b/tests/baselines/reference/stringLiteralTypesOverloadAssignability05.errors.txt deleted file mode 100644 index b08f98564f8..00000000000 --- a/tests/baselines/reference/stringLiteralTypesOverloadAssignability05.errors.txt +++ /dev/null @@ -1,25 +0,0 @@ -tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability05.ts(16,1): error TS2322: Type '(x: "foo") => number' is not assignable to type '{ (x: "foo"): number; (x: string): number; }'. - Type '(x: "foo") => number' provides no match for the signature '(x: string): number' - - -==== tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability05.ts (1 errors) ==== - - function f(x: "foo"): number; - function f(x: string): number; - function f(x: string): number { - return 0; - } - - function g(x: "foo"): number; - function g(x: string): number { - return 0; - } - - let a = f; - let b = g; - - a = b; - ~ -!!! error TS2322: Type '(x: "foo") => number' is not assignable to type '{ (x: "foo"): number; (x: string): number; }'. -!!! error TS2322: Type '(x: "foo") => number' provides no match for the signature '(x: string): number' - b = a; \ No newline at end of file diff --git a/tests/baselines/reference/stringLiteralTypesOverloadAssignability05.symbols b/tests/baselines/reference/stringLiteralTypesOverloadAssignability05.symbols new file mode 100644 index 00000000000..9a59a7c929a --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesOverloadAssignability05.symbols @@ -0,0 +1,44 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability05.ts === + +function f(x: "foo"): number; +>f : Symbol(f, Decl(stringLiteralTypesOverloadAssignability05.ts, 0, 0), Decl(stringLiteralTypesOverloadAssignability05.ts, 1, 29), Decl(stringLiteralTypesOverloadAssignability05.ts, 2, 30)) +>x : Symbol(x, Decl(stringLiteralTypesOverloadAssignability05.ts, 1, 11)) + +function f(x: string): number; +>f : Symbol(f, Decl(stringLiteralTypesOverloadAssignability05.ts, 0, 0), Decl(stringLiteralTypesOverloadAssignability05.ts, 1, 29), Decl(stringLiteralTypesOverloadAssignability05.ts, 2, 30)) +>x : Symbol(x, Decl(stringLiteralTypesOverloadAssignability05.ts, 2, 11)) + +function f(x: string): number { +>f : Symbol(f, Decl(stringLiteralTypesOverloadAssignability05.ts, 0, 0), Decl(stringLiteralTypesOverloadAssignability05.ts, 1, 29), Decl(stringLiteralTypesOverloadAssignability05.ts, 2, 30)) +>x : Symbol(x, Decl(stringLiteralTypesOverloadAssignability05.ts, 3, 11)) + + return 0; +} + +function g(x: "foo"): number; +>g : Symbol(g, Decl(stringLiteralTypesOverloadAssignability05.ts, 5, 1), Decl(stringLiteralTypesOverloadAssignability05.ts, 7, 29)) +>x : Symbol(x, Decl(stringLiteralTypesOverloadAssignability05.ts, 7, 11)) + +function g(x: string): number { +>g : Symbol(g, Decl(stringLiteralTypesOverloadAssignability05.ts, 5, 1), Decl(stringLiteralTypesOverloadAssignability05.ts, 7, 29)) +>x : Symbol(x, Decl(stringLiteralTypesOverloadAssignability05.ts, 8, 11)) + + return 0; +} + +let a = f; +>a : Symbol(a, Decl(stringLiteralTypesOverloadAssignability05.ts, 12, 3)) +>f : Symbol(f, Decl(stringLiteralTypesOverloadAssignability05.ts, 0, 0), Decl(stringLiteralTypesOverloadAssignability05.ts, 1, 29), Decl(stringLiteralTypesOverloadAssignability05.ts, 2, 30)) + +let b = g; +>b : Symbol(b, Decl(stringLiteralTypesOverloadAssignability05.ts, 13, 3)) +>g : Symbol(g, Decl(stringLiteralTypesOverloadAssignability05.ts, 5, 1), Decl(stringLiteralTypesOverloadAssignability05.ts, 7, 29)) + +a = b; +>a : Symbol(a, Decl(stringLiteralTypesOverloadAssignability05.ts, 12, 3)) +>b : Symbol(b, Decl(stringLiteralTypesOverloadAssignability05.ts, 13, 3)) + +b = a; +>b : Symbol(b, Decl(stringLiteralTypesOverloadAssignability05.ts, 13, 3)) +>a : Symbol(a, Decl(stringLiteralTypesOverloadAssignability05.ts, 12, 3)) + diff --git a/tests/baselines/reference/stringLiteralTypesOverloadAssignability05.types b/tests/baselines/reference/stringLiteralTypesOverloadAssignability05.types new file mode 100644 index 00000000000..b7dd9262a67 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesOverloadAssignability05.types @@ -0,0 +1,48 @@ +=== tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloadAssignability05.ts === + +function f(x: "foo"): number; +>f : { (x: "foo"): number; (x: string): number; } +>x : "foo" + +function f(x: string): number; +>f : { (x: "foo"): number; (x: string): number; } +>x : string + +function f(x: string): number { +>f : { (x: "foo"): number; (x: string): number; } +>x : string + + return 0; +>0 : number +} + +function g(x: "foo"): number; +>g : (x: "foo") => number +>x : "foo" + +function g(x: string): number { +>g : (x: "foo") => number +>x : string + + return 0; +>0 : number +} + +let a = f; +>a : { (x: "foo"): number; (x: string): number; } +>f : { (x: "foo"): number; (x: string): number; } + +let b = g; +>b : (x: "foo") => number +>g : (x: "foo") => number + +a = b; +>a = b : (x: "foo") => number +>a : { (x: "foo"): number; (x: string): number; } +>b : (x: "foo") => number + +b = a; +>b = a : { (x: "foo"): number; (x: string): number; } +>b : (x: "foo") => number +>a : { (x: "foo"): number; (x: string): number; } + From 5f9983a6983487b469783f59cd6be5ccc2840817 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 28 Dec 2015 15:42:56 -0500 Subject: [PATCH 028/160] Updated tests. --- tests/cases/compiler/overloadOnConstAsTypeAnnotation.ts | 2 +- ...pecializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/cases/compiler/overloadOnConstAsTypeAnnotation.ts b/tests/cases/compiler/overloadOnConstAsTypeAnnotation.ts index 12b99fb29ce..4188d6919a7 100644 --- a/tests/cases/compiler/overloadOnConstAsTypeAnnotation.ts +++ b/tests/cases/compiler/overloadOnConstAsTypeAnnotation.ts @@ -1,3 +1,3 @@ // @allowUnreachableCode: true -var f: (x: 'hi') => number = ('hi') => { return 1; }; \ No newline at end of file +var f: (x: 'hi') => number = (x: 'hi') => { return 1; }; \ No newline at end of file diff --git a/tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts b/tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts index 46bb0ea2c81..01f33fbd7bb 100644 --- a/tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts +++ b/tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts @@ -1,5 +1,4 @@ -// Specialized signatures must be a subtype of a non-specialized signature -// All the below should be errors +// @declaration: true function foo(x: 'a'); function foo(x: number) { } From decec4db657e72b2c2a2be2c7692cd1e265427a8 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 28 Dec 2015 15:56:44 -0500 Subject: [PATCH 029/160] Accepted baselines. --- ...overloadOnConstAsTypeAnnotation.errors.txt | 11 ---- .../overloadOnConstAsTypeAnnotation.js | 8 +-- .../overloadOnConstAsTypeAnnotation.symbols | 7 +++ .../overloadOnConstAsTypeAnnotation.types | 9 +++ ...ubtypeOfNonSpecializedSignature.errors.txt | 4 +- ...reIsNotSubtypeOfNonSpecializedSignature.js | 56 +++++++++++++++++-- 6 files changed, 71 insertions(+), 24 deletions(-) delete mode 100644 tests/baselines/reference/overloadOnConstAsTypeAnnotation.errors.txt create mode 100644 tests/baselines/reference/overloadOnConstAsTypeAnnotation.symbols create mode 100644 tests/baselines/reference/overloadOnConstAsTypeAnnotation.types diff --git a/tests/baselines/reference/overloadOnConstAsTypeAnnotation.errors.txt b/tests/baselines/reference/overloadOnConstAsTypeAnnotation.errors.txt deleted file mode 100644 index 7c651707eeb..00000000000 --- a/tests/baselines/reference/overloadOnConstAsTypeAnnotation.errors.txt +++ /dev/null @@ -1,11 +0,0 @@ -tests/cases/compiler/overloadOnConstAsTypeAnnotation.ts(2,5): error TS2322: Type 'string' is not assignable to type '(x: "hi") => number'. -tests/cases/compiler/overloadOnConstAsTypeAnnotation.ts(2,37): error TS1005: ';' expected. - - -==== tests/cases/compiler/overloadOnConstAsTypeAnnotation.ts (2 errors) ==== - - var f: (x: 'hi') => number = ('hi') => { return 1; }; - ~ -!!! error TS2322: Type 'string' is not assignable to type '(x: "hi") => number'. - ~~ -!!! error TS1005: ';' expected. \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstAsTypeAnnotation.js b/tests/baselines/reference/overloadOnConstAsTypeAnnotation.js index aa5c8701f28..94250b48cbc 100644 --- a/tests/baselines/reference/overloadOnConstAsTypeAnnotation.js +++ b/tests/baselines/reference/overloadOnConstAsTypeAnnotation.js @@ -1,10 +1,6 @@ //// [overloadOnConstAsTypeAnnotation.ts] -var f: (x: 'hi') => number = ('hi') => { return 1; }; +var f: (x: 'hi') => number = (x: 'hi') => { return 1; }; //// [overloadOnConstAsTypeAnnotation.js] -var f = ('hi'); -{ - return 1; -} -; +var f = function (x) { return 1; }; diff --git a/tests/baselines/reference/overloadOnConstAsTypeAnnotation.symbols b/tests/baselines/reference/overloadOnConstAsTypeAnnotation.symbols new file mode 100644 index 00000000000..c420e50cda2 --- /dev/null +++ b/tests/baselines/reference/overloadOnConstAsTypeAnnotation.symbols @@ -0,0 +1,7 @@ +=== tests/cases/compiler/overloadOnConstAsTypeAnnotation.ts === + +var f: (x: 'hi') => number = (x: 'hi') => { return 1; }; +>f : Symbol(f, Decl(overloadOnConstAsTypeAnnotation.ts, 1, 3)) +>x : Symbol(x, Decl(overloadOnConstAsTypeAnnotation.ts, 1, 8)) +>x : Symbol(x, Decl(overloadOnConstAsTypeAnnotation.ts, 1, 30)) + diff --git a/tests/baselines/reference/overloadOnConstAsTypeAnnotation.types b/tests/baselines/reference/overloadOnConstAsTypeAnnotation.types new file mode 100644 index 00000000000..10a185708d4 --- /dev/null +++ b/tests/baselines/reference/overloadOnConstAsTypeAnnotation.types @@ -0,0 +1,9 @@ +=== tests/cases/compiler/overloadOnConstAsTypeAnnotation.ts === + +var f: (x: 'hi') => number = (x: 'hi') => { return 1; }; +>f : (x: "hi") => number +>x : "hi" +>(x: 'hi') => { return 1; } : (x: "hi") => number +>x : "hi" +>1 : number + diff --git a/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.errors.txt b/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.errors.txt index d698193d02b..73318e782a3 100644 --- a/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.errors.txt +++ b/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.errors.txt @@ -1,9 +1,7 @@ -tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts(4,10): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts(2,10): error TS2394: Overload signature is not compatible with function implementation. ==== tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts (1 errors) ==== - // Specialized signatures must be a subtype of a non-specialized signature - // All the below should be errors function foo(x: 'a'); ~~~ diff --git a/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.js b/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.js index f2946cbeab8..bb2dab55957 100644 --- a/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.js +++ b/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.js @@ -1,6 +1,4 @@ //// [specializedSignatureIsNotSubtypeOfNonSpecializedSignature.ts] -// Specialized signatures must be a subtype of a non-specialized signature -// All the below should be errors function foo(x: 'a'); function foo(x: number) { } @@ -67,8 +65,6 @@ var a3: { //// [specializedSignatureIsNotSubtypeOfNonSpecializedSignature.js] -// Specialized signatures must be a subtype of a non-specialized signature -// All the below should be errors function foo(x) { } var C = (function () { function C() { @@ -91,3 +87,55 @@ var C3 = (function () { var a; var a2; var a3; + + +//// [specializedSignatureIsNotSubtypeOfNonSpecializedSignature.d.ts] +declare function foo(x: 'a'): any; +declare class C { + foo(x: 'a'): any; + foo(x: number): any; +} +declare class C2 { + foo(x: 'a'): any; + foo(x: T): any; +} +declare class C3 { + foo(x: 'a'): any; + foo(x: T): any; +} +interface I { + (x: 'a'): any; + (x: number): any; + foo(x: 'a'): any; + foo(x: number): any; +} +interface I2 { + (x: 'a'): any; + (x: T): any; + foo(x: 'a'): any; + foo(x: T): any; +} +interface I3 { + (x: 'a'): any; + (x: T): any; + foo(x: 'a'): any; + foo(x: T): any; +} +declare var a: { + (x: 'a'); + (x: number); + foo(x: 'a'); + foo(x: number); +}; +declare var a2: { + (x: 'a'); + (x: T); + foo(x: 'a'); + foo(x: T); +}; +declare var a3: { + (x: 'a'); + (x: T); + foo(x: 'a'); + foo(x: T); +}; From d9d5e3a28331899106c6698d86041fb41dd503c8 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 28 Dec 2015 16:16:02 -0500 Subject: [PATCH 030/160] Added test from #6278. --- .../stringLiteral/stringLiteralTypesOverloads05.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads05.ts diff --git a/tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads05.ts b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads05.ts new file mode 100644 index 00000000000..182155790a6 --- /dev/null +++ b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads05.ts @@ -0,0 +1,13 @@ +// @declaration: true + +interface Animal { animal: {} }; +interface Dog extends Animal { dog: {} } +interface Cat extends Animal { cat: {} } +interface Moose extends Animal { moose: {} } + +function doThing(x: "dog"): Dog; +function doThing(x: "cat"): Cat; +function doThing(x: string): Animal; +function doThing(x: string, y?: string): Moose { + return undefined; +} \ No newline at end of file From cee7eb10ed87a27b868c7fbc84752c6a8c3e7374 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 28 Dec 2015 16:20:34 -0500 Subject: [PATCH 031/160] Accepted baselines. --- .../stringLiteralTypesOverloads05.errors.txt | 18 +++++++++ .../stringLiteralTypesOverloads05.js | 37 +++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 tests/baselines/reference/stringLiteralTypesOverloads05.errors.txt create mode 100644 tests/baselines/reference/stringLiteralTypesOverloads05.js diff --git a/tests/baselines/reference/stringLiteralTypesOverloads05.errors.txt b/tests/baselines/reference/stringLiteralTypesOverloads05.errors.txt new file mode 100644 index 00000000000..e57327ab0e0 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesOverloads05.errors.txt @@ -0,0 +1,18 @@ +tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads05.ts(7,10): error TS2394: Overload signature is not compatible with function implementation. + + +==== tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads05.ts (1 errors) ==== + + interface Animal { animal: {} }; + interface Dog extends Animal { dog: {} } + interface Cat extends Animal { cat: {} } + interface Moose extends Animal { moose: {} } + + function doThing(x: "dog"): Dog; + ~~~~~~~ +!!! error TS2394: Overload signature is not compatible with function implementation. + function doThing(x: "cat"): Cat; + function doThing(x: string): Animal; + function doThing(x: string, y?: string): Moose { + return undefined; + } \ No newline at end of file diff --git a/tests/baselines/reference/stringLiteralTypesOverloads05.js b/tests/baselines/reference/stringLiteralTypesOverloads05.js new file mode 100644 index 00000000000..23be3dac1e1 --- /dev/null +++ b/tests/baselines/reference/stringLiteralTypesOverloads05.js @@ -0,0 +1,37 @@ +//// [stringLiteralTypesOverloads05.ts] + +interface Animal { animal: {} }; +interface Dog extends Animal { dog: {} } +interface Cat extends Animal { cat: {} } +interface Moose extends Animal { moose: {} } + +function doThing(x: "dog"): Dog; +function doThing(x: "cat"): Cat; +function doThing(x: string): Animal; +function doThing(x: string, y?: string): Moose { + return undefined; +} + +//// [stringLiteralTypesOverloads05.js] +; +function doThing(x, y) { + return undefined; +} + + +//// [stringLiteralTypesOverloads05.d.ts] +interface Animal { + animal: {}; +} +interface Dog extends Animal { + dog: {}; +} +interface Cat extends Animal { + cat: {}; +} +interface Moose extends Animal { + moose: {}; +} +declare function doThing(x: "dog"): Dog; +declare function doThing(x: "cat"): Cat; +declare function doThing(x: string): Animal; From 36a82c70b1ffad912c612c1fb0c9e4272ea18c9a Mon Sep 17 00:00:00 2001 From: Kanchalai Tanglertsampan Date: Sun, 10 Jan 2016 18:01:40 -0800 Subject: [PATCH 032/160] Address PR --- src/compiler/utilities.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 6b924c1099e..bee0a3eca48 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -232,8 +232,8 @@ namespace ts { // Add an extra underscore to identifiers that start with two underscores to avoid issues with magic names like '__proto__' export function escapeIdentifier(identifier: string): string { - const prefixWithUnderscore = identifier.length > 2 && identifier.charCodeAt(0) === CharacterCodes._ && identifier.charCodeAt(1) === CharacterCodes._; - return prefixWithUnderscore ? "_" + identifier : identifier; + const prefixedWithUnderscores = identifier.length >= 3 && identifier.charCodeAt(0) === CharacterCodes._ && identifier.charCodeAt(1) === CharacterCodes._; + return prefixedWithUnderscores ? "_" + identifier : identifier; } // Remove extra underscore from escaped identifier From b46efc9b55c6aaf4dc5f46934ecf2e6d15998e92 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Wed, 13 Jan 2016 18:34:38 -0800 Subject: [PATCH 033/160] Allow modifies on type members + introduce "readonly" modifier --- src/compiler/checker.ts | 41 ++++++++-- src/compiler/diagnosticMessages.json | 12 ++- src/compiler/parser.ts | 111 +++++++++++---------------- src/compiler/program.ts | 1 + src/compiler/scanner.ts | 1 + src/compiler/types.ts | 33 ++++---- src/compiler/utilities.ts | 2 + 7 files changed, 107 insertions(+), 94 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index e73bbea8fae..c73b6309f16 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -15675,9 +15675,17 @@ namespace ts { return; } - let lastStatic: Node, lastPrivate: Node, lastProtected: Node, lastDeclare: Node, lastAsync: Node; + let lastStatic: Node, lastPrivate: Node, lastProtected: Node, lastDeclare: Node, lastAsync: Node, lastReadonly: Node; let flags = 0; for (const modifier of node.modifiers) { + if (modifier.kind !== SyntaxKind.ReadonlyKeyword) { + if (node.kind === SyntaxKind.PropertySignature || node.kind === SyntaxKind.MethodSignature) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_type_member, tokenToString(modifier.kind)); + } + if (node.kind === SyntaxKind.IndexSignature) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_index_signature, tokenToString(modifier.kind)); + } + } switch (modifier.kind) { case SyntaxKind.ConstKeyword: if (node.kind !== SyntaxKind.EnumDeclaration && node.parent.kind === SyntaxKind.ClassDeclaration) { @@ -15706,6 +15714,9 @@ namespace ts { else if (flags & NodeFlags.Static) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "static"); } + else if (flags & NodeFlags.Readonly) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "readonly"); + } else if (flags & NodeFlags.Async) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "async"); } @@ -15727,6 +15738,9 @@ namespace ts { if (flags & NodeFlags.Static) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "static"); } + else if (flags & NodeFlags.Readonly) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "readonly"); + } else if (flags & NodeFlags.Async) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "async"); } @@ -15743,6 +15757,20 @@ namespace ts { lastStatic = modifier; break; + case SyntaxKind.ReadonlyKeyword: + if (flags & NodeFlags.Readonly) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "readonly"); + } + else if (flags & NodeFlags.Async) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "readonly", "async"); + } + else if (node.parent.kind === SyntaxKind.ModuleBlock || node.parent.kind === SyntaxKind.SourceFile) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_element, "readonly"); + } + flags |= NodeFlags.Readonly; + lastReadonly = modifier; + break; + case SyntaxKind.ExportKeyword: if (flags & NodeFlags.Export) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "export"); @@ -15839,6 +15867,9 @@ namespace ts { else if (flags & NodeFlags.Async) { return grammarErrorOnNode(lastAsync, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "async"); } + else if (flags & NodeFlags.Readonly) { + return grammarErrorOnNode(lastReadonly, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "readonly"); + } return; } else if ((node.kind === SyntaxKind.ImportDeclaration || node.kind === SyntaxKind.ImportEqualsDeclaration) && flags & NodeFlags.Ambient) { @@ -15984,15 +16015,9 @@ namespace ts { } } - function checkGrammarForIndexSignatureModifier(node: SignatureDeclaration): void { - if (node.flags & NodeFlags.Modifier) { - grammarErrorOnFirstToken(node, Diagnostics.Modifiers_not_permitted_on_index_signature_members); - } - } - function checkGrammarIndexSignature(node: SignatureDeclaration) { // Prevent cascading error by short-circuit - return checkGrammarDecorators(node) || checkGrammarModifiers(node) || checkGrammarIndexSignatureParameters(node) || checkGrammarForIndexSignatureModifier(node); + return checkGrammarDecorators(node) || checkGrammarModifiers(node) || checkGrammarIndexSignatureParameters(node); } function checkGrammarForAtLeastOneTypeArgument(node: Node, typeArguments: NodeArray): boolean { diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 760da6058c1..a10787764d9 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -203,6 +203,14 @@ "category": "Error", "code": 1068 }, + "'{0}' modifier cannot appear on a type member.": { + "category": "Error", + "code": 1070 + }, + "'{0}' modifier cannot appear on an index signature.": { + "category": "Error", + "code": 1071 + }, "A '{0}' modifier cannot be used with an import declaration.": { "category": "Error", "code": 1079 @@ -423,10 +431,6 @@ "category": "Error", "code": 1144 }, - "Modifiers not permitted on index signature members.": { - "category": "Error", - "code": 1145 - }, "Declaration expected.": { "category": "Error", "code": 1146 diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 420d201adc9..6738b9c2d95 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -1192,7 +1192,7 @@ namespace ts { case ParsingContext.SwitchClauses: return token === SyntaxKind.CaseKeyword || token === SyntaxKind.DefaultKeyword; case ParsingContext.TypeMembers: - return isStartOfTypeMember(); + return lookAhead(isTypeMemberStart); case ParsingContext.ClassMembers: // We allow semicolons as class elements (as specified by ES6) as long as we're // not in error recovery. If we're in error recovery, we don't want an errant @@ -2233,13 +2233,13 @@ namespace ts { return finishNode(node); } - function parsePropertyOrMethodSignature(): PropertySignature | MethodSignature { - const fullStart = scanner.getStartPos(); + function parsePropertyOrMethodSignature(fullStart: number, modifiers: ModifiersArray): PropertySignature | MethodSignature { const name = parsePropertyName(); const questionToken = parseOptionalToken(SyntaxKind.QuestionToken); if (token === SyntaxKind.OpenParenToken || token === SyntaxKind.LessThanToken) { const method = createNode(SyntaxKind.MethodSignature, fullStart); + setModifiers(method, modifiers); method.name = name; method.questionToken = questionToken; @@ -2251,6 +2251,7 @@ namespace ts { } else { const property = createNode(SyntaxKind.PropertySignature, fullStart); + setModifiers(property, modifiers); property.name = name; property.questionToken = questionToken; property.type = parseTypeAnnotation(); @@ -2267,77 +2268,51 @@ namespace ts { } } - function isStartOfTypeMember(): boolean { - switch (token) { - case SyntaxKind.OpenParenToken: - case SyntaxKind.LessThanToken: - case SyntaxKind.OpenBracketToken: // Both for indexers and computed properties - return true; - default: - if (isModifierKind(token)) { - const result = lookAhead(isStartOfIndexSignatureDeclaration); - if (result) { - return result; - } - } - - return isLiteralPropertyName() && lookAhead(isTypeMemberWithLiteralPropertyName); + function isTypeMemberStart(): boolean { + let idToken: SyntaxKind; + // Return true if we have the start of a signature member + if (token === SyntaxKind.OpenParenToken || token === SyntaxKind.LessThanToken) { + return true; } - } - - function isStartOfIndexSignatureDeclaration() { + // Eat up all modifiers, but hold on to the last one in case it is actually an identifier while (isModifierKind(token)) { + idToken = token; nextToken(); } - - return isIndexSignature(); - } - - function isTypeMemberWithLiteralPropertyName() { - nextToken(); - return token === SyntaxKind.OpenParenToken || - token === SyntaxKind.LessThanToken || - token === SyntaxKind.QuestionToken || - token === SyntaxKind.ColonToken || - canParseSemicolon(); + // Index signatures and computed property names are type members + if (token === SyntaxKind.OpenBracketToken) { + return true; + } + // Try to get the first property-like token following all modifiers + if (isLiteralPropertyName()) { + idToken = token; + nextToken(); + } + // If we were able to get any potential identifier, check that it is + // the start of a member declaration + if (idToken) { + return token === SyntaxKind.OpenParenToken || + token === SyntaxKind.LessThanToken || + token === SyntaxKind.QuestionToken || + token === SyntaxKind.ColonToken || + canParseSemicolon(); + } + return false; } function parseTypeMember(): TypeElement { - switch (token) { - case SyntaxKind.OpenParenToken: - case SyntaxKind.LessThanToken: - return parseSignatureMember(SyntaxKind.CallSignature); - case SyntaxKind.OpenBracketToken: - // Indexer or computed property - return isIndexSignature() - ? parseIndexSignatureDeclaration(scanner.getStartPos(), /*decorators*/ undefined, /*modifiers*/ undefined) - : parsePropertyOrMethodSignature(); - case SyntaxKind.NewKeyword: - if (lookAhead(isStartOfConstructSignature)) { - return parseSignatureMember(SyntaxKind.ConstructSignature); - } - // fall through. - case SyntaxKind.StringLiteral: - case SyntaxKind.NumericLiteral: - return parsePropertyOrMethodSignature(); - default: - // Index declaration as allowed as a type member. But as per the grammar, - // they also allow modifiers. So we have to check for an index declaration - // that might be following modifiers. This ensures that things work properly - // when incrementally parsing as the parser will produce the Index declaration - // if it has the same text regardless of whether it is inside a class or an - // object type. - if (isModifierKind(token)) { - const result = tryParse(parseIndexSignatureWithModifiers); - if (result) { - return result; - } - } - - if (tokenIsIdentifierOrKeyword(token)) { - return parsePropertyOrMethodSignature(); - } + if (token === SyntaxKind.OpenParenToken || token === SyntaxKind.LessThanToken) { + return parseSignatureMember(SyntaxKind.CallSignature); } + if (token === SyntaxKind.NewKeyword && lookAhead(isStartOfConstructSignature)) { + return parseSignatureMember(SyntaxKind.ConstructSignature); + } + const fullStart = getNodePos(); + const modifiers = parseModifiers(); + if (isIndexSignature()) { + return parseIndexSignatureDeclaration(fullStart, /*decorators*/ undefined, modifiers); + } + return parsePropertyOrMethodSignature(fullStart, modifiers); } function parseIndexSignatureWithModifiers() { @@ -4423,6 +4398,7 @@ namespace ts { case SyntaxKind.PrivateKeyword: case SyntaxKind.ProtectedKeyword: case SyntaxKind.PublicKeyword: + case SyntaxKind.ReadonlyKeyword: nextToken(); // ASI takes effect for this modifier. if (scanner.hasPrecedingLineBreak()) { @@ -4501,6 +4477,7 @@ namespace ts { case SyntaxKind.PrivateKeyword: case SyntaxKind.ProtectedKeyword: case SyntaxKind.StaticKeyword: + case SyntaxKind.ReadonlyKeyword: // When these don't start a declaration, they may be the start of a class member if an identifier // immediately follows. Otherwise they're an identifier in an expression statement. return isStartOfDeclaration() || !lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine); @@ -4582,6 +4559,7 @@ namespace ts { case SyntaxKind.PublicKeyword: case SyntaxKind.AbstractKeyword: case SyntaxKind.StaticKeyword: + case SyntaxKind.ReadonlyKeyword: if (isStartOfDeclaration()) { return parseDeclaration(); } @@ -4868,6 +4846,7 @@ namespace ts { case SyntaxKind.PrivateKeyword: case SyntaxKind.ProtectedKeyword: case SyntaxKind.StaticKeyword: + case SyntaxKind.ReadonlyKeyword: return true; default: return false; diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 6905e01b1e6..849e97ec537 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -836,6 +836,7 @@ namespace ts { case SyntaxKind.PublicKeyword: case SyntaxKind.PrivateKeyword: case SyntaxKind.ProtectedKeyword: + case SyntaxKind.ReadonlyKeyword: case SyntaxKind.DeclareKeyword: diagnostics.push(createDiagnosticForNode(modifier, Diagnostics._0_can_only_be_used_in_a_ts_file, tokenToString(modifier.kind))); return true; diff --git a/src/compiler/scanner.ts b/src/compiler/scanner.ts index 8161ea998c4..b05fbb2e0f1 100644 --- a/src/compiler/scanner.ts +++ b/src/compiler/scanner.ts @@ -93,6 +93,7 @@ namespace ts { "private": SyntaxKind.PrivateKeyword, "protected": SyntaxKind.ProtectedKeyword, "public": SyntaxKind.PublicKeyword, + "readonly": SyntaxKind.ReadonlyKeyword, "require": SyntaxKind.RequireKeyword, "return": SyntaxKind.ReturnKeyword, "set": SyntaxKind.SetKeyword, diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 9c5690901b3..f6216664d2e 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -163,6 +163,7 @@ namespace ts { IsKeyword, ModuleKeyword, NamespaceKeyword, + ReadonlyKeyword, RequireKeyword, NumberKeyword, SetKeyword, @@ -375,24 +376,24 @@ namespace ts { Private = 1 << 4, // Property/Method Protected = 1 << 5, // Property/Method Static = 1 << 6, // Property/Method - Abstract = 1 << 7, // Class/Method/ConstructSignature - Async = 1 << 8, // Property/Method/Function - Default = 1 << 9, // Function/Class (export default declaration) - MultiLine = 1 << 10, // Multi-line array or object literal - Synthetic = 1 << 11, // Synthetic node (for full fidelity) - DeclarationFile = 1 << 12, // Node is a .d.ts file - Let = 1 << 13, // Variable declaration - Const = 1 << 14, // Variable declaration - OctalLiteral = 1 << 15, // Octal numeric literal - Namespace = 1 << 16, // Namespace declaration - ExportContext = 1 << 17, // Export context (initialized by binding) - ContainsThis = 1 << 18, // Interface contains references to "this" - HasImplicitReturn = 1 << 19, // If function implicitly returns on one of codepaths (initialized by binding) - HasExplicitReturn = 1 << 20, // If function has explicit reachable return on one of codepaths (initialized by binding) - Modifier = Export | Ambient | Public | Private | Protected | Static | Abstract | Default | Async, + Readonly = 1 << 7, // Property/Method + Abstract = 1 << 8, // Class/Method/ConstructSignature + Async = 1 << 9, // Property/Method/Function + Default = 1 << 10, // Function/Class (export default declaration) + MultiLine = 1 << 11, // Multi-line array or object literal + Synthetic = 1 << 12, // Synthetic node (for full fidelity) + DeclarationFile = 1 << 13, // Node is a .d.ts file + Let = 1 << 14, // Variable declaration + Const = 1 << 15, // Variable declaration + OctalLiteral = 1 << 16, // Octal numeric literal + Namespace = 1 << 17, // Namespace declaration + ExportContext = 1 << 18, // Export context (initialized by binding) + ContainsThis = 1 << 19, // Interface contains references to "this" + HasImplicitReturn = 1 << 20, // If function implicitly returns on one of codepaths (initialized by binding) + HasExplicitReturn = 1 << 21, // If function has explicit reachable return on one of codepaths (initialized by binding) + Modifier = Export | Ambient | Public | Private | Protected | Static | Readonly | Abstract | Default | Async, AccessibilityModifier = Public | Private | Protected, BlockScoped = Let | Const, - ReachabilityCheckFlags = HasImplicitReturn | HasExplicitReturn } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 7bc708c7178..bbf73737f22 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -1548,6 +1548,7 @@ namespace ts { case SyntaxKind.PublicKeyword: case SyntaxKind.PrivateKeyword: case SyntaxKind.ProtectedKeyword: + case SyntaxKind.ReadonlyKeyword: case SyntaxKind.StaticKeyword: return true; } @@ -2279,6 +2280,7 @@ namespace ts { case SyntaxKind.ConstKeyword: return NodeFlags.Const; case SyntaxKind.DefaultKeyword: return NodeFlags.Default; case SyntaxKind.AsyncKeyword: return NodeFlags.Async; + case SyntaxKind.ReadonlyKeyword: return NodeFlags.Readonly; } return 0; } From 07b7008ba6db8a0872f66bc1b14955525e73c594 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Wed, 13 Jan 2016 18:35:51 -0800 Subject: [PATCH 034/160] Accepting new baselines --- ...rfaceWithAccessibilityModifiers.errors.txt | 12 +++++----- .../interfaceWithPrivateMember.errors.txt | 22 +++++++------------ .../reference/interfaceWithPrivateMember.js | 1 - ...fiersOnInterfaceIndexSignature1.errors.txt | 4 ++-- .../parserIndexMemberDeclaration10.errors.txt | 6 ++--- .../parserIndexMemberDeclaration6.errors.txt | 4 ++-- .../parserIndexMemberDeclaration7.errors.txt | 4 ++-- .../parserIndexMemberDeclaration8.errors.txt | 4 ++-- .../parserIndexMemberDeclaration9.errors.txt | 4 ++-- ...serModifierOnPropertySignature1.errors.txt | 4 ++-- .../reference/parserSymbolIndexer3.errors.txt | 6 ++--- .../reference/privateIndexer.errors.txt | 12 +++++----- .../reference/publicIndexer.errors.txt | 12 +++++----- .../reference/staticAsIdentifier.errors.txt | 6 ++--- .../reference/staticIndexer.errors.txt | 4 ++-- .../reference/staticIndexers.errors.txt | 12 +++++----- 16 files changed, 55 insertions(+), 62 deletions(-) diff --git a/tests/baselines/reference/interfaceWithAccessibilityModifiers.errors.txt b/tests/baselines/reference/interfaceWithAccessibilityModifiers.errors.txt index ecf803d522b..1c6f8f1939d 100644 --- a/tests/baselines/reference/interfaceWithAccessibilityModifiers.errors.txt +++ b/tests/baselines/reference/interfaceWithAccessibilityModifiers.errors.txt @@ -1,6 +1,6 @@ -tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithAccessibilityModifiers.ts(3,5): error TS1131: Property or signature expected. -tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithAccessibilityModifiers.ts(4,5): error TS1131: Property or signature expected. -tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithAccessibilityModifiers.ts(5,5): error TS1131: Property or signature expected. +tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithAccessibilityModifiers.ts(3,5): error TS1070: 'public' modifier cannot appear on a type member. +tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithAccessibilityModifiers.ts(4,5): error TS1070: 'private' modifier cannot appear on a type member. +tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithAccessibilityModifiers.ts(5,5): error TS1070: 'protected' modifier cannot appear on a type member. ==== tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithAccessibilityModifiers.ts (3 errors) ==== @@ -8,11 +8,11 @@ tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithAccessibil interface Foo { public a: any; ~~~~~~ -!!! error TS1131: Property or signature expected. +!!! error TS1070: 'public' modifier cannot appear on a type member. private b: any; ~~~~~~~ -!!! error TS1131: Property or signature expected. +!!! error TS1070: 'private' modifier cannot appear on a type member. protected c: any; ~~~~~~~~~ -!!! error TS1131: Property or signature expected. +!!! error TS1070: 'protected' modifier cannot appear on a type member. } \ No newline at end of file diff --git a/tests/baselines/reference/interfaceWithPrivateMember.errors.txt b/tests/baselines/reference/interfaceWithPrivateMember.errors.txt index dc1cfeabed5..ecbd9ec293c 100644 --- a/tests/baselines/reference/interfaceWithPrivateMember.errors.txt +++ b/tests/baselines/reference/interfaceWithPrivateMember.errors.txt @@ -1,32 +1,26 @@ -tests/cases/conformance/types/namedTypes/interfaceWithPrivateMember.ts(5,5): error TS1131: Property or signature expected. -tests/cases/conformance/types/namedTypes/interfaceWithPrivateMember.ts(9,5): error TS1131: Property or signature expected. -tests/cases/conformance/types/namedTypes/interfaceWithPrivateMember.ts(13,5): error TS1131: Property or signature expected. -tests/cases/conformance/types/namedTypes/interfaceWithPrivateMember.ts(13,16): error TS2304: Cannot find name 'string'. -tests/cases/conformance/types/namedTypes/interfaceWithPrivateMember.ts(14,1): error TS1128: Declaration or statement expected. +tests/cases/conformance/types/namedTypes/interfaceWithPrivateMember.ts(5,5): error TS1070: 'private' modifier cannot appear on a type member. +tests/cases/conformance/types/namedTypes/interfaceWithPrivateMember.ts(9,5): error TS1070: 'private' modifier cannot appear on a type member. +tests/cases/conformance/types/namedTypes/interfaceWithPrivateMember.ts(13,5): error TS1070: 'private' modifier cannot appear on a type member. -==== tests/cases/conformance/types/namedTypes/interfaceWithPrivateMember.ts (5 errors) ==== +==== tests/cases/conformance/types/namedTypes/interfaceWithPrivateMember.ts (3 errors) ==== // interfaces do not permit private members, these are errors interface I { private x: string; ~~~~~~~ -!!! error TS1131: Property or signature expected. +!!! error TS1070: 'private' modifier cannot appear on a type member. } interface I2 { private y: T; ~~~~~~~ -!!! error TS1131: Property or signature expected. +!!! error TS1070: 'private' modifier cannot appear on a type member. } var x: { private y: string; ~~~~~~~ -!!! error TS1131: Property or signature expected. - ~~~~~~ -!!! error TS2304: Cannot find name 'string'. - } - ~ -!!! error TS1128: Declaration or statement expected. \ No newline at end of file +!!! error TS1070: 'private' modifier cannot appear on a type member. + } \ No newline at end of file diff --git a/tests/baselines/reference/interfaceWithPrivateMember.js b/tests/baselines/reference/interfaceWithPrivateMember.js index ceb388b1eae..d59037cf058 100644 --- a/tests/baselines/reference/interfaceWithPrivateMember.js +++ b/tests/baselines/reference/interfaceWithPrivateMember.js @@ -17,4 +17,3 @@ var x: { //// [interfaceWithPrivateMember.js] // interfaces do not permit private members, these are errors var x; -y: string; diff --git a/tests/baselines/reference/modifiersOnInterfaceIndexSignature1.errors.txt b/tests/baselines/reference/modifiersOnInterfaceIndexSignature1.errors.txt index b325710a9f0..e09a73ff68a 100644 --- a/tests/baselines/reference/modifiersOnInterfaceIndexSignature1.errors.txt +++ b/tests/baselines/reference/modifiersOnInterfaceIndexSignature1.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/modifiersOnInterfaceIndexSignature1.ts(2,3): error TS1145: Modifiers not permitted on index signature members. +tests/cases/compiler/modifiersOnInterfaceIndexSignature1.ts(2,3): error TS1071: 'public' modifier cannot appear on an index signature. ==== tests/cases/compiler/modifiersOnInterfaceIndexSignature1.ts (1 errors) ==== interface I { public [a: string]: number; ~~~~~~ -!!! error TS1145: Modifiers not permitted on index signature members. +!!! error TS1071: 'public' modifier cannot appear on an index signature. } \ No newline at end of file diff --git a/tests/baselines/reference/parserIndexMemberDeclaration10.errors.txt b/tests/baselines/reference/parserIndexMemberDeclaration10.errors.txt index d448aaa3f29..1e94ed36b23 100644 --- a/tests/baselines/reference/parserIndexMemberDeclaration10.errors.txt +++ b/tests/baselines/reference/parserIndexMemberDeclaration10.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration10.ts(2,11): error TS1030: 'static' modifier already seen. +tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration10.ts(2,4): error TS1071: 'static' modifier cannot appear on an index signature. ==== tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration10.ts (1 errors) ==== class C { static static [x: string]: string; - ~~~~~~ -!!! error TS1030: 'static' modifier already seen. + ~~~~~~ +!!! error TS1071: 'static' modifier cannot appear on an index signature. } \ No newline at end of file diff --git a/tests/baselines/reference/parserIndexMemberDeclaration6.errors.txt b/tests/baselines/reference/parserIndexMemberDeclaration6.errors.txt index 713031dbe4f..df15ae5950e 100644 --- a/tests/baselines/reference/parserIndexMemberDeclaration6.errors.txt +++ b/tests/baselines/reference/parserIndexMemberDeclaration6.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration6.ts(2,4): error TS1145: Modifiers not permitted on index signature members. +tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration6.ts(2,4): error TS1071: 'static' modifier cannot appear on an index signature. ==== tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration6.ts (1 errors) ==== class C { static [x: string]: string; ~~~~~~ -!!! error TS1145: Modifiers not permitted on index signature members. +!!! error TS1071: 'static' modifier cannot appear on an index signature. } \ No newline at end of file diff --git a/tests/baselines/reference/parserIndexMemberDeclaration7.errors.txt b/tests/baselines/reference/parserIndexMemberDeclaration7.errors.txt index 64984ee642f..ebbfaf8af4d 100644 --- a/tests/baselines/reference/parserIndexMemberDeclaration7.errors.txt +++ b/tests/baselines/reference/parserIndexMemberDeclaration7.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration7.ts(2,4): error TS1145: Modifiers not permitted on index signature members. +tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration7.ts(2,4): error TS1071: 'public' modifier cannot appear on an index signature. ==== tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration7.ts (1 errors) ==== class C { public [x: string]: string; ~~~~~~ -!!! error TS1145: Modifiers not permitted on index signature members. +!!! error TS1071: 'public' modifier cannot appear on an index signature. } \ No newline at end of file diff --git a/tests/baselines/reference/parserIndexMemberDeclaration8.errors.txt b/tests/baselines/reference/parserIndexMemberDeclaration8.errors.txt index 1fffaa299ce..4a5eec13cb5 100644 --- a/tests/baselines/reference/parserIndexMemberDeclaration8.errors.txt +++ b/tests/baselines/reference/parserIndexMemberDeclaration8.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration8.ts(2,4): error TS1145: Modifiers not permitted on index signature members. +tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration8.ts(2,4): error TS1071: 'private' modifier cannot appear on an index signature. ==== tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration8.ts (1 errors) ==== class C { private [x: string]: string; ~~~~~~~ -!!! error TS1145: Modifiers not permitted on index signature members. +!!! error TS1071: 'private' modifier cannot appear on an index signature. } \ No newline at end of file diff --git a/tests/baselines/reference/parserIndexMemberDeclaration9.errors.txt b/tests/baselines/reference/parserIndexMemberDeclaration9.errors.txt index 493a7894499..88360adcd70 100644 --- a/tests/baselines/reference/parserIndexMemberDeclaration9.errors.txt +++ b/tests/baselines/reference/parserIndexMemberDeclaration9.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration9.ts(2,4): error TS1031: 'export' modifier cannot appear on a class element. +tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration9.ts(2,4): error TS1071: 'export' modifier cannot appear on an index signature. ==== tests/cases/conformance/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration9.ts (1 errors) ==== class C { export [x: string]: string; ~~~~~~ -!!! error TS1031: 'export' modifier cannot appear on a class element. +!!! error TS1071: 'export' modifier cannot appear on an index signature. } \ No newline at end of file diff --git a/tests/baselines/reference/parserModifierOnPropertySignature1.errors.txt b/tests/baselines/reference/parserModifierOnPropertySignature1.errors.txt index 4c8750a80c4..1ddb9712bf2 100644 --- a/tests/baselines/reference/parserModifierOnPropertySignature1.errors.txt +++ b/tests/baselines/reference/parserModifierOnPropertySignature1.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserModifierOnPropertySignature1.ts(2,5): error TS1131: Property or signature expected. +tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserModifierOnPropertySignature1.ts(2,5): error TS1070: 'public' modifier cannot appear on a type member. ==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserModifierOnPropertySignature1.ts (1 errors) ==== interface Foo{ public biz; ~~~~~~ -!!! error TS1131: Property or signature expected. +!!! error TS1070: 'public' modifier cannot appear on a type member. } \ No newline at end of file diff --git a/tests/baselines/reference/parserSymbolIndexer3.errors.txt b/tests/baselines/reference/parserSymbolIndexer3.errors.txt index 5484a096d4c..27d3a522b3e 100644 --- a/tests/baselines/reference/parserSymbolIndexer3.errors.txt +++ b/tests/baselines/reference/parserSymbolIndexer3.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolIndexer3.ts(2,13): error TS1023: An index signature parameter type must be 'string' or 'number'. +tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolIndexer3.ts(2,5): error TS1071: 'static' modifier cannot appear on an index signature. ==== tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolIndexer3.ts (1 errors) ==== class C { static [s: symbol]: string; - ~ -!!! error TS1023: An index signature parameter type must be 'string' or 'number'. + ~~~~~~ +!!! error TS1071: 'static' modifier cannot appear on an index signature. } \ No newline at end of file diff --git a/tests/baselines/reference/privateIndexer.errors.txt b/tests/baselines/reference/privateIndexer.errors.txt index 5d8ae7c9351..5ee21d8e4e3 100644 --- a/tests/baselines/reference/privateIndexer.errors.txt +++ b/tests/baselines/reference/privateIndexer.errors.txt @@ -1,6 +1,6 @@ -tests/cases/conformance/classes/indexMemberDeclarations/privateIndexer.ts(4,5): error TS1145: Modifiers not permitted on index signature members. -tests/cases/conformance/classes/indexMemberDeclarations/privateIndexer.ts(8,5): error TS1145: Modifiers not permitted on index signature members. -tests/cases/conformance/classes/indexMemberDeclarations/privateIndexer.ts(12,5): error TS1145: Modifiers not permitted on index signature members. +tests/cases/conformance/classes/indexMemberDeclarations/privateIndexer.ts(4,5): error TS1071: 'private' modifier cannot appear on an index signature. +tests/cases/conformance/classes/indexMemberDeclarations/privateIndexer.ts(8,5): error TS1071: 'private' modifier cannot appear on an index signature. +tests/cases/conformance/classes/indexMemberDeclarations/privateIndexer.ts(12,5): error TS1071: 'private' modifier cannot appear on an index signature. ==== tests/cases/conformance/classes/indexMemberDeclarations/privateIndexer.ts (3 errors) ==== @@ -9,17 +9,17 @@ tests/cases/conformance/classes/indexMemberDeclarations/privateIndexer.ts(12,5): class C { private [x: string]: string; ~~~~~~~ -!!! error TS1145: Modifiers not permitted on index signature members. +!!! error TS1071: 'private' modifier cannot appear on an index signature. } class D { private [x: number]: string; ~~~~~~~ -!!! error TS1145: Modifiers not permitted on index signature members. +!!! error TS1071: 'private' modifier cannot appear on an index signature. } class E { private [x: string]: T; ~~~~~~~ -!!! error TS1145: Modifiers not permitted on index signature members. +!!! error TS1071: 'private' modifier cannot appear on an index signature. } \ No newline at end of file diff --git a/tests/baselines/reference/publicIndexer.errors.txt b/tests/baselines/reference/publicIndexer.errors.txt index 860290ea25b..29454f2a208 100644 --- a/tests/baselines/reference/publicIndexer.errors.txt +++ b/tests/baselines/reference/publicIndexer.errors.txt @@ -1,6 +1,6 @@ -tests/cases/conformance/classes/indexMemberDeclarations/publicIndexer.ts(4,5): error TS1145: Modifiers not permitted on index signature members. -tests/cases/conformance/classes/indexMemberDeclarations/publicIndexer.ts(8,5): error TS1145: Modifiers not permitted on index signature members. -tests/cases/conformance/classes/indexMemberDeclarations/publicIndexer.ts(12,5): error TS1145: Modifiers not permitted on index signature members. +tests/cases/conformance/classes/indexMemberDeclarations/publicIndexer.ts(4,5): error TS1071: 'public' modifier cannot appear on an index signature. +tests/cases/conformance/classes/indexMemberDeclarations/publicIndexer.ts(8,5): error TS1071: 'public' modifier cannot appear on an index signature. +tests/cases/conformance/classes/indexMemberDeclarations/publicIndexer.ts(12,5): error TS1071: 'public' modifier cannot appear on an index signature. ==== tests/cases/conformance/classes/indexMemberDeclarations/publicIndexer.ts (3 errors) ==== @@ -9,17 +9,17 @@ tests/cases/conformance/classes/indexMemberDeclarations/publicIndexer.ts(12,5): class C { public [x: string]: string; ~~~~~~ -!!! error TS1145: Modifiers not permitted on index signature members. +!!! error TS1071: 'public' modifier cannot appear on an index signature. } class D { public [x: number]: string; ~~~~~~ -!!! error TS1145: Modifiers not permitted on index signature members. +!!! error TS1071: 'public' modifier cannot appear on an index signature. } class E { public [x: string]: T; ~~~~~~ -!!! error TS1145: Modifiers not permitted on index signature members. +!!! error TS1071: 'public' modifier cannot appear on an index signature. } \ No newline at end of file diff --git a/tests/baselines/reference/staticAsIdentifier.errors.txt b/tests/baselines/reference/staticAsIdentifier.errors.txt index 52108a5a221..4173b0b14c5 100644 --- a/tests/baselines/reference/staticAsIdentifier.errors.txt +++ b/tests/baselines/reference/staticAsIdentifier.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/staticAsIdentifier.ts(2,12): error TS1030: 'static' modifier already seen. +tests/cases/compiler/staticAsIdentifier.ts(2,5): error TS1071: 'static' modifier cannot appear on an index signature. ==== tests/cases/compiler/staticAsIdentifier.ts (1 errors) ==== class C { static static - ~~~~~~ -!!! error TS1030: 'static' modifier already seen. + ~~~~~~ +!!! error TS1071: 'static' modifier cannot appear on an index signature. [x: string]: string; } \ No newline at end of file diff --git a/tests/baselines/reference/staticIndexer.errors.txt b/tests/baselines/reference/staticIndexer.errors.txt index 3e910121051..19ed61df658 100644 --- a/tests/baselines/reference/staticIndexer.errors.txt +++ b/tests/baselines/reference/staticIndexer.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/staticIndexer.ts(2,5): error TS1145: Modifiers not permitted on index signature members. +tests/cases/compiler/staticIndexer.ts(2,5): error TS1071: 'static' modifier cannot appear on an index signature. ==== tests/cases/compiler/staticIndexer.ts (1 errors) ==== class C { static [s: string]: number; ~~~~~~ -!!! error TS1145: Modifiers not permitted on index signature members. +!!! error TS1071: 'static' modifier cannot appear on an index signature. } \ No newline at end of file diff --git a/tests/baselines/reference/staticIndexers.errors.txt b/tests/baselines/reference/staticIndexers.errors.txt index 29c46d0ce8c..8223a38a9ae 100644 --- a/tests/baselines/reference/staticIndexers.errors.txt +++ b/tests/baselines/reference/staticIndexers.errors.txt @@ -1,6 +1,6 @@ -tests/cases/conformance/classes/indexMemberDeclarations/staticIndexers.ts(4,5): error TS1145: Modifiers not permitted on index signature members. -tests/cases/conformance/classes/indexMemberDeclarations/staticIndexers.ts(8,5): error TS1145: Modifiers not permitted on index signature members. -tests/cases/conformance/classes/indexMemberDeclarations/staticIndexers.ts(12,5): error TS1145: Modifiers not permitted on index signature members. +tests/cases/conformance/classes/indexMemberDeclarations/staticIndexers.ts(4,5): error TS1071: 'static' modifier cannot appear on an index signature. +tests/cases/conformance/classes/indexMemberDeclarations/staticIndexers.ts(8,5): error TS1071: 'static' modifier cannot appear on an index signature. +tests/cases/conformance/classes/indexMemberDeclarations/staticIndexers.ts(12,5): error TS1071: 'static' modifier cannot appear on an index signature. tests/cases/conformance/classes/indexMemberDeclarations/staticIndexers.ts(12,25): error TS2302: Static members cannot reference class type parameters. @@ -10,19 +10,19 @@ tests/cases/conformance/classes/indexMemberDeclarations/staticIndexers.ts(12,25) class C { static [x: string]: string; ~~~~~~ -!!! error TS1145: Modifiers not permitted on index signature members. +!!! error TS1071: 'static' modifier cannot appear on an index signature. } class D { static [x: number]: string; ~~~~~~ -!!! error TS1145: Modifiers not permitted on index signature members. +!!! error TS1071: 'static' modifier cannot appear on an index signature. } class E { static [x: string]: T; ~~~~~~ -!!! error TS1145: Modifiers not permitted on index signature members. +!!! error TS1071: 'static' modifier cannot appear on an index signature. ~ !!! error TS2302: Static members cannot reference class type parameters. } \ No newline at end of file From 0dc485ad2c14e6ad3d2115a9f61366c1976b9d13 Mon Sep 17 00:00:00 2001 From: Asad Saeeduddin Date: Fri, 15 Jan 2016 23:31:45 -0500 Subject: [PATCH 035/160] Added test case --- ...gReturnStatementsAndExpressions.errors.txt | 23 ++++++++++++++++--- ...nsMissingReturnStatementsAndExpressions.js | 20 ++++++++++++++++ ...nsMissingReturnStatementsAndExpressions.ts | 11 +++++++++ 3 files changed, 51 insertions(+), 3 deletions(-) diff --git a/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.errors.txt b/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.errors.txt index 58ffd051d4d..41528f70880 100644 --- a/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.errors.txt +++ b/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.errors.txt @@ -1,9 +1,11 @@ tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(3,16): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. -tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(95,16): error TS2378: A 'get' accessor must return a value. -tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(118,5): error TS1003: Identifier expected. +tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(93,17): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. +tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(101,17): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. +tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(106,16): error TS2378: A 'get' accessor must return a value. +tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(129,5): error TS1003: Identifier expected. -==== tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts (3 errors) ==== +==== tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts (5 errors) ==== function f1(): string { @@ -98,6 +100,21 @@ tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(118,5): e return "Okay, not type annotated."; } + function f19(): void | number { + ~~~~~~~~~~~~~ +!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. + // Okay; function return type is union containing void + } + + function f20(): any | number { + // Okay; function return type is union containing any + } + + function f21(): number | string { + ~~~~~~~~~~~~~~~ +!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. + // Not okay; union does not contain void or any + } class C { public get m1() { diff --git a/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.js b/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.js index 4dfe851683a..17468722e20 100644 --- a/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.js +++ b/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.js @@ -91,6 +91,17 @@ function f18() { return "Okay, not type annotated."; } +function f19(): void | number { + // Okay; function return type is union containing void +} + +function f20(): any | number { + // Okay; function return type is union containing any +} + +function f21(): number | string { + // Not okay; union does not contain void or any +} class C { public get m1() { @@ -191,6 +202,15 @@ function f17() { function f18() { return "Okay, not type annotated."; } +function f19() { + // Okay; function return type is union containing void +} +function f20() { + // Okay; function return type is union containing any +} +function f21() { + // Not okay; union does not contain void or any +} var C = (function () { function C() { } diff --git a/tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts b/tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts index fde615af41d..582940038c5 100644 --- a/tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts +++ b/tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts @@ -92,6 +92,17 @@ function f18() { return "Okay, not type annotated."; } +function f19(): void | number { + // Okay; function return type is union containing void +} + +function f20(): any | number { + // Okay; function return type is union containing any +} + +function f21(): number | string { + // Not okay; union does not contain void or any +} class C { public get m1() { From e568892ea52eb0b479f890a2aa833e019426a2c3 Mon Sep 17 00:00:00 2001 From: Asad Saeeduddin Date: Fri, 15 Jan 2016 23:50:30 -0500 Subject: [PATCH 036/160] Allow missing return for unions containing any or void --- doc/spec.md | 10 +++++----- src/compiler/checker.ts | 11 +++++++++-- ...nsMissingReturnStatementsAndExpressions.errors.txt | 5 +---- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/doc/spec.md b/doc/spec.md index 30de2c5a6b6..4c1ec4f2302 100644 --- a/doc/spec.md +++ b/doc/spec.md @@ -265,7 +265,7 @@ function f() { To benefit from this inference, a programmer can use the TypeScript language service. For example, a code editor can incorporate the TypeScript language service and use the service to find the members of a string object as in the following screen shot. -  ![](images/image1.png) +  ![](images/image1.png) In this example, the programmer benefits from type inference without providing type annotations. Some beneficial tools, however, do require the programmer to provide type annotations. In TypeScript, we can express a parameter requirement as in the following code fragment. @@ -413,7 +413,7 @@ This signature denotes that a function may be passed as the parameter of the '$' A typical client would not need to add any additional typing but could just use a community-supplied typing to discover (through statement completion with documentation tips) and verify (through static checking) correct use of the library, as in the following screen shot. -  ![](images/image2.png) +  ![](images/image2.png) Section [3.3](#3.3) provides additional information about object types. @@ -630,7 +630,7 @@ An important goal of TypeScript is to provide accurate and straightforward types JavaScript programming interfaces often include functions whose behavior is discriminated by a string constant passed to the function. The Document Object Model makes heavy use of this pattern. For example, the following screen shot shows that the 'createElement' method of the 'document' object has multiple signatures, some of which identify the types returned when specific strings are passed into the method. -  ![](images/image3.png) +  ![](images/image3.png) The following code fragment uses this feature. Because the 'span' variable is inferred to have the type 'HTMLSpanElement', the code can reference without static error the 'isMultiline' property of 'span'. @@ -641,7 +641,7 @@ span.isMultiLine = false; // OK: HTMLSpanElement has isMultiline property In the following screen shot, a programming tool combines information from overloading on string parameters with contextual typing to infer that the type of the variable 'e' is 'MouseEvent' and that therefore 'e' has a 'clientX' property. -  ![](images/image4.png) +  ![](images/image4.png) Section [3.9.2.4](#3.9.2.4) provides details on how to use string literals in function signatures. @@ -3885,7 +3885,7 @@ function g(x: number) { the inferred return type for 'f' and 'g' is Any because the functions reference themselves through a cycle with no return type annotations. Adding an explicit return type 'number' to either breaks the cycle and causes the return type 'number' to be inferred for the other. -An explicitly typed function whose return type isn't the Void or the Any type must have at least one return statement somewhere in its body. An exception to this rule is if the function implementation consists of a single 'throw' statement. +An explicitly typed function whose return type isn't the Void type, the Any type, or a union type containing the Void or Any type as a constituent must have at least one return statement somewhere in its body. An exception to this rule is if the function implementation consists of a single 'throw' statement. The type of 'this' in a function implementation is the Any type. diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index dd943ec807e..133f09ef422 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -2466,6 +2466,12 @@ namespace ts { return type && (type.flags & TypeFlags.Any) !== 0; } + function isUnionContaining(type: Type, kinds: TypeFlags) { + return type + && (type.flags & TypeFlags.Union) + && someConstituentTypeHasKind(type, kinds); + } + // Return the type of a binding element parent. We check SymbolLinks first to see if a type has been // assigned by contextual typing. function getTypeForBindingElementParent(node: VariableLikeDeclaration) { @@ -10201,7 +10207,8 @@ namespace ts { /* *TypeScript Specification 1.0 (6.3) - July 2014 - * An explicitly typed function whose return type isn't the Void or the Any type + * An explicitly typed function whose return type isn't the Void type, + * the Any type, or a union type containing the Void or Any type as a constituent * must have at least one return statement somewhere in its body. * An exception to this rule is if the function implementation consists of a single 'throw' statement. * @param returnType - return type of the function, can be undefined if return type is not explicitly specified @@ -10212,7 +10219,7 @@ namespace ts { } // Functions with with an explicitly specified 'void' or 'any' return type don't need any return expressions. - if (returnType === voidType || isTypeAny(returnType)) { + if (returnType === voidType || isTypeAny(returnType) || isUnionContaining(returnType, TypeFlags.Any) || isUnionContaining(returnType, TypeFlags.Void)) { return; } diff --git a/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.errors.txt b/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.errors.txt index 41528f70880..1ccc296b75b 100644 --- a/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.errors.txt +++ b/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.errors.txt @@ -1,11 +1,10 @@ tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(3,16): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. -tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(93,17): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(101,17): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(106,16): error TS2378: A 'get' accessor must return a value. tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(129,5): error TS1003: Identifier expected. -==== tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts (5 errors) ==== +==== tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts (4 errors) ==== function f1(): string { @@ -101,8 +100,6 @@ tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(129,5): e } function f19(): void | number { - ~~~~~~~~~~~~~ -!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. // Okay; function return type is union containing void } From eb87bad2c88ead32de1739317ffc74c6c524279a Mon Sep 17 00:00:00 2001 From: Asad Saeeduddin Date: Sat, 16 Jan 2016 00:15:19 -0500 Subject: [PATCH 037/160] Removed trailing whitespace --- src/compiler/checker.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 133f09ef422..b7637682f1a 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -2467,9 +2467,7 @@ namespace ts { } function isUnionContaining(type: Type, kinds: TypeFlags) { - return type - && (type.flags & TypeFlags.Union) - && someConstituentTypeHasKind(type, kinds); + return type && (type.flags & TypeFlags.Union) && someConstituentTypeHasKind(type, kinds); } // Return the type of a binding element parent. We check SymbolLinks first to see if a type has been From d50435736bf54562581db4c6eccc97f0afa460e5 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sat, 16 Jan 2016 12:09:18 -0800 Subject: [PATCH 038/160] Check readonly in assignments and type relations --- src/compiler/checker.ts | 108 ++++++++++----------------- src/compiler/diagnosticMessages.json | 4 + 2 files changed, 45 insertions(+), 67 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index c73b6309f16..7ad6a5d6d7a 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -5523,6 +5523,13 @@ namespace ts { } return Ternary.False; } + if (isReadonlySymbol(sourceProp) && !isReadonlySymbol(targetProp)) { + if (reportErrors) { + reportError(Diagnostics.Property_0_is_read_only_in_type_1_but_read_write_in_type_2, + symbolToString(targetProp), typeToString(source), typeToString(target)); + } + return Ternary.False; + } } } } @@ -10323,81 +10330,48 @@ namespace ts { return true; } - function checkReferenceExpression(n: Node, invalidReferenceMessage: DiagnosticMessage, constantVariableMessage: DiagnosticMessage): boolean { - function findSymbol(n: Node): Symbol { - const symbol = getNodeLinks(n).resolvedSymbol; - // Because we got the symbol from the resolvedSymbol property, it might be of kind - // SymbolFlags.ExportValue. In this case it is necessary to get the actual export - // symbol, which will have the correct flags set on it. - return symbol && getExportSymbolOfValueSymbolIfExported(symbol); + function isReadonlySymbol(symbol: Symbol): boolean { + if (symbol.flags & (SymbolFlags.Property | SymbolFlags.Method)) { + return symbol === undefinedSymbol || (getDeclarationFlagsFromSymbol(symbol) & NodeFlags.Readonly) !== 0; } - - function isReferenceOrErrorExpression(n: Node): boolean { - // TypeScript 1.0 spec (April 2014): - // Expressions are classified as values or references. - // References are the subset of expressions that are permitted as the target of an assignment. - // Specifically, references are combinations of identifiers(section 4.3), parentheses(section 4.7), - // and property accesses(section 4.10). - // All other expression constructs described in this chapter are classified as values. - switch (n.kind) { - case SyntaxKind.Identifier: { - const symbol = findSymbol(n); - // TypeScript 1.0 spec (April 2014): 4.3 - // An identifier expression that references a variable or parameter is classified as a reference. - // An identifier expression that references any other kind of entity is classified as a value(and therefore cannot be the target of an assignment). - return !symbol || symbol === unknownSymbol || symbol === argumentsSymbol || (symbol.flags & SymbolFlags.Variable) !== 0; - } - case SyntaxKind.PropertyAccessExpression: { - const symbol = findSymbol(n); - // TypeScript 1.0 spec (April 2014): 4.10 - // A property access expression is always classified as a reference. - // NOTE (not in spec): assignment to enum members should not be allowed - return !symbol || symbol === unknownSymbol || (symbol.flags & ~SymbolFlags.EnumMember) !== 0; - } - case SyntaxKind.ElementAccessExpression: - // old compiler doesn't check indexed access - return true; - case SyntaxKind.ParenthesizedExpression: - return isReferenceOrErrorExpression((n).expression); - default: - return false; - } + if (symbol.flags & SymbolFlags.Accessor) { + return !(symbol.flags & SymbolFlags.SetAccessor); } + return false; + } - function isConstVariableReference(n: Node): boolean { - switch (n.kind) { - case SyntaxKind.Identifier: - case SyntaxKind.PropertyAccessExpression: { - const symbol = findSymbol(n); - return symbol && (symbol.flags & SymbolFlags.Variable) !== 0 && (getDeclarationFlagsFromSymbol(symbol) & NodeFlags.Const) !== 0; - } - case SyntaxKind.ElementAccessExpression: { - const index = (n).argumentExpression; - const symbol = findSymbol((n).expression); - if (symbol && index && index.kind === SyntaxKind.StringLiteral) { - const name = (index).text; - const prop = getPropertyOfType(getTypeOfSymbol(symbol), name); - return prop && (prop.flags & SymbolFlags.Variable) !== 0 && (getDeclarationFlagsFromSymbol(prop) & NodeFlags.Const) !== 0; - } - return false; - } - case SyntaxKind.ParenthesizedExpression: - return isConstVariableReference((n).expression); - default: - return false; - } + function isConstantSymbol(symbol: Symbol): boolean { + if (symbol.flags & SymbolFlags.Variable) { + return (getDeclarationFlagsFromSymbol(symbol) & NodeFlags.Const) !== 0; } + } - if (!isReferenceOrErrorExpression(n)) { - error(n, invalidReferenceMessage); + function checkReferenceExpression(expr: Expression, invalidReferenceMessage: DiagnosticMessage, constantVariableMessage: DiagnosticMessage): boolean { + // References are combinations of identifiers, parentheses, and property accesses. + const node = skipParenthesizedNodes(expr); + if (node.kind !== SyntaxKind.Identifier && node.kind !== SyntaxKind.PropertyAccessExpression && node.kind !== SyntaxKind.ElementAccessExpression) { + error(expr, invalidReferenceMessage); return false; } - - if (isConstVariableReference(n)) { - error(n, constantVariableMessage); - return false; + // Because we got the symbol from the resolvedSymbol property, it might be of kind + // SymbolFlags.ExportValue. In this case it is necessary to get the actual export + // symbol, which will have the correct flags set on it. + const symbol = getExportSymbolOfValueSymbolIfExported(getNodeLinks(node).resolvedSymbol); + if (symbol) { + if (symbol !== unknownSymbol && symbol !== argumentsSymbol) { + if (symbol === undefinedSymbol || !(symbol.flags & (SymbolFlags.Variable | SymbolFlags.Property | SymbolFlags.Method | SymbolFlags.Accessor))) { + error(expr, invalidReferenceMessage); + return false; + } + if (isReadonlySymbol(symbol) || isConstantSymbol(symbol)) { + error(expr, constantVariableMessage); + return false; + } + } + } + else { + // Check indexers } - return true; } diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index a10787764d9..98a05f5a302 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -991,6 +991,10 @@ "category": "Error", "code": 2342 }, + "Property '{0}' is read-only in type '{1}' but read-write in type '{2}'.": { + "category": "Error", + "code": 2343 + }, "Type '{0}' does not satisfy the constraint '{1}'.": { "category": "Error", "code": 2344 From 8319f2ee98f2ef943e920992c683533fb70ae6f5 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sat, 16 Jan 2016 12:10:16 -0800 Subject: [PATCH 039/160] Accepting new baselines --- ...nmentToParenthesizedIdentifiers.errors.txt | 35 +++++++++---------- .../decrementOperatorWithEnumType.errors.txt | 8 ++++- .../incrementOperatorWithEnumType.errors.txt | 8 ++++- .../interfaceImplementation5.errors.txt | 12 ++++++- 4 files changed, 41 insertions(+), 22 deletions(-) diff --git a/tests/baselines/reference/assignmentToParenthesizedIdentifiers.errors.txt b/tests/baselines/reference/assignmentToParenthesizedIdentifiers.errors.txt index a50ffdf72d7..dcfed4ae28b 100644 --- a/tests/baselines/reference/assignmentToParenthesizedIdentifiers.errors.txt +++ b/tests/baselines/reference/assignmentToParenthesizedIdentifiers.errors.txt @@ -6,15 +6,12 @@ tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesize tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(17,1): error TS2364: Invalid left-hand side of assignment expression. tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(18,1): error TS2364: Invalid left-hand side of assignment expression. tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(25,5): error TS2364: Invalid left-hand side of assignment expression. -tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(31,1): error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3'. - Types of property 'x' are incompatible. - Type 'string' is not assignable to type 'number'. -tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(32,1): error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3'. - Types of property 'x' are incompatible. - Type 'string' is not assignable to type 'number'. -tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(33,1): error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3'. - Types of property 'x' are incompatible. - Type 'string' is not assignable to type 'number'. +tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(27,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(28,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(29,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(31,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(32,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(33,1): error TS2364: Invalid left-hand side of assignment expression. tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(37,1): error TS2364: Invalid left-hand side of assignment expression. tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(38,1): error TS2364: Invalid left-hand side of assignment expression. tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(43,5): error TS2322: Type 'string' is not assignable to type 'number'. @@ -30,7 +27,7 @@ tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesize tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(70,1): error TS2364: Invalid left-hand side of assignment expression. -==== tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts (24 errors) ==== +==== tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts (27 errors) ==== var x: number; x = 3; // OK (x) = 3; // OK @@ -74,24 +71,24 @@ tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesize !!! error TS2364: Invalid left-hand side of assignment expression. } M2.M3 = { x: 3 }; // OK + ~~~~~ +!!! error TS2364: Invalid left-hand side of assignment expression. (M2).M3 = { x: 3 }; // OK + ~~~~~~~ +!!! error TS2364: Invalid left-hand side of assignment expression. (M2.M3) = { x: 3 }; // OK + ~~~~~~~ +!!! error TS2364: Invalid left-hand side of assignment expression. M2.M3 = { x: '' }; // Error ~~~~~ -!!! error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3'. -!!! error TS2322: Types of property 'x' are incompatible. -!!! error TS2322: Type 'string' is not assignable to type 'number'. +!!! error TS2364: Invalid left-hand side of assignment expression. (M2).M3 = { x: '' }; // Error ~~~~~~~ -!!! error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3'. -!!! error TS2322: Types of property 'x' are incompatible. -!!! error TS2322: Type 'string' is not assignable to type 'number'. +!!! error TS2364: Invalid left-hand side of assignment expression. (M2.M3) = { x: '' }; // Error ~~~~~~~ -!!! error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3'. -!!! error TS2322: Types of property 'x' are incompatible. -!!! error TS2322: Type 'string' is not assignable to type 'number'. +!!! error TS2364: Invalid left-hand side of assignment expression. function fn() { } diff --git a/tests/baselines/reference/decrementOperatorWithEnumType.errors.txt b/tests/baselines/reference/decrementOperatorWithEnumType.errors.txt index a0c30e9dc93..221163c097f 100644 --- a/tests/baselines/reference/decrementOperatorWithEnumType.errors.txt +++ b/tests/baselines/reference/decrementOperatorWithEnumType.errors.txt @@ -1,21 +1,27 @@ +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumType.ts(6,25): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumType.ts(7,23): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumType.ts(10,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumType.ts(12,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumType.ts(12,7): error TS2304: Cannot find name 'A'. -==== tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumType.ts (3 errors) ==== +==== tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumType.ts (5 errors) ==== // -- operator on enum type enum ENUM1 { A, B, "" }; // expression var ResultIsNumber1 = --ENUM1["A"]; + ~~~~~~~~~~ +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber2 = ENUM1.A--; ~~~~~~~ !!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. // miss assignment operator --ENUM1["A"]; + ~~~~~~~~~~ +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ENUM1[A]--; ~~~~~~~~ diff --git a/tests/baselines/reference/incrementOperatorWithEnumType.errors.txt b/tests/baselines/reference/incrementOperatorWithEnumType.errors.txt index 9bcf6c7612f..8c556f89732 100644 --- a/tests/baselines/reference/incrementOperatorWithEnumType.errors.txt +++ b/tests/baselines/reference/incrementOperatorWithEnumType.errors.txt @@ -1,20 +1,26 @@ +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumType.ts(6,25): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumType.ts(7,23): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumType.ts(10,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumType.ts(12,1): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. -==== tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumType.ts (2 errors) ==== +==== tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumType.ts (4 errors) ==== // ++ operator on enum type enum ENUM1 { A, B, "" }; // expression var ResultIsNumber1 = ++ENUM1["B"]; + ~~~~~~~~~~ +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber2 = ENUM1.B++; ~~~~~~~ !!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. // miss assignment operator ++ENUM1["B"]; + ~~~~~~~~~~ +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ENUM1.B++; ~~~~~~~ diff --git a/tests/baselines/reference/interfaceImplementation5.errors.txt b/tests/baselines/reference/interfaceImplementation5.errors.txt index 882d8516121..aba0c9f8850 100644 --- a/tests/baselines/reference/interfaceImplementation5.errors.txt +++ b/tests/baselines/reference/interfaceImplementation5.errors.txt @@ -1,19 +1,26 @@ +tests/cases/compiler/interfaceImplementation5.ts(5,7): error TS2420: Class 'C1' incorrectly implements interface 'I1'. + Property 'getset1' is read-only in type 'C1' but read-write in type 'I1'. tests/cases/compiler/interfaceImplementation5.ts(6,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/interfaceImplementation5.ts(10,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/interfaceImplementation5.ts(14,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/interfaceImplementation5.ts(15,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/interfaceImplementation5.ts(18,7): error TS2420: Class 'C4' incorrectly implements interface 'I1'. + Property 'getset1' is read-only in type 'C4' but read-write in type 'I1'. tests/cases/compiler/interfaceImplementation5.ts(19,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/interfaceImplementation5.ts(23,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/interfaceImplementation5.ts(27,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/interfaceImplementation5.ts(28,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -==== tests/cases/compiler/interfaceImplementation5.ts (8 errors) ==== +==== tests/cases/compiler/interfaceImplementation5.ts (10 errors) ==== interface I1 { getset1:number; } class C1 implements I1 { + ~~ +!!! error TS2420: Class 'C1' incorrectly implements interface 'I1'. +!!! error TS2420: Property 'getset1' is read-only in type 'C1' but read-write in type 'I1'. public get getset1(){return 1;} ~~~~~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. @@ -35,6 +42,9 @@ tests/cases/compiler/interfaceImplementation5.ts(28,16): error TS1056: Accessors } class C4 implements I1 { + ~~ +!!! error TS2420: Class 'C4' incorrectly implements interface 'I1'. +!!! error TS2420: Property 'getset1' is read-only in type 'C4' but read-write in type 'I1'. public get getset1(){var x:any; return x;} ~~~~~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. From 07763ed1f8c7f6281ec27d16cb996191ee0812b7 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sun, 17 Jan 2016 07:24:51 -0800 Subject: [PATCH 040/160] Removing unused function --- src/compiler/parser.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 6738b9c2d95..46dd9a7defa 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -2315,15 +2315,6 @@ namespace ts { return parsePropertyOrMethodSignature(fullStart, modifiers); } - function parseIndexSignatureWithModifiers() { - const fullStart = scanner.getStartPos(); - const decorators = parseDecorators(); - const modifiers = parseModifiers(); - return isIndexSignature() - ? parseIndexSignatureDeclaration(fullStart, decorators, modifiers) - : undefined; - } - function isStartOfConstructSignature() { nextToken(); return token === SyntaxKind.OpenParenToken || token === SyntaxKind.LessThanToken; From 5b233e4d9df5f88bdfe9c2c25e2386ffacbfa3c3 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sun, 17 Jan 2016 09:47:13 -0800 Subject: [PATCH 041/160] Refactor to introduce IndexInfo type --- src/compiler/checker.ts | 161 ++++++++++++++++++++++++---------------- src/compiler/types.ts | 13 +++- 2 files changed, 105 insertions(+), 69 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 7ad6a5d6d7a..1f815a6fd3e 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -133,6 +133,8 @@ namespace ts { const anySignature = createSignature(undefined, undefined, emptyArray, anyType, 0, /*hasRestParameter*/ false, /*hasStringLiterals*/ false); const unknownSignature = createSignature(undefined, undefined, emptyArray, unknownType, 0, /*hasRestParameter*/ false, /*hasStringLiterals*/ false); + const enumNumberIndexInfo = createIndexInfo(stringType, /*isReadonly*/ true); + const globals: SymbolTable = {}; let globalESSymbolConstructorSymbol: Symbol; @@ -1319,19 +1321,19 @@ namespace ts { return result || emptyArray; } - function setObjectTypeMembers(type: ObjectType, members: SymbolTable, callSignatures: Signature[], constructSignatures: Signature[], stringIndexType: Type, numberIndexType: Type): ResolvedType { + function setObjectTypeMembers(type: ObjectType, members: SymbolTable, callSignatures: Signature[], constructSignatures: Signature[], stringIndexInfo: IndexInfo, numberIndexInfo: IndexInfo): ResolvedType { (type).members = members; (type).properties = getNamedMembers(members); (type).callSignatures = callSignatures; (type).constructSignatures = constructSignatures; - if (stringIndexType) (type).stringIndexType = stringIndexType; - if (numberIndexType) (type).numberIndexType = numberIndexType; + if (stringIndexInfo) (type).stringIndexInfo = stringIndexInfo; + if (numberIndexInfo) (type).numberIndexInfo = numberIndexInfo; return type; } - function createAnonymousType(symbol: Symbol, members: SymbolTable, callSignatures: Signature[], constructSignatures: Signature[], stringIndexType: Type, numberIndexType: Type): ResolvedType { + function createAnonymousType(symbol: Symbol, members: SymbolTable, callSignatures: Signature[], constructSignatures: Signature[], stringIndexInfo: IndexInfo, numberIndexInfo: IndexInfo): ResolvedType { return setObjectTypeMembers(createObjectType(TypeFlags.Anonymous, symbol), - members, callSignatures, constructSignatures, stringIndexType, numberIndexType); + members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo); } function forEachSymbolTableInScope(enclosingDeclaration: Node, callback: (symbolTable: SymbolTable) => T): T { @@ -1967,7 +1969,7 @@ namespace ts { function writeLiteralType(type: ObjectType, flags: TypeFormatFlags) { const resolved = resolveStructuredTypeMembers(type); - if (!resolved.properties.length && !resolved.stringIndexType && !resolved.numberIndexType) { + if (!resolved.properties.length && !resolved.stringIndexInfo && !resolved.numberIndexInfo) { if (!resolved.callSignatures.length && !resolved.constructSignatures.length) { writePunctuation(writer, SyntaxKind.OpenBraceToken); writePunctuation(writer, SyntaxKind.CloseBraceToken); @@ -2013,7 +2015,7 @@ namespace ts { writePunctuation(writer, SyntaxKind.SemicolonToken); writer.writeLine(); } - if (resolved.stringIndexType) { + if (resolved.stringIndexInfo) { // [x: string]: writePunctuation(writer, SyntaxKind.OpenBracketToken); writer.writeParameter(getIndexerParameterName(resolved, IndexKind.String, /*fallbackName*/"x")); @@ -2023,11 +2025,11 @@ namespace ts { writePunctuation(writer, SyntaxKind.CloseBracketToken); writePunctuation(writer, SyntaxKind.ColonToken); writeSpace(writer); - writeType(resolved.stringIndexType, TypeFormatFlags.None); + writeType(resolved.stringIndexInfo.type, TypeFormatFlags.None); writePunctuation(writer, SyntaxKind.SemicolonToken); writer.writeLine(); } - if (resolved.numberIndexType) { + if (resolved.numberIndexInfo) { // [x: number]: writePunctuation(writer, SyntaxKind.OpenBracketToken); writer.writeParameter(getIndexerParameterName(resolved, IndexKind.Number, /*fallbackName*/"x")); @@ -2037,7 +2039,7 @@ namespace ts { writePunctuation(writer, SyntaxKind.CloseBracketToken); writePunctuation(writer, SyntaxKind.ColonToken); writeSpace(writer); - writeType(resolved.numberIndexType, TypeFormatFlags.None); + writeType(resolved.numberIndexInfo.type, TypeFormatFlags.None); writePunctuation(writer, SyntaxKind.SemicolonToken); writer.writeLine(); } @@ -3343,8 +3345,8 @@ namespace ts { (type).declaredProperties = getNamedMembers(symbol.members); (type).declaredCallSignatures = getSignaturesOfSymbol(symbol.members["__call"]); (type).declaredConstructSignatures = getSignaturesOfSymbol(symbol.members["__new"]); - (type).declaredStringIndexType = getIndexTypeOfSymbol(symbol, IndexKind.String); - (type).declaredNumberIndexType = getIndexTypeOfSymbol(symbol, IndexKind.Number); + (type).declaredStringIndexInfo = getIndexInfoOfSymbol(symbol, IndexKind.String); + (type).declaredNumberIndexInfo = getIndexInfoOfSymbol(symbol, IndexKind.Number); } return type; } @@ -3362,15 +3364,15 @@ namespace ts { let members = source.symbol.members; let callSignatures = source.declaredCallSignatures; let constructSignatures = source.declaredConstructSignatures; - let stringIndexType = source.declaredStringIndexType; - let numberIndexType = source.declaredNumberIndexType; + let stringIndexInfo = source.declaredStringIndexInfo; + let numberIndexInfo = source.declaredNumberIndexInfo; if (!rangeEquals(typeParameters, typeArguments, 0, typeParameters.length)) { mapper = createTypeMapper(typeParameters, typeArguments); members = createInstantiatedSymbolTable(source.declaredProperties, mapper, /*mappingThisOnly*/ typeParameters.length === 1); callSignatures = instantiateList(source.declaredCallSignatures, mapper, instantiateSignature); constructSignatures = instantiateList(source.declaredConstructSignatures, mapper, instantiateSignature); - stringIndexType = instantiateType(source.declaredStringIndexType, mapper); - numberIndexType = instantiateType(source.declaredNumberIndexType, mapper); + stringIndexInfo = instantiateIndexInfo(source.declaredStringIndexInfo, mapper); + numberIndexInfo = instantiateIndexInfo(source.declaredNumberIndexInfo, mapper); } const baseTypes = getBaseTypes(source); if (baseTypes.length) { @@ -3383,11 +3385,11 @@ namespace ts { addInheritedMembers(members, getPropertiesOfObjectType(instantiatedBaseType)); callSignatures = concatenate(callSignatures, getSignaturesOfType(instantiatedBaseType, SignatureKind.Call)); constructSignatures = concatenate(constructSignatures, getSignaturesOfType(instantiatedBaseType, SignatureKind.Construct)); - stringIndexType = stringIndexType || getIndexTypeOfType(instantiatedBaseType, IndexKind.String); - numberIndexType = numberIndexType || getIndexTypeOfType(instantiatedBaseType, IndexKind.Number); + stringIndexInfo = stringIndexInfo || getIndexInfoOfType(instantiatedBaseType, IndexKind.String); + numberIndexInfo = numberIndexInfo || getIndexInfoOfType(instantiatedBaseType, IndexKind.Number); } } - setObjectTypeMembers(type, members, callSignatures, constructSignatures, stringIndexType, numberIndexType); + setObjectTypeMembers(type, members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo); } function resolveClassOrInterfaceMembers(type: InterfaceType): void { @@ -3458,7 +3460,7 @@ namespace ts { const arrayType = resolveStructuredTypeMembers(createTypeFromGenericGlobalType(globalArrayType, [arrayElementType, type])); const members = createTupleTypeMemberSymbols(type.elementTypes); addInheritedMembers(members, arrayType.properties); - setObjectTypeMembers(type, members, arrayType.callSignatures, arrayType.constructSignatures, arrayType.stringIndexType, arrayType.numberIndexType); + setObjectTypeMembers(type, members, arrayType.callSignatures, arrayType.constructSignatures, arrayType.stringIndexInfo, arrayType.numberIndexInfo); } function findMatchingSignature(signatureList: Signature[], signature: Signature, partialMatch: boolean, ignoreReturnTypes: boolean): Signature { @@ -3526,16 +3528,18 @@ namespace ts { return result || emptyArray; } - function getUnionIndexType(types: Type[], kind: IndexKind): Type { + function getUnionIndexInfo(types: Type[], kind: IndexKind): IndexInfo { const indexTypes: Type[] = []; + let isAnyReadonly = false; for (const type of types) { - const indexType = getIndexTypeOfType(type, kind); - if (!indexType) { + const indexInfo = getIndexInfoOfType(type, kind); + if (!indexInfo) { return undefined; } - indexTypes.push(indexType); + indexTypes.push(indexInfo.type); + isAnyReadonly = isAnyReadonly || indexInfo.isReadonly; } - return getUnionType(indexTypes); + return createIndexInfo(getUnionType(indexTypes), isAnyReadonly); } function resolveUnionTypeMembers(type: UnionType) { @@ -3543,29 +3547,34 @@ namespace ts { // type use getPropertiesOfType (only the language service uses this). const callSignatures = getUnionSignatures(type.types, SignatureKind.Call); const constructSignatures = getUnionSignatures(type.types, SignatureKind.Construct); - const stringIndexType = getUnionIndexType(type.types, IndexKind.String); - const numberIndexType = getUnionIndexType(type.types, IndexKind.Number); - setObjectTypeMembers(type, emptySymbols, callSignatures, constructSignatures, stringIndexType, numberIndexType); + const stringIndexInfo = getUnionIndexInfo(type.types, IndexKind.String); + const numberIndexInfo = getUnionIndexInfo(type.types, IndexKind.Number); + setObjectTypeMembers(type, emptySymbols, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo); } function intersectTypes(type1: Type, type2: Type): Type { return !type1 ? type2 : !type2 ? type1 : getIntersectionType([type1, type2]); } + function intersectIndexInfos(info1: IndexInfo, info2: IndexInfo): IndexInfo { + return !info1 ? info2 : !info2 ? info1 : createIndexInfo( + getIntersectionType([info1.type, info2.type]), info1.isReadonly && info2.isReadonly); + } + function resolveIntersectionTypeMembers(type: IntersectionType) { // The members and properties collections are empty for intersection types. To get all properties of an // intersection type use getPropertiesOfType (only the language service uses this). let callSignatures: Signature[] = emptyArray; let constructSignatures: Signature[] = emptyArray; - let stringIndexType: Type = undefined; - let numberIndexType: Type = undefined; + let stringIndexInfo: IndexInfo = undefined; + let numberIndexInfo: IndexInfo = undefined; for (const t of type.types) { callSignatures = concatenate(callSignatures, getSignaturesOfType(t, SignatureKind.Call)); constructSignatures = concatenate(constructSignatures, getSignaturesOfType(t, SignatureKind.Construct)); - stringIndexType = intersectTypes(stringIndexType, getIndexTypeOfType(t, IndexKind.String)); - numberIndexType = intersectTypes(numberIndexType, getIndexTypeOfType(t, IndexKind.Number)); + stringIndexInfo = intersectIndexInfos(stringIndexInfo, getIndexInfoOfType(t, IndexKind.String)); + numberIndexInfo = intersectIndexInfos(numberIndexInfo, getIndexInfoOfType(t, IndexKind.Number)); } - setObjectTypeMembers(type, emptySymbols, callSignatures, constructSignatures, stringIndexType, numberIndexType); + setObjectTypeMembers(type, emptySymbols, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo); } function resolveAnonymousTypeMembers(type: AnonymousType) { @@ -3574,17 +3583,17 @@ namespace ts { const members = createInstantiatedSymbolTable(getPropertiesOfObjectType(type.target), type.mapper, /*mappingThisOnly*/ false); const callSignatures = instantiateList(getSignaturesOfType(type.target, SignatureKind.Call), type.mapper, instantiateSignature); const constructSignatures = instantiateList(getSignaturesOfType(type.target, SignatureKind.Construct), type.mapper, instantiateSignature); - const stringIndexType = instantiateType(getIndexTypeOfType(type.target, IndexKind.String), type.mapper); - const numberIndexType = instantiateType(getIndexTypeOfType(type.target, IndexKind.Number), type.mapper); - setObjectTypeMembers(type, members, callSignatures, constructSignatures, stringIndexType, numberIndexType); + const stringIndexInfo = instantiateIndexInfo(getIndexInfoOfType(type.target, IndexKind.String), type.mapper); + const numberIndexInfo = instantiateIndexInfo(getIndexInfoOfType(type.target, IndexKind.Number), type.mapper); + setObjectTypeMembers(type, members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo); } else if (symbol.flags & SymbolFlags.TypeLiteral) { const members = symbol.members; const callSignatures = getSignaturesOfSymbol(members["__call"]); const constructSignatures = getSignaturesOfSymbol(members["__new"]); - const stringIndexType = getIndexTypeOfSymbol(symbol, IndexKind.String); - const numberIndexType = getIndexTypeOfSymbol(symbol, IndexKind.Number); - setObjectTypeMembers(type, members, callSignatures, constructSignatures, stringIndexType, numberIndexType); + const stringIndexInfo = getIndexInfoOfSymbol(symbol, IndexKind.String); + const numberIndexInfo = getIndexInfoOfSymbol(symbol, IndexKind.Number); + setObjectTypeMembers(type, members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo); } else { // Combinations of function, class, enum and module @@ -3605,8 +3614,8 @@ namespace ts { addInheritedMembers(members, getPropertiesOfObjectType(baseConstructorType)); } } - const numberIndexType = (symbol.flags & SymbolFlags.Enum) ? stringType : undefined; - setObjectTypeMembers(type, members, emptyArray, constructSignatures, undefined, numberIndexType); + const numberIndexInfo = symbol.flags & SymbolFlags.Enum ? enumNumberIndexInfo : undefined; + setObjectTypeMembers(type, members, emptyArray, constructSignatures, undefined, numberIndexInfo); // We resolve the members before computing the signatures because a signature may use // typeof with a qualified name expression that circularly references the type we are // in the process of resolving (see issue #6072). The temporarily empty signature list @@ -3825,13 +3834,25 @@ namespace ts { function getSignaturesOfType(type: Type, kind: SignatureKind): Signature[] { return getSignaturesOfStructuredType(getApparentType(type), kind); } - function getIndexTypeOfStructuredType(type: Type, kind: IndexKind): Type { + + function getIndexInfoOfStructuredType(type: Type, kind: IndexKind): IndexInfo { if (type.flags & TypeFlags.StructuredType) { const resolved = resolveStructuredTypeMembers(type); - return kind === IndexKind.String ? resolved.stringIndexType : resolved.numberIndexType; + return kind === IndexKind.String ? resolved.stringIndexInfo : resolved.numberIndexInfo; } } + function getIndexTypeOfStructuredType(type: Type, kind: IndexKind): Type { + const info = getIndexInfoOfStructuredType(type, kind); + return info && info.type; + } + + // Return the indexing info of the given kind in the given type. Creates synthetic union index types when necessary and + // maps primitive types and type parameters are to their apparent types. + function getIndexInfoOfType(type: Type, kind: IndexKind): IndexInfo { + return getIndexInfoOfStructuredType(getApparentType(type), kind); + } + // Return the index type of the given kind in the given type. Creates synthetic union index types when necessary and // maps primitive types and type parameters are to their apparent types. function getIndexTypeOfType(type: Type, kind: IndexKind): Type { @@ -4104,11 +4125,17 @@ namespace ts { return undefined; } - function getIndexTypeOfSymbol(symbol: Symbol, kind: IndexKind): Type { + function createIndexInfo(type: Type, isReadonly: boolean): IndexInfo { + return { type, isReadonly }; + } + + function getIndexInfoOfSymbol(symbol: Symbol, kind: IndexKind): IndexInfo { const declaration = getIndexDeclarationOfSymbol(symbol, kind); - return declaration - ? declaration.type ? getTypeFromTypeNode(declaration.type) : anyType - : undefined; + if (declaration) { + return createIndexInfo(declaration.type ? getTypeFromTypeNode(declaration.type) : anyType, + (declaration.flags & NodeFlags.Readonly) !== 0); + } + return undefined; } function getConstraintDeclaration(type: TypeParameter) { @@ -4845,6 +4872,10 @@ namespace ts { return type; } + function instantiateIndexInfo(info: IndexInfo, mapper: TypeMapper): IndexInfo { + return info && createIndexInfo(instantiateType(info.type, mapper), info.isReadonly); + } + // Returns true if the given expression contains (at any level of nesting) a function or arrow expression // that is subject to contextual typing. function isContextSensitive(node: Expression | MethodDeclaration | ObjectLiteralElement): boolean { @@ -5251,7 +5282,7 @@ namespace ts { if (type.flags & TypeFlags.ObjectType) { const resolved = resolveStructuredTypeMembers(type); if (relation === assignableRelation && (type === globalObjectType || resolved.properties.length === 0) || - resolved.stringIndexType || resolved.numberIndexType || getPropertyOfType(type, name)) { + resolved.stringIndexInfo || resolved.numberIndexInfo || getPropertyOfType(type, name)) { return true; } } @@ -6020,8 +6051,8 @@ namespace ts { regularType.properties = (type).properties; regularType.callSignatures = (type).callSignatures; regularType.constructSignatures = (type).constructSignatures; - regularType.stringIndexType = (type).stringIndexType; - regularType.numberIndexType = (type).numberIndexType; + regularType.stringIndexInfo = (type).stringIndexInfo; + regularType.numberIndexInfo = (type).numberIndexInfo; (type).regularType = regularType; } return regularType; @@ -6046,11 +6077,11 @@ namespace ts { } members[p.name] = p; }); - let stringIndexType = getIndexTypeOfType(type, IndexKind.String); - let numberIndexType = getIndexTypeOfType(type, IndexKind.Number); - if (stringIndexType) stringIndexType = getWidenedType(stringIndexType); - if (numberIndexType) numberIndexType = getWidenedType(numberIndexType); - return createAnonymousType(type.symbol, members, emptyArray, emptyArray, stringIndexType, numberIndexType); + const stringIndexInfo = getIndexInfoOfType(type, IndexKind.String); + const numberIndexInfo = getIndexInfoOfType(type, IndexKind.Number); + return createAnonymousType(type.symbol, members, emptyArray, emptyArray, + stringIndexInfo && createIndexInfo(getWidenedType(stringIndexInfo.type), stringIndexInfo.isReadonly), + numberIndexInfo && createIndexInfo(getWidenedType(numberIndexInfo.type), numberIndexInfo.isReadonly)); } function getWidenedType(type: Type): Type { @@ -7428,7 +7459,7 @@ namespace ts { // Return true if the given contextual type provides an index signature of the given kind function contextualTypeHasIndexSignature(type: Type, kind: IndexKind): boolean { - return !!(type.flags & TypeFlags.Union ? forEach((type).types, t => getIndexTypeOfStructuredType(t, kind)) : getIndexTypeOfStructuredType(type, kind)); + return !!(type.flags & TypeFlags.Union ? forEach((type).types, t => getIndexInfoOfStructuredType(t, kind)) : getIndexInfoOfStructuredType(type, kind)); } // In an object literal contextually typed by a type T, the contextual type of a property assignment is the type of @@ -7923,9 +7954,9 @@ namespace ts { } } - const stringIndexType = getIndexType(IndexKind.String); - const numberIndexType = getIndexType(IndexKind.Number); - const result = createAnonymousType(node.symbol, propertiesTable, emptyArray, emptyArray, stringIndexType, numberIndexType); + const stringIndexInfo = getIndexInfo(IndexKind.String); + const numberIndexInfo = getIndexInfo(IndexKind.Number); + const result = createAnonymousType(node.symbol, propertiesTable, emptyArray, emptyArray, stringIndexInfo, numberIndexInfo); const freshObjectLiteralFlag = compilerOptions.suppressExcessPropertyErrors ? 0 : TypeFlags.FreshObjectLiteral; result.flags |= TypeFlags.ObjectLiteral | TypeFlags.ContainsObjectLiteral | freshObjectLiteralFlag | (typeFlags & TypeFlags.PropagatingFlags) | (patternWithComputedProperties ? TypeFlags.ObjectLiteralPatternWithComputedProperties : 0); if (inDestructuringPattern) { @@ -7933,7 +7964,7 @@ namespace ts { } return result; - function getIndexType(kind: IndexKind) { + function getIndexInfo(kind: IndexKind) { if (contextualType && contextualTypeHasIndexSignature(contextualType, kind)) { const propTypes: Type[] = []; for (let i = 0; i < propertiesArray.length; i++) { @@ -7949,9 +7980,9 @@ namespace ts { } } } - const result = propTypes.length ? getUnionType(propTypes) : undefinedType; - typeFlags |= result.flags; - return result; + const unionType = propTypes.length ? getUnionType(propTypes) : undefinedType; + typeFlags |= unionType.flags; + return createIndexInfo(unionType, /*isReadonly*/ false); } return undefined; } @@ -8321,7 +8352,7 @@ namespace ts { return links.resolvedJsxType = getTypeOfSymbol(sym); } else if (links.jsxFlags & JsxFlags.IntrinsicIndexedElement) { - return links.resolvedJsxType = getIndexTypeOfSymbol(sym, IndexKind.String); + return links.resolvedJsxType = getIndexInfoOfSymbol(sym, IndexKind.String).type; } else { // Resolution failed, so we don't know @@ -8956,7 +8987,7 @@ namespace ts { if (type.flags & TypeFlags.ObjectType) { const resolved = resolveStructuredTypeMembers(type); if (resolved.callSignatures.length === 1 && resolved.constructSignatures.length === 0 && - resolved.properties.length === 0 && !resolved.stringIndexType && !resolved.numberIndexType) { + resolved.properties.length === 0 && !resolved.stringIndexInfo && !resolved.numberIndexInfo) { return resolved.callSignatures[0]; } } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index f6216664d2e..1ccb9e4067c 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -2175,8 +2175,8 @@ namespace ts { declaredProperties: Symbol[]; // Declared members declaredCallSignatures: Signature[]; // Declared call signatures declaredConstructSignatures: Signature[]; // Declared construct signatures - declaredStringIndexType: Type; // Declared string index type - declaredNumberIndexType: Type; // Declared numeric index type + declaredStringIndexInfo: IndexInfo; // Declared string indexing info + declaredNumberIndexInfo: IndexInfo; // Declared numeric indexing info } // Type references (TypeFlags.Reference). When a class or interface has type parameters or @@ -2228,8 +2228,8 @@ namespace ts { properties: Symbol[]; // Properties callSignatures: Signature[]; // Call signatures of type constructSignatures: Signature[]; // Construct signatures of type - stringIndexType?: Type; // String index type - numberIndexType?: Type; // Numeric index type + stringIndexInfo?: IndexInfo; // String indexing info + numberIndexInfo?: IndexInfo; // Numeric indexing info } /* @internal */ @@ -2292,6 +2292,11 @@ namespace ts { Number, } + export interface IndexInfo { + type: Type; + isReadonly: boolean; + } + /* @internal */ export interface TypeMapper { (t: TypeParameter): Type; From b8cd0e5964f4b999222cbbe6ef1e3da78885d65c Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Mon, 18 Jan 2016 08:58:00 -0800 Subject: [PATCH 042/160] Support readonly indexers + include readonly modifier in typeToString --- src/compiler/checker.ts | 167 ++++++++++++++------------- src/compiler/diagnosticMessages.json | 4 + src/compiler/types.ts | 2 + 3 files changed, 94 insertions(+), 79 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 1f815a6fd3e..75751b45458 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -133,7 +133,7 @@ namespace ts { const anySignature = createSignature(undefined, undefined, emptyArray, anyType, 0, /*hasRestParameter*/ false, /*hasStringLiterals*/ false); const unknownSignature = createSignature(undefined, undefined, emptyArray, unknownType, 0, /*hasRestParameter*/ false, /*hasStringLiterals*/ false); - const enumNumberIndexInfo = createIndexInfo(stringType, /*isReadonly*/ true); + const enumNumberIndexInfo = createIndexInfo(stringType, /*isReadonly*/ false); const globals: SymbolTable = {}; @@ -1956,15 +1956,35 @@ namespace ts { buildSymbolDisplay(type.symbol, writer, enclosingDeclaration, SymbolFlags.Value, SymbolFormatFlags.None, typeFormatFlags); } - function getIndexerParameterName(type: ObjectType, indexKind: IndexKind, fallbackName: string): string { - const declaration = getIndexDeclarationOfSymbol(type.symbol, indexKind); - if (!declaration) { - // declaration might not be found if indexer was added from the contextual type. - // in this case use fallback name - return fallbackName; + function writeIndexSignature(info: IndexInfo, keyword: SyntaxKind) { + if (info) { + if (info.isReadonly) { + writeKeyword(writer, SyntaxKind.ReadonlyKeyword); + writeSpace(writer); + } + writePunctuation(writer, SyntaxKind.OpenBracketToken); + writer.writeParameter(info.declaration ? declarationNameToString(info.declaration.parameters[0].name) : "x"); + writePunctuation(writer, SyntaxKind.ColonToken); + writeSpace(writer); + writeKeyword(writer, keyword); + writePunctuation(writer, SyntaxKind.CloseBracketToken); + writePunctuation(writer, SyntaxKind.ColonToken); + writeSpace(writer); + writeType(info.type, TypeFormatFlags.None); + writePunctuation(writer, SyntaxKind.SemicolonToken); + writer.writeLine(); + } + } + + function writePropertyWithModifiers(prop: Symbol) { + if (isReadonlySymbol(prop)) { + writeKeyword(writer, SyntaxKind.ReadonlyKeyword); + writeSpace(writer); + } + buildSymbolDisplay(prop, writer); + if (prop.flags & SymbolFlags.Optional) { + writePunctuation(writer, SyntaxKind.QuestionToken); } - Debug.assert(declaration.parameters.length !== 0); - return declarationNameToString(declaration.parameters[0].name); } function writeLiteralType(type: ObjectType, flags: TypeFormatFlags) { @@ -2015,53 +2035,21 @@ namespace ts { writePunctuation(writer, SyntaxKind.SemicolonToken); writer.writeLine(); } - if (resolved.stringIndexInfo) { - // [x: string]: - writePunctuation(writer, SyntaxKind.OpenBracketToken); - writer.writeParameter(getIndexerParameterName(resolved, IndexKind.String, /*fallbackName*/"x")); - writePunctuation(writer, SyntaxKind.ColonToken); - writeSpace(writer); - writeKeyword(writer, SyntaxKind.StringKeyword); - writePunctuation(writer, SyntaxKind.CloseBracketToken); - writePunctuation(writer, SyntaxKind.ColonToken); - writeSpace(writer); - writeType(resolved.stringIndexInfo.type, TypeFormatFlags.None); - writePunctuation(writer, SyntaxKind.SemicolonToken); - writer.writeLine(); - } - if (resolved.numberIndexInfo) { - // [x: number]: - writePunctuation(writer, SyntaxKind.OpenBracketToken); - writer.writeParameter(getIndexerParameterName(resolved, IndexKind.Number, /*fallbackName*/"x")); - writePunctuation(writer, SyntaxKind.ColonToken); - writeSpace(writer); - writeKeyword(writer, SyntaxKind.NumberKeyword); - writePunctuation(writer, SyntaxKind.CloseBracketToken); - writePunctuation(writer, SyntaxKind.ColonToken); - writeSpace(writer); - writeType(resolved.numberIndexInfo.type, TypeFormatFlags.None); - writePunctuation(writer, SyntaxKind.SemicolonToken); - writer.writeLine(); - } + writeIndexSignature(resolved.stringIndexInfo, SyntaxKind.StringKeyword); + writeIndexSignature(resolved.numberIndexInfo, SyntaxKind.NumberKeyword); for (const p of resolved.properties) { const t = getTypeOfSymbol(p); if (p.flags & (SymbolFlags.Function | SymbolFlags.Method) && !getPropertiesOfObjectType(t).length) { const signatures = getSignaturesOfType(t, SignatureKind.Call); for (const signature of signatures) { - buildSymbolDisplay(p, writer); - if (p.flags & SymbolFlags.Optional) { - writePunctuation(writer, SyntaxKind.QuestionToken); - } + writePropertyWithModifiers(p); buildSignatureDisplay(signature, writer, enclosingDeclaration, globalFlagsToPass, /*kind*/ undefined, symbolStack); writePunctuation(writer, SyntaxKind.SemicolonToken); writer.writeLine(); } } else { - buildSymbolDisplay(p, writer); - if (p.flags & SymbolFlags.Optional) { - writePunctuation(writer, SyntaxKind.QuestionToken); - } + writePropertyWithModifiers(p); writePunctuation(writer, SyntaxKind.ColonToken); writeSpace(writer); writeType(t, TypeFormatFlags.None); @@ -4125,15 +4113,15 @@ namespace ts { return undefined; } - function createIndexInfo(type: Type, isReadonly: boolean): IndexInfo { - return { type, isReadonly }; + function createIndexInfo(type: Type, isReadonly: boolean, declaration?: SignatureDeclaration): IndexInfo { + return { type, isReadonly, declaration }; } function getIndexInfoOfSymbol(symbol: Symbol, kind: IndexKind): IndexInfo { const declaration = getIndexDeclarationOfSymbol(symbol, kind); if (declaration) { return createIndexInfo(declaration.type ? getTypeFromTypeNode(declaration.type) : anyType, - (declaration.flags & NodeFlags.Readonly) !== 0); + (declaration.flags & NodeFlags.Readonly) !== 0, declaration); } return undefined; } @@ -4873,7 +4861,7 @@ namespace ts { } function instantiateIndexInfo(info: IndexInfo, mapper: TypeMapper): IndexInfo { - return info && createIndexInfo(instantiateType(info.type, mapper), info.isReadonly); + return info && createIndexInfo(instantiateType(info.type, mapper), info.isReadonly, info.declaration); } // Returns true if the given expression contains (at any level of nesting) a function or arrow expression @@ -5739,27 +5727,34 @@ namespace ts { if (relation === identityRelation) { return indexTypesIdenticalTo(IndexKind.String, source, target); } - const targetType = getIndexTypeOfType(target, IndexKind.String); - if (targetType) { - if ((targetType.flags & TypeFlags.Any) && !(originalSource.flags & TypeFlags.Primitive)) { + const targetInfo = getIndexInfoOfType(target, IndexKind.String); + if (targetInfo) { + if ((targetInfo.type.flags & TypeFlags.Any) && !(originalSource.flags & TypeFlags.Primitive)) { // non-primitive assignment to any is always allowed, eg // `var x: { [index: string]: any } = { property: 12 };` return Ternary.True; } - const sourceType = getIndexTypeOfType(source, IndexKind.String); - if (!sourceType) { + const sourceInfo = getIndexInfoOfType(source, IndexKind.String); + if (!sourceInfo) { if (reportErrors) { reportError(Diagnostics.Index_signature_is_missing_in_type_0, typeToString(source)); } return Ternary.False; } - const related = isRelatedTo(sourceType, targetType, reportErrors); + const related = isRelatedTo(sourceInfo.type, targetInfo.type, reportErrors); if (!related) { if (reportErrors) { reportError(Diagnostics.Index_signatures_are_incompatible); } return Ternary.False; } + if (sourceInfo.isReadonly && !targetInfo.isReadonly) { + if (reportErrors) { + reportError(Diagnostics.Index_signature_is_read_only_in_type_0_but_read_write_in_type_1, + typeToString(source), typeToString(target)); + } + return Ternary.False; + } return related; } return Ternary.True; @@ -5769,28 +5764,29 @@ namespace ts { if (relation === identityRelation) { return indexTypesIdenticalTo(IndexKind.Number, source, target); } - const targetType = getIndexTypeOfType(target, IndexKind.Number); - if (targetType) { - if ((targetType.flags & TypeFlags.Any) && !(originalSource.flags & TypeFlags.Primitive)) { + const targetInfo = getIndexInfoOfType(target, IndexKind.Number); + if (targetInfo) { + if ((targetInfo.type.flags & TypeFlags.Any) && !(originalSource.flags & TypeFlags.Primitive)) { // non-primitive assignment to any is always allowed, eg // `var x: { [index: number]: any } = { property: 12 };` return Ternary.True; } - const sourceStringType = getIndexTypeOfType(source, IndexKind.String); - const sourceNumberType = getIndexTypeOfType(source, IndexKind.Number); - if (!(sourceStringType || sourceNumberType)) { + const sourceStringInfo = getIndexInfoOfType(source, IndexKind.String); + const sourceNumberInfo = getIndexInfoOfType(source, IndexKind.Number); + if (!(sourceStringInfo || sourceNumberInfo)) { if (reportErrors) { reportError(Diagnostics.Index_signature_is_missing_in_type_0, typeToString(source)); } return Ternary.False; } let related: Ternary; - if (sourceStringType && sourceNumberType) { + if (sourceStringInfo && sourceNumberInfo) { // If we know for sure we're testing both string and numeric index types then only report errors from the second one - related = isRelatedTo(sourceStringType, targetType, /*reportErrors*/ false) || isRelatedTo(sourceNumberType, targetType, reportErrors); + related = isRelatedTo(sourceStringInfo.type, targetInfo.type, /*reportErrors*/ false) || + isRelatedTo(sourceNumberInfo.type, targetInfo.type, reportErrors); } else { - related = isRelatedTo(sourceStringType || sourceNumberType, targetType, reportErrors); + related = isRelatedTo((sourceStringInfo || sourceNumberInfo).type, targetInfo.type, reportErrors); } if (!related) { if (reportErrors) { @@ -5798,19 +5794,26 @@ namespace ts { } return Ternary.False; } + if ((sourceStringInfo && sourceStringInfo.isReadonly || sourceNumberInfo && sourceNumberInfo.isReadonly) && !targetInfo.isReadonly) { + if (reportErrors) { + reportError(Diagnostics.Index_signature_is_read_only_in_type_0_but_read_write_in_type_1, + typeToString(source), typeToString(target)); + } + return Ternary.False; + } return related; } return Ternary.True; } function indexTypesIdenticalTo(indexKind: IndexKind, source: Type, target: Type): Ternary { - const targetType = getIndexTypeOfType(target, indexKind); - const sourceType = getIndexTypeOfType(source, indexKind); - if (!sourceType && !targetType) { + const targetInfo = getIndexInfoOfType(target, indexKind); + const sourceInfo = getIndexInfoOfType(source, indexKind); + if (!sourceInfo && !targetInfo) { return Ternary.True; } - if (sourceType && targetType) { - return isRelatedTo(sourceType, targetType); + if (sourceInfo && targetInfo && sourceInfo.isReadonly === targetInfo.isReadonly) { + return isRelatedTo(sourceInfo.type, targetInfo.type); } return Ternary.False; } @@ -8719,16 +8722,18 @@ namespace ts { // Try to use a number indexer. if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, TypeFlags.NumberLike) || isForInVariableForNumericPropertyNames(node.argumentExpression)) { - const numberIndexType = getIndexTypeOfType(objectType, IndexKind.Number); - if (numberIndexType) { - return numberIndexType; + const numberIndexInfo = getIndexInfoOfType(objectType, IndexKind.Number); + if (numberIndexInfo) { + getNodeLinks(node).resolvedIndexInfo = numberIndexInfo; + return numberIndexInfo.type; } } // Try to use string indexing. - const stringIndexType = getIndexTypeOfType(objectType, IndexKind.String); - if (stringIndexType) { - return stringIndexType; + const stringIndexInfo = getIndexInfoOfType(objectType, IndexKind.String); + if (stringIndexInfo) { + getNodeLinks(node).resolvedIndexInfo = stringIndexInfo; + return stringIndexInfo.type; } // Fall back to any. @@ -10384,10 +10389,11 @@ namespace ts { error(expr, invalidReferenceMessage); return false; } - // Because we got the symbol from the resolvedSymbol property, it might be of kind + // Because we get the symbol from the resolvedSymbol property, it might be of kind // SymbolFlags.ExportValue. In this case it is necessary to get the actual export // symbol, which will have the correct flags set on it. - const symbol = getExportSymbolOfValueSymbolIfExported(getNodeLinks(node).resolvedSymbol); + const links = getNodeLinks(node); + const symbol = getExportSymbolOfValueSymbolIfExported(links.resolvedSymbol); if (symbol) { if (symbol !== unknownSymbol && symbol !== argumentsSymbol) { if (symbol === undefinedSymbol || !(symbol.flags & (SymbolFlags.Variable | SymbolFlags.Property | SymbolFlags.Method | SymbolFlags.Accessor))) { @@ -10400,8 +10406,11 @@ namespace ts { } } } - else { - // Check indexers + else if (node.kind === SyntaxKind.ElementAccessExpression) { + if (links.resolvedIndexInfo && links.resolvedIndexInfo.isReadonly) { + error(expr, constantVariableMessage); + return false; + } } return true; } diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 98a05f5a302..6599a35f494 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1083,6 +1083,10 @@ "category": "Error", "code": 2365 }, + "Index signature is read-only in type '{0}' but read-write in type '{1}'.": { + "category": "Error", + "code": 2366 + }, "Type parameter name cannot be '{0}'": { "category": "Error", "code": 2368 diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 1ccb9e4067c..0a8cbb3abd3 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -2068,6 +2068,7 @@ namespace ts { resolvedAwaitedType?: Type; // Cached awaited type of type node resolvedSignature?: Signature; // Cached signature of signature node or call expression resolvedSymbol?: Symbol; // Cached name resolution result + resolvedIndexInfo?: IndexInfo; // Cached indexing info resolution result flags?: NodeCheckFlags; // Set of flags specific to Node enumMemberValue?: number; // Constant value of enum member isVisible?: boolean; // Is this node visible @@ -2295,6 +2296,7 @@ namespace ts { export interface IndexInfo { type: Type; isReadonly: boolean; + declaration?: SignatureDeclaration; } /* @internal */ From 17b5899f3fe200df91f1545c0fd486290cccf122 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Mon, 18 Jan 2016 08:58:25 -0800 Subject: [PATCH 043/160] Fixing fourslash test --- .../cases/fourslash/quickInfoOnObjectLiteralWithOnlyGetter.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/cases/fourslash/quickInfoOnObjectLiteralWithOnlyGetter.ts b/tests/cases/fourslash/quickInfoOnObjectLiteralWithOnlyGetter.ts index 53f5e6988b7..a2e783d9ce0 100644 --- a/tests/cases/fourslash/quickInfoOnObjectLiteralWithOnlyGetter.ts +++ b/tests/cases/fourslash/quickInfoOnObjectLiteralWithOnlyGetter.ts @@ -9,7 +9,7 @@ ////var /*2*/x = point./*3*/x; goTo.marker('1'); -verify.quickInfoIs("function makePoint(x: number): {\n x: number;\n}", undefined); +verify.quickInfoIs("function makePoint(x: number): {\n readonly x: number;\n}", undefined); goTo.marker('2'); verify.quickInfoIs("var x: number", undefined); @@ -18,4 +18,4 @@ goTo.marker('3'); verify.memberListContains("x", "(property) x: number", undefined); goTo.marker('4'); -verify.quickInfoIs("var point: {\n x: number;\n}", undefined); +verify.quickInfoIs("var point: {\n readonly x: number;\n}", undefined); From 13f763d33c9568c0926cd18b980f81e2b73229a1 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Mon, 18 Jan 2016 08:58:36 -0800 Subject: [PATCH 044/160] Accepting new baselines --- tests/baselines/reference/accessorWithES5.types | 4 ++-- .../reference/commentsOnObjectLiteral4.types | 4 ++-- .../reference/computedPropertyNames11_ES5.types | 4 ++-- .../reference/computedPropertyNames11_ES6.types | 4 ++-- .../reference/declFileObjectLiteralWithOnlyGetter.js | 4 ++-- .../declFileObjectLiteralWithOnlyGetter.types | 12 ++++++------ tests/baselines/reference/downlevelLetConst18.types | 4 ++-- tests/baselines/reference/symbolProperty5.types | 4 ++-- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/tests/baselines/reference/accessorWithES5.types b/tests/baselines/reference/accessorWithES5.types index cb54e92b184..29471548918 100644 --- a/tests/baselines/reference/accessorWithES5.types +++ b/tests/baselines/reference/accessorWithES5.types @@ -21,8 +21,8 @@ class D { } var x = { ->x : { a: number; } ->{ get a() { return 1 }} : { a: number; } +>x : { readonly a: number; } +>{ get a() { return 1 }} : { readonly a: number; } get a() { return 1 } >a : number diff --git a/tests/baselines/reference/commentsOnObjectLiteral4.types b/tests/baselines/reference/commentsOnObjectLiteral4.types index 364df6e5ea1..f458d73ae36 100644 --- a/tests/baselines/reference/commentsOnObjectLiteral4.types +++ b/tests/baselines/reference/commentsOnObjectLiteral4.types @@ -1,8 +1,8 @@ === tests/cases/compiler/commentsOnObjectLiteral4.ts === var v = { ->v : { bar: number; } ->{ /** * @type {number} */ get bar(): number { return this._bar; }} : { bar: number; } +>v : { readonly bar: number; } +>{ /** * @type {number} */ get bar(): number { return this._bar; }} : { readonly bar: number; } /** * @type {number} diff --git a/tests/baselines/reference/computedPropertyNames11_ES5.types b/tests/baselines/reference/computedPropertyNames11_ES5.types index e0787fc3ee7..ae626ec3cba 100644 --- a/tests/baselines/reference/computedPropertyNames11_ES5.types +++ b/tests/baselines/reference/computedPropertyNames11_ES5.types @@ -9,8 +9,8 @@ var a: any; >a : any var v = { ->v : { [0]: number; [""]: any; } ->{ get [s]() { return 0; }, set [n](v) { }, get [s + s]() { return 0; }, set [s + n](v) { }, get [+s]() { return 0; }, set [""](v) { }, get [0]() { return 0; }, set [a](v) { }, get [true]() { return 0; }, set [`hello bye`](v) { }, get [`hello ${a} bye`]() { return 0; }} : { [0]: number; [""]: any; } +>v : { readonly [0]: number; [""]: any; } +>{ get [s]() { return 0; }, set [n](v) { }, get [s + s]() { return 0; }, set [s + n](v) { }, get [+s]() { return 0; }, set [""](v) { }, get [0]() { return 0; }, set [a](v) { }, get [true]() { return 0; }, set [`hello bye`](v) { }, get [`hello ${a} bye`]() { return 0; }} : { readonly [0]: number; [""]: any; } get [s]() { return 0; }, >s : string diff --git a/tests/baselines/reference/computedPropertyNames11_ES6.types b/tests/baselines/reference/computedPropertyNames11_ES6.types index 8ad31a7c2a1..06dc26e9843 100644 --- a/tests/baselines/reference/computedPropertyNames11_ES6.types +++ b/tests/baselines/reference/computedPropertyNames11_ES6.types @@ -9,8 +9,8 @@ var a: any; >a : any var v = { ->v : { [0]: number; [""]: any; } ->{ get [s]() { return 0; }, set [n](v) { }, get [s + s]() { return 0; }, set [s + n](v) { }, get [+s]() { return 0; }, set [""](v) { }, get [0]() { return 0; }, set [a](v) { }, get [true]() { return 0; }, set [`hello bye`](v) { }, get [`hello ${a} bye`]() { return 0; }} : { [0]: number; [""]: any; } +>v : { readonly [0]: number; [""]: any; } +>{ get [s]() { return 0; }, set [n](v) { }, get [s + s]() { return 0; }, set [s + n](v) { }, get [+s]() { return 0; }, set [""](v) { }, get [0]() { return 0; }, set [a](v) { }, get [true]() { return 0; }, set [`hello bye`](v) { }, get [`hello ${a} bye`]() { return 0; }} : { readonly [0]: number; [""]: any; } get [s]() { return 0; }, >s : string diff --git a/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.js b/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.js index 396ee75422e..eb440c028d5 100644 --- a/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.js +++ b/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.js @@ -22,9 +22,9 @@ var /*2*/ x = point.x; //// [declFileObjectLiteralWithOnlyGetter.d.ts] declare function makePoint(x: number): { - x: number; + readonly x: number; }; declare var point: { - x: number; + readonly x: number; }; declare var x: number; diff --git a/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.types b/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.types index c0fb7b763fc..dd3cbe20983 100644 --- a/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.types +++ b/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.types @@ -1,11 +1,11 @@ === tests/cases/compiler/declFileObjectLiteralWithOnlyGetter.ts === function /*1*/makePoint(x: number) { ->makePoint : (x: number) => { x: number; } +>makePoint : (x: number) => { readonly x: number; } >x : number return { ->{ get x() { return x; }, } : { x: number; } +>{ get x() { return x; }, } : { readonly x: number; } get x() { return x; }, >x : number @@ -14,14 +14,14 @@ function /*1*/makePoint(x: number) { }; }; var /*4*/point = makePoint(2); ->point : { x: number; } ->makePoint(2) : { x: number; } ->makePoint : (x: number) => { x: number; } +>point : { readonly x: number; } +>makePoint(2) : { readonly x: number; } +>makePoint : (x: number) => { readonly x: number; } >2 : number var /*2*/x = point./*3*/x; >x : number >point./*3*/x : number ->point : { x: number; } +>point : { readonly x: number; } >x : number diff --git a/tests/baselines/reference/downlevelLetConst18.types b/tests/baselines/reference/downlevelLetConst18.types index 42421aa80c0..1f7be616124 100644 --- a/tests/baselines/reference/downlevelLetConst18.types +++ b/tests/baselines/reference/downlevelLetConst18.types @@ -54,8 +54,8 @@ for (let x; ;) { >x : any ({ get foo() { return x } }) ->({ get foo() { return x } }) : { foo: any; } ->{ get foo() { return x } } : { foo: any; } +>({ get foo() { return x } }) : { readonly foo: any; } +>{ get foo() { return x } } : { readonly foo: any; } >foo : any >x : any } diff --git a/tests/baselines/reference/symbolProperty5.types b/tests/baselines/reference/symbolProperty5.types index 4af020dca1b..b338f94f6d3 100644 --- a/tests/baselines/reference/symbolProperty5.types +++ b/tests/baselines/reference/symbolProperty5.types @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/Symbols/symbolProperty5.ts === var x = { ->x : { [Symbol.iterator]: number; [Symbol.toPrimitive](): void; [Symbol.toStringTag]: number; } ->{ [Symbol.iterator]: 0, [Symbol.toPrimitive]() { }, get [Symbol.toStringTag]() { return 0; }} : { [Symbol.iterator]: number; [Symbol.toPrimitive](): void; [Symbol.toStringTag]: number; } +>x : { [Symbol.iterator]: number; [Symbol.toPrimitive](): void; readonly [Symbol.toStringTag]: number; } +>{ [Symbol.iterator]: 0, [Symbol.toPrimitive]() { }, get [Symbol.toStringTag]() { return 0; }} : { [Symbol.iterator]: number; [Symbol.toPrimitive](): void; readonly [Symbol.toStringTag]: number; } [Symbol.iterator]: 0, >Symbol.iterator : symbol From 2a20e915e8850a47e059f5c1d12f866394ebd5e8 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Mon, 18 Jan 2016 16:58:09 -0800 Subject: [PATCH 045/160] Allow assignments to readonly properties in constructors --- src/compiler/checker.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 75751b45458..9fcf951ce83 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -10366,6 +10366,17 @@ namespace ts { return true; } + function isReferenceWithinOwnConstructor(expr: Expression, symbol: Symbol): boolean { + // Allow assignments to readonly properties or methods (but not readonly accessors) within constructors + // of the same class declaration. + if ((expr.kind === SyntaxKind.PropertyAccessExpression || expr.kind === SyntaxKind.ElementAccessExpression) && + (expr as PropertyAccessExpression | ElementAccessExpression).expression.kind === SyntaxKind.ThisKeyword && + symbol.flags & (SymbolFlags.Property | SymbolFlags.Method)) { + const func = getContainingFunction(expr); + return func && func.kind === SyntaxKind.Constructor && func.parent === symbol.valueDeclaration.parent; + } + } + function isReadonlySymbol(symbol: Symbol): boolean { if (symbol.flags & (SymbolFlags.Property | SymbolFlags.Method)) { return symbol === undefinedSymbol || (getDeclarationFlagsFromSymbol(symbol) & NodeFlags.Readonly) !== 0; @@ -10400,7 +10411,7 @@ namespace ts { error(expr, invalidReferenceMessage); return false; } - if (isReadonlySymbol(symbol) || isConstantSymbol(symbol)) { + if (isConstantSymbol(symbol) || (isReadonlySymbol(symbol) && !isReferenceWithinOwnConstructor(expr, symbol))) { error(expr, constantVariableMessage); return false; } From 01c96868697163cbb4f6f7135a882d14eeaa31e8 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Mon, 18 Jan 2016 17:35:10 -0800 Subject: [PATCH 046/160] Allow 'readonly' only on property and index signature declarations --- src/compiler/checker.ts | 9 +++------ src/compiler/diagnosticMessages.json | 4 ++++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 9fcf951ce83..937065cd559 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -10378,7 +10378,7 @@ namespace ts { } function isReadonlySymbol(symbol: Symbol): boolean { - if (symbol.flags & (SymbolFlags.Property | SymbolFlags.Method)) { + if (symbol.flags & SymbolFlags.Property) { return symbol === undefinedSymbol || (getDeclarationFlagsFromSymbol(symbol) & NodeFlags.Readonly) !== 0; } if (symbol.flags & SymbolFlags.Accessor) { @@ -15786,11 +15786,8 @@ namespace ts { if (flags & NodeFlags.Readonly) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "readonly"); } - else if (flags & NodeFlags.Async) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "readonly", "async"); - } - else if (node.parent.kind === SyntaxKind.ModuleBlock || node.parent.kind === SyntaxKind.SourceFile) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_element, "readonly"); + else if (node.kind !== SyntaxKind.PropertyDeclaration && node.kind !== SyntaxKind.PropertySignature && node.kind !== SyntaxKind.IndexSignature) { + return grammarErrorOnNode(modifier, Diagnostics.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature); } flags |= NodeFlags.Readonly; lastReadonly = modifier; diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 6599a35f494..fc4aae4ed30 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -67,6 +67,10 @@ "category": "Error", "code": 1023 }, + "'readonly' modifier can only appear on a property declaration or index signature.": { + "category": "Error", + "code": 1024 + }, "Accessibility modifier already seen.": { "category": "Error", "code": 1028 From d3be38ea2f027dd16a88aa2026bbb58ecbec2d38 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Mon, 18 Jan 2016 17:56:58 -0800 Subject: [PATCH 047/160] Updating error messages --- src/compiler/checker.ts | 15 +++++++++------ src/compiler/diagnosticMessages.json | 8 ++++---- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 937065cd559..e762d915cec 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -10476,7 +10476,7 @@ namespace ts { // run check only if former checks succeeded to avoid reporting cascading errors checkReferenceExpression(node.operand, Diagnostics.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_property_or_indexer, - Diagnostics.The_operand_of_an_increment_or_decrement_operator_cannot_be_a_constant); + Diagnostics.The_operand_of_an_increment_or_decrement_operator_cannot_be_a_constant_or_a_read_only_property); } return numberType; } @@ -10490,7 +10490,7 @@ namespace ts { // run check only if former checks succeeded to avoid reporting cascading errors checkReferenceExpression(node.operand, Diagnostics.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_property_or_indexer, - Diagnostics.The_operand_of_an_increment_or_decrement_operator_cannot_be_a_constant); + Diagnostics.The_operand_of_an_increment_or_decrement_operator_cannot_be_a_constant_or_a_read_only_property); } return numberType; } @@ -10681,7 +10681,7 @@ namespace ts { function checkReferenceAssignment(target: Expression, sourceType: Type, contextualMapper?: TypeMapper): Type { const targetType = checkExpression(target, contextualMapper); - if (checkReferenceExpression(target, Diagnostics.Invalid_left_hand_side_of_assignment_expression, Diagnostics.Left_hand_side_of_assignment_expression_cannot_be_a_constant)) { + if (checkReferenceExpression(target, Diagnostics.Invalid_left_hand_side_of_assignment_expression, Diagnostics.Left_hand_side_of_assignment_expression_cannot_be_a_constant_or_a_read_only_property)) { checkTypeAssignableTo(sourceType, targetType, target, /*headMessage*/ undefined); } return sourceType; @@ -10863,7 +10863,9 @@ namespace ts { // requires VarExpr to be classified as a reference // A compound assignment furthermore requires VarExpr to be classified as a reference (section 4.1) // and the type of the non - compound operation to be assignable to the type of VarExpr. - const ok = checkReferenceExpression(left, Diagnostics.Invalid_left_hand_side_of_assignment_expression, Diagnostics.Left_hand_side_of_assignment_expression_cannot_be_a_constant); + const ok = checkReferenceExpression(left, + Diagnostics.Invalid_left_hand_side_of_assignment_expression, + Diagnostics.Left_hand_side_of_assignment_expression_cannot_be_a_constant_or_a_read_only_property); // Use default messages if (ok) { // to avoid cascading errors check assignability only if 'isReference' check succeeded and no errors were reported @@ -12935,7 +12937,7 @@ namespace ts { else { const leftType = checkExpression(varExpr); checkReferenceExpression(varExpr, /*invalidReferenceMessage*/ Diagnostics.Invalid_left_hand_side_in_for_of_statement, - /*constantVariableMessage*/ Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_be_a_previously_defined_constant); + /*constantVariableMessage*/ Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_be_a_constant_or_a_read_only_property); // iteratedType will be undefined if the rightType was missing properties/signatures // required to get its iteratedType (like [Symbol.iterator] or next). This may be @@ -12982,7 +12984,8 @@ namespace ts { } else { // run check only former check succeeded to avoid cascading errors - checkReferenceExpression(varExpr, Diagnostics.Invalid_left_hand_side_in_for_in_statement, Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_previously_defined_constant); + checkReferenceExpression(varExpr, Diagnostics.Invalid_left_hand_side_in_for_in_statement, + Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_constant_or_a_read_only_property); } } diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index fc4aae4ed30..7392035ecda 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1395,11 +1395,11 @@ "category": "Error", "code": 2448 }, - "The operand of an increment or decrement operator cannot be a constant.": { + "The operand of an increment or decrement operator cannot be a constant or a read-only property.": { "category": "Error", "code": 2449 }, - "Left-hand side of assignment expression cannot be a constant.": { + "Left-hand side of assignment expression cannot be a constant or a read-only property.": { "category": "Error", "code": 2450 }, @@ -1531,11 +1531,11 @@ "category": "Error", "code": 2484 }, - "The left-hand side of a 'for...of' statement cannot be a previously defined constant.": { + "The left-hand side of a 'for...of' statement cannot be a constant or a read-only property.": { "category": "Error", "code": 2485 }, - "The left-hand side of a 'for...in' statement cannot be a previously defined constant.": { + "The left-hand side of a 'for...in' statement cannot be a constant or a read-only property.": { "category": "Error", "code": 2486 }, From 723475b656d95792d536d1e37acaf9ac94e65c34 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Mon, 18 Jan 2016 17:57:42 -0800 Subject: [PATCH 048/160] Accepting new baselines --- .../constDeclarations-access.errors.txt | 4 +- .../constDeclarations-access2.errors.txt | 68 +++++++++--------- .../constDeclarations-access3.errors.txt | 72 +++++++++---------- .../constDeclarations-access4.errors.txt | 72 +++++++++---------- .../constDeclarations-access5.errors.txt | 72 +++++++++---------- .../constDeclarations-errors.errors.txt | 4 +- tests/baselines/reference/for-of2.errors.txt | 4 +- 7 files changed, 148 insertions(+), 148 deletions(-) diff --git a/tests/baselines/reference/constDeclarations-access.errors.txt b/tests/baselines/reference/constDeclarations-access.errors.txt index 04b942aec09..3c748cc4a5f 100644 --- a/tests/baselines/reference/constDeclarations-access.errors.txt +++ b/tests/baselines/reference/constDeclarations-access.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/file2.ts(1,1): error TS2449: The operand of an increment or decrement operator cannot be a constant. +tests/cases/compiler/file2.ts(1,1): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. ==== tests/cases/compiler/file1.ts (0 errors) ==== @@ -8,4 +8,4 @@ tests/cases/compiler/file2.ts(1,1): error TS2449: The operand of an increment or ==== tests/cases/compiler/file2.ts (1 errors) ==== x++; ~ -!!! error TS2449: The operand of an increment or decrement operator cannot be a constant. \ No newline at end of file +!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. \ No newline at end of file diff --git a/tests/baselines/reference/constDeclarations-access2.errors.txt b/tests/baselines/reference/constDeclarations-access2.errors.txt index 6a360e11014..667f490a374 100644 --- a/tests/baselines/reference/constDeclarations-access2.errors.txt +++ b/tests/baselines/reference/constDeclarations-access2.errors.txt @@ -1,20 +1,20 @@ -tests/cases/compiler/constDeclarations-access2.ts(5,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations-access2.ts(6,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations-access2.ts(7,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations-access2.ts(8,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations-access2.ts(9,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations-access2.ts(10,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations-access2.ts(11,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations-access2.ts(12,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations-access2.ts(13,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations-access2.ts(14,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations-access2.ts(15,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations-access2.ts(16,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations-access2.ts(18,1): error TS2449: The operand of an increment or decrement operator cannot be a constant. -tests/cases/compiler/constDeclarations-access2.ts(19,1): error TS2449: The operand of an increment or decrement operator cannot be a constant. -tests/cases/compiler/constDeclarations-access2.ts(20,3): error TS2449: The operand of an increment or decrement operator cannot be a constant. -tests/cases/compiler/constDeclarations-access2.ts(21,3): error TS2449: The operand of an increment or decrement operator cannot be a constant. -tests/cases/compiler/constDeclarations-access2.ts(23,3): error TS2449: The operand of an increment or decrement operator cannot be a constant. +tests/cases/compiler/constDeclarations-access2.ts(5,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access2.ts(6,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access2.ts(7,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access2.ts(8,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access2.ts(9,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access2.ts(10,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access2.ts(11,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access2.ts(12,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access2.ts(13,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access2.ts(14,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access2.ts(15,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access2.ts(16,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access2.ts(18,1): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access2.ts(19,1): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access2.ts(20,3): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access2.ts(21,3): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access2.ts(23,3): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. ==== tests/cases/compiler/constDeclarations-access2.ts (17 errors) ==== @@ -24,57 +24,57 @@ tests/cases/compiler/constDeclarations-access2.ts(23,3): error TS2449: The opera // Errors x = 1; ~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. x += 2; ~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. x -= 3; ~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. x *= 4; ~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. x /= 5; ~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. x %= 6; ~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. x <<= 7; ~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. x >>= 8; ~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. x >>>= 9; ~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. x &= 10; ~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. x |= 11; ~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. x ^= 12; ~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. x++; ~ -!!! error TS2449: The operand of an increment or decrement operator cannot be a constant. +!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. x--; ~ -!!! error TS2449: The operand of an increment or decrement operator cannot be a constant. +!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. ++x; ~ -!!! error TS2449: The operand of an increment or decrement operator cannot be a constant. +!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. --x; ~ -!!! error TS2449: The operand of an increment or decrement operator cannot be a constant. +!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. ++((x)); ~~~~~ -!!! error TS2449: The operand of an increment or decrement operator cannot be a constant. +!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. // OK var a = x + 1; diff --git a/tests/baselines/reference/constDeclarations-access3.errors.txt b/tests/baselines/reference/constDeclarations-access3.errors.txt index 577b087dff0..a6cb124d28c 100644 --- a/tests/baselines/reference/constDeclarations-access3.errors.txt +++ b/tests/baselines/reference/constDeclarations-access3.errors.txt @@ -1,21 +1,21 @@ -tests/cases/compiler/constDeclarations-access3.ts(8,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations-access3.ts(9,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations-access3.ts(10,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations-access3.ts(11,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations-access3.ts(12,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations-access3.ts(13,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations-access3.ts(14,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations-access3.ts(15,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations-access3.ts(16,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations-access3.ts(17,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations-access3.ts(18,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations-access3.ts(19,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations-access3.ts(21,1): error TS2449: The operand of an increment or decrement operator cannot be a constant. -tests/cases/compiler/constDeclarations-access3.ts(22,1): error TS2449: The operand of an increment or decrement operator cannot be a constant. -tests/cases/compiler/constDeclarations-access3.ts(23,3): error TS2449: The operand of an increment or decrement operator cannot be a constant. -tests/cases/compiler/constDeclarations-access3.ts(24,3): error TS2449: The operand of an increment or decrement operator cannot be a constant. -tests/cases/compiler/constDeclarations-access3.ts(26,3): error TS2449: The operand of an increment or decrement operator cannot be a constant. -tests/cases/compiler/constDeclarations-access3.ts(28,1): error TS2450: Left-hand side of assignment expression cannot be a constant. +tests/cases/compiler/constDeclarations-access3.ts(8,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access3.ts(9,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access3.ts(10,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access3.ts(11,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access3.ts(12,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access3.ts(13,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access3.ts(14,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access3.ts(15,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access3.ts(16,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access3.ts(17,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access3.ts(18,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access3.ts(19,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access3.ts(21,1): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access3.ts(22,1): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access3.ts(23,3): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access3.ts(24,3): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access3.ts(26,3): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access3.ts(28,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. ==== tests/cases/compiler/constDeclarations-access3.ts (18 errors) ==== @@ -28,61 +28,61 @@ tests/cases/compiler/constDeclarations-access3.ts(28,1): error TS2450: Left-hand // Errors M.x = 1; ~~~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. M.x += 2; ~~~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. M.x -= 3; ~~~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. M.x *= 4; ~~~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. M.x /= 5; ~~~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. M.x %= 6; ~~~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. M.x <<= 7; ~~~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. M.x >>= 8; ~~~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. M.x >>>= 9; ~~~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. M.x &= 10; ~~~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. M.x |= 11; ~~~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. M.x ^= 12; ~~~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. M.x++; ~~~ -!!! error TS2449: The operand of an increment or decrement operator cannot be a constant. +!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. M.x--; ~~~ -!!! error TS2449: The operand of an increment or decrement operator cannot be a constant. +!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. ++M.x; ~~~ -!!! error TS2449: The operand of an increment or decrement operator cannot be a constant. +!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. --M.x; ~~~ -!!! error TS2449: The operand of an increment or decrement operator cannot be a constant. +!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. ++((M.x)); ~~~~~~~ -!!! error TS2449: The operand of an increment or decrement operator cannot be a constant. +!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. M["x"] = 0; ~~~~~~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. // OK var a = M.x + 1; diff --git a/tests/baselines/reference/constDeclarations-access4.errors.txt b/tests/baselines/reference/constDeclarations-access4.errors.txt index 9745c0d2624..3d7d4a704a8 100644 --- a/tests/baselines/reference/constDeclarations-access4.errors.txt +++ b/tests/baselines/reference/constDeclarations-access4.errors.txt @@ -1,21 +1,21 @@ -tests/cases/compiler/constDeclarations-access4.ts(8,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations-access4.ts(9,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations-access4.ts(10,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations-access4.ts(11,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations-access4.ts(12,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations-access4.ts(13,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations-access4.ts(14,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations-access4.ts(15,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations-access4.ts(16,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations-access4.ts(17,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations-access4.ts(18,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations-access4.ts(19,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations-access4.ts(21,1): error TS2449: The operand of an increment or decrement operator cannot be a constant. -tests/cases/compiler/constDeclarations-access4.ts(22,1): error TS2449: The operand of an increment or decrement operator cannot be a constant. -tests/cases/compiler/constDeclarations-access4.ts(23,3): error TS2449: The operand of an increment or decrement operator cannot be a constant. -tests/cases/compiler/constDeclarations-access4.ts(24,3): error TS2449: The operand of an increment or decrement operator cannot be a constant. -tests/cases/compiler/constDeclarations-access4.ts(26,3): error TS2449: The operand of an increment or decrement operator cannot be a constant. -tests/cases/compiler/constDeclarations-access4.ts(28,1): error TS2450: Left-hand side of assignment expression cannot be a constant. +tests/cases/compiler/constDeclarations-access4.ts(8,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access4.ts(9,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access4.ts(10,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access4.ts(11,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access4.ts(12,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access4.ts(13,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access4.ts(14,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access4.ts(15,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access4.ts(16,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access4.ts(17,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access4.ts(18,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access4.ts(19,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access4.ts(21,1): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access4.ts(22,1): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access4.ts(23,3): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access4.ts(24,3): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access4.ts(26,3): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations-access4.ts(28,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. ==== tests/cases/compiler/constDeclarations-access4.ts (18 errors) ==== @@ -28,61 +28,61 @@ tests/cases/compiler/constDeclarations-access4.ts(28,1): error TS2450: Left-hand // Errors M.x = 1; ~~~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. M.x += 2; ~~~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. M.x -= 3; ~~~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. M.x *= 4; ~~~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. M.x /= 5; ~~~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. M.x %= 6; ~~~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. M.x <<= 7; ~~~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. M.x >>= 8; ~~~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. M.x >>>= 9; ~~~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. M.x &= 10; ~~~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. M.x |= 11; ~~~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. M.x ^= 12; ~~~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. M.x++; ~~~ -!!! error TS2449: The operand of an increment or decrement operator cannot be a constant. +!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. M.x--; ~~~ -!!! error TS2449: The operand of an increment or decrement operator cannot be a constant. +!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. ++M.x; ~~~ -!!! error TS2449: The operand of an increment or decrement operator cannot be a constant. +!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. --M.x; ~~~ -!!! error TS2449: The operand of an increment or decrement operator cannot be a constant. +!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. ++((M.x)); ~~~~~~~ -!!! error TS2449: The operand of an increment or decrement operator cannot be a constant. +!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. M["x"] = 0; ~~~~~~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. // OK var a = M.x + 1; diff --git a/tests/baselines/reference/constDeclarations-access5.errors.txt b/tests/baselines/reference/constDeclarations-access5.errors.txt index 23200e50ee4..45160bbc7ce 100644 --- a/tests/baselines/reference/constDeclarations-access5.errors.txt +++ b/tests/baselines/reference/constDeclarations-access5.errors.txt @@ -1,21 +1,21 @@ -tests/cases/compiler/constDeclarations_access_2.ts(4,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations_access_2.ts(5,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations_access_2.ts(6,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations_access_2.ts(7,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations_access_2.ts(8,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations_access_2.ts(9,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations_access_2.ts(10,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations_access_2.ts(11,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations_access_2.ts(12,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations_access_2.ts(13,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations_access_2.ts(14,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations_access_2.ts(15,1): error TS2450: Left-hand side of assignment expression cannot be a constant. -tests/cases/compiler/constDeclarations_access_2.ts(17,1): error TS2449: The operand of an increment or decrement operator cannot be a constant. -tests/cases/compiler/constDeclarations_access_2.ts(18,1): error TS2449: The operand of an increment or decrement operator cannot be a constant. -tests/cases/compiler/constDeclarations_access_2.ts(19,3): error TS2449: The operand of an increment or decrement operator cannot be a constant. -tests/cases/compiler/constDeclarations_access_2.ts(20,3): error TS2449: The operand of an increment or decrement operator cannot be a constant. -tests/cases/compiler/constDeclarations_access_2.ts(22,3): error TS2449: The operand of an increment or decrement operator cannot be a constant. -tests/cases/compiler/constDeclarations_access_2.ts(24,1): error TS2450: Left-hand side of assignment expression cannot be a constant. +tests/cases/compiler/constDeclarations_access_2.ts(4,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations_access_2.ts(5,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations_access_2.ts(6,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations_access_2.ts(7,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations_access_2.ts(8,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations_access_2.ts(9,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations_access_2.ts(10,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations_access_2.ts(11,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations_access_2.ts(12,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations_access_2.ts(13,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations_access_2.ts(14,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations_access_2.ts(15,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations_access_2.ts(17,1): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations_access_2.ts(18,1): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations_access_2.ts(19,3): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations_access_2.ts(20,3): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations_access_2.ts(22,3): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. +tests/cases/compiler/constDeclarations_access_2.ts(24,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. ==== tests/cases/compiler/constDeclarations_access_2.ts (18 errors) ==== @@ -24,61 +24,61 @@ tests/cases/compiler/constDeclarations_access_2.ts(24,1): error TS2450: Left-han // Errors m.x = 1; ~~~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. m.x += 2; ~~~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. m.x -= 3; ~~~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. m.x *= 4; ~~~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. m.x /= 5; ~~~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. m.x %= 6; ~~~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. m.x <<= 7; ~~~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. m.x >>= 8; ~~~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. m.x >>>= 9; ~~~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. m.x &= 10; ~~~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. m.x |= 11; ~~~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. m.x ^= 12; ~~~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. m m.x++; ~~~ -!!! error TS2449: The operand of an increment or decrement operator cannot be a constant. +!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. m.x--; ~~~ -!!! error TS2449: The operand of an increment or decrement operator cannot be a constant. +!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. ++m.x; ~~~ -!!! error TS2449: The operand of an increment or decrement operator cannot be a constant. +!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. --m.x; ~~~ -!!! error TS2449: The operand of an increment or decrement operator cannot be a constant. +!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. ++((m.x)); ~~~~~~~ -!!! error TS2449: The operand of an increment or decrement operator cannot be a constant. +!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. m["x"] = 0; ~~~~~~ -!!! error TS2450: Left-hand side of assignment expression cannot be a constant. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. // OK var a = m.x + 1; diff --git a/tests/baselines/reference/constDeclarations-errors.errors.txt b/tests/baselines/reference/constDeclarations-errors.errors.txt index 10501beb1a5..98b12b616f7 100644 --- a/tests/baselines/reference/constDeclarations-errors.errors.txt +++ b/tests/baselines/reference/constDeclarations-errors.errors.txt @@ -4,7 +4,7 @@ tests/cases/compiler/constDeclarations-errors.ts(5,7): error TS1155: 'const' dec tests/cases/compiler/constDeclarations-errors.ts(5,11): error TS1155: 'const' declarations must be initialized tests/cases/compiler/constDeclarations-errors.ts(5,15): error TS1155: 'const' declarations must be initialized tests/cases/compiler/constDeclarations-errors.ts(5,27): error TS1155: 'const' declarations must be initialized -tests/cases/compiler/constDeclarations-errors.ts(10,27): error TS2449: The operand of an increment or decrement operator cannot be a constant. +tests/cases/compiler/constDeclarations-errors.ts(10,27): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. tests/cases/compiler/constDeclarations-errors.ts(13,11): error TS1155: 'const' declarations must be initialized tests/cases/compiler/constDeclarations-errors.ts(16,20): error TS1155: 'const' declarations must be initialized @@ -33,7 +33,7 @@ tests/cases/compiler/constDeclarations-errors.ts(16,20): error TS1155: 'const' d // error, assigning to a const for(const c8 = 0; c8 < 1; c8++) { } ~~ -!!! error TS2449: The operand of an increment or decrement operator cannot be a constant. +!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. // error, can not be unintalized for(const c9; c9 < 1;) { } diff --git a/tests/baselines/reference/for-of2.errors.txt b/tests/baselines/reference/for-of2.errors.txt index 0b5133cde13..f4f39f60f67 100644 --- a/tests/baselines/reference/for-of2.errors.txt +++ b/tests/baselines/reference/for-of2.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/es6/for-ofStatements/for-of2.ts(1,7): error TS1155: 'const' declarations must be initialized -tests/cases/conformance/es6/for-ofStatements/for-of2.ts(2,6): error TS2485: The left-hand side of a 'for...of' statement cannot be a previously defined constant. +tests/cases/conformance/es6/for-ofStatements/for-of2.ts(2,6): error TS2485: The left-hand side of a 'for...of' statement cannot be a constant or a read-only property. ==== tests/cases/conformance/es6/for-ofStatements/for-of2.ts (2 errors) ==== @@ -8,4 +8,4 @@ tests/cases/conformance/es6/for-ofStatements/for-of2.ts(2,6): error TS2485: The !!! error TS1155: 'const' declarations must be initialized for (v of []) { } ~ -!!! error TS2485: The left-hand side of a 'for...of' statement cannot be a previously defined constant. \ No newline at end of file +!!! error TS2485: The left-hand side of a 'for...of' statement cannot be a constant or a read-only property. \ No newline at end of file From dc8ab95db591921336652dd36bfb98ca9b0c887e Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Tue, 19 Jan 2016 09:45:46 -0800 Subject: [PATCH 049/160] Chaning "read-write" to "writable" in error messages --- src/compiler/checker.ts | 6 +++--- src/compiler/diagnosticMessages.json | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index cd922475d45..72a0c71178f 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -5641,7 +5641,7 @@ namespace ts { } if (isReadonlySymbol(sourceProp) && !isReadonlySymbol(targetProp)) { if (reportErrors) { - reportError(Diagnostics.Property_0_is_read_only_in_type_1_but_read_write_in_type_2, + reportError(Diagnostics.Property_0_is_read_only_in_type_1_but_writable_in_type_2, symbolToString(targetProp), typeToString(source), typeToString(target)); } return Ternary.False; @@ -5780,7 +5780,7 @@ namespace ts { } if (sourceInfo.isReadonly && !targetInfo.isReadonly) { if (reportErrors) { - reportError(Diagnostics.Index_signature_is_read_only_in_type_0_but_read_write_in_type_1, + reportError(Diagnostics.Index_signature_is_read_only_in_type_0_but_writable_in_type_1, typeToString(source), typeToString(target)); } return Ternary.False; @@ -5826,7 +5826,7 @@ namespace ts { } if ((sourceStringInfo && sourceStringInfo.isReadonly || sourceNumberInfo && sourceNumberInfo.isReadonly) && !targetInfo.isReadonly) { if (reportErrors) { - reportError(Diagnostics.Index_signature_is_read_only_in_type_0_but_read_write_in_type_1, + reportError(Diagnostics.Index_signature_is_read_only_in_type_0_but_writable_in_type_1, typeToString(source), typeToString(target)); } return Ternary.False; diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 42455576b44..cb01650d13f 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -995,7 +995,7 @@ "category": "Error", "code": 2342 }, - "Property '{0}' is read-only in type '{1}' but read-write in type '{2}'.": { + "Property '{0}' is read-only in type '{1}' but writable in type '{2}'.": { "category": "Error", "code": 2343 }, @@ -1087,7 +1087,7 @@ "category": "Error", "code": 2365 }, - "Index signature is read-only in type '{0}' but read-write in type '{1}'.": { + "Index signature is read-only in type '{0}' but writable in type '{1}'.": { "category": "Error", "code": 2366 }, From 4abf717cefe54d58d296d599f9a81bf26342b407 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Tue, 19 Jan 2016 09:45:57 -0800 Subject: [PATCH 050/160] Accepting new baselines --- .../reference/interfaceImplementation5.errors.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/baselines/reference/interfaceImplementation5.errors.txt b/tests/baselines/reference/interfaceImplementation5.errors.txt index aba0c9f8850..bb2d5f1bdb0 100644 --- a/tests/baselines/reference/interfaceImplementation5.errors.txt +++ b/tests/baselines/reference/interfaceImplementation5.errors.txt @@ -1,11 +1,11 @@ tests/cases/compiler/interfaceImplementation5.ts(5,7): error TS2420: Class 'C1' incorrectly implements interface 'I1'. - Property 'getset1' is read-only in type 'C1' but read-write in type 'I1'. + Property 'getset1' is read-only in type 'C1' but writable in type 'I1'. tests/cases/compiler/interfaceImplementation5.ts(6,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/interfaceImplementation5.ts(10,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/interfaceImplementation5.ts(14,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/interfaceImplementation5.ts(15,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/interfaceImplementation5.ts(18,7): error TS2420: Class 'C4' incorrectly implements interface 'I1'. - Property 'getset1' is read-only in type 'C4' but read-write in type 'I1'. + Property 'getset1' is read-only in type 'C4' but writable in type 'I1'. tests/cases/compiler/interfaceImplementation5.ts(19,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/interfaceImplementation5.ts(23,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/interfaceImplementation5.ts(27,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. @@ -20,7 +20,7 @@ tests/cases/compiler/interfaceImplementation5.ts(28,16): error TS1056: Accessors class C1 implements I1 { ~~ !!! error TS2420: Class 'C1' incorrectly implements interface 'I1'. -!!! error TS2420: Property 'getset1' is read-only in type 'C1' but read-write in type 'I1'. +!!! error TS2420: Property 'getset1' is read-only in type 'C1' but writable in type 'I1'. public get getset1(){return 1;} ~~~~~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. @@ -44,7 +44,7 @@ tests/cases/compiler/interfaceImplementation5.ts(28,16): error TS1056: Accessors class C4 implements I1 { ~~ !!! error TS2420: Class 'C4' incorrectly implements interface 'I1'. -!!! error TS2420: Property 'getset1' is read-only in type 'C4' but read-write in type 'I1'. +!!! error TS2420: Property 'getset1' is read-only in type 'C4' but writable in type 'I1'. public get getset1(){var x:any; return x;} ~~~~~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. From 28840863a635b6803505a821bcb18d9638c38012 Mon Sep 17 00:00:00 2001 From: Asad Saeeduddin Date: Tue, 19 Jan 2016 15:23:57 -0500 Subject: [PATCH 051/160] Addressed PR feedback: refactored away helper function, generated spec from docx --- doc/TypeScript Language Specification.docx | Bin 316896 -> 317460 bytes doc/spec.md | 8 ++++---- src/compiler/checker.ts | 6 +----- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/doc/TypeScript Language Specification.docx b/doc/TypeScript Language Specification.docx index 78c869175512d02338a61741a2bbbe570aa97bcb..4b8d3998f905a43b52b728204eaeb7c0d7c1e834 100644 GIT binary patch delta 263837 zcmW(+Wmq1)5~XPI;!v!}i@Q_Y9g4dYcXwN?xW2d-cQ5Yl?(XhRp}^(4`!mTi$!0S% z=bX%Lm0=`QWBf)!K`W9O3)F&w@Ph(Dpg|<(OhIGBlOTx$VJQp<&=_HD-X1Ks|K#6J zvpdJF&*MBg_P-}n-ruf-4G{FQ)0;VZ+>9o-)@_6xz_l2iG@MqC#>3nyym{Yezt48^ zx3lV!WiV4teS;qa9@#h<6bgly05^wid}WT=*V|MR_sYxYK&ReJ-KO0dlj;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ue5BDklV)0Ea4ONKpTpH(#PdO^1F#Lg^^y79BM0J<6k6_ld z&wwlA=M!CeX;6%txc=D~X9Bi*LVTY4qcTLLWl^KJ?(L&hd4{G;mjU4Ie9W3>^czKmtB-}UraIO?kBaL4ip{m`U~4|0Z`!u#vX4u44lxServfrF*` z{0cTF76le;qaU}6Sn9_!r)51HtaB__^8l_OEr(Z(K{N=GM}$~d*TEM5dJ(~H4&vUW z+g1$ycq#DsKLpxrVCsXo%ygN|w=`$K?TH9{EUX*WBe#Tz;YdU$5sbuxmrOk~ju#IIx|UIJaOHL%8hNsh+U+L%5Hy zlN(@zm)G)P*sWpQM>sUcI57ALDCIJYd!3HAf3q&%6blRX1p99zdw&;}JPeNPUx%t- zVUhi-Q}CT#2yAi~_YU3PA2s-w&|o5rdIVPzo8}u#cLbM*?)PRHcv}m!gZf`$;5)_= z*w+zUcDjG!Y~L_{F{8Ev)|srGGTN diff --git a/doc/spec.md b/doc/spec.md index 4c1ec4f2302..fa69d321056 100644 --- a/doc/spec.md +++ b/doc/spec.md @@ -265,7 +265,7 @@ function f() { To benefit from this inference, a programmer can use the TypeScript language service. For example, a code editor can incorporate the TypeScript language service and use the service to find the members of a string object as in the following screen shot. -  ![](images/image1.png) +  ![](images/image1.png) In this example, the programmer benefits from type inference without providing type annotations. Some beneficial tools, however, do require the programmer to provide type annotations. In TypeScript, we can express a parameter requirement as in the following code fragment. @@ -413,7 +413,7 @@ This signature denotes that a function may be passed as the parameter of the '$' A typical client would not need to add any additional typing but could just use a community-supplied typing to discover (through statement completion with documentation tips) and verify (through static checking) correct use of the library, as in the following screen shot. -  ![](images/image2.png) +  ![](images/image2.png) Section [3.3](#3.3) provides additional information about object types. @@ -630,7 +630,7 @@ An important goal of TypeScript is to provide accurate and straightforward types JavaScript programming interfaces often include functions whose behavior is discriminated by a string constant passed to the function. The Document Object Model makes heavy use of this pattern. For example, the following screen shot shows that the 'createElement' method of the 'document' object has multiple signatures, some of which identify the types returned when specific strings are passed into the method. -  ![](images/image3.png) +  ![](images/image3.png) The following code fragment uses this feature. Because the 'span' variable is inferred to have the type 'HTMLSpanElement', the code can reference without static error the 'isMultiline' property of 'span'. @@ -641,7 +641,7 @@ span.isMultiLine = false; // OK: HTMLSpanElement has isMultiline property In the following screen shot, a programming tool combines information from overloading on string parameters with contextual typing to infer that the type of the variable 'e' is 'MouseEvent' and that therefore 'e' has a 'clientX' property. -  ![](images/image4.png) +  ![](images/image4.png) Section [3.9.2.4](#3.9.2.4) provides details on how to use string literals in function signatures. diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index b7637682f1a..f2e65004b80 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -2466,10 +2466,6 @@ namespace ts { return type && (type.flags & TypeFlags.Any) !== 0; } - function isUnionContaining(type: Type, kinds: TypeFlags) { - return type && (type.flags & TypeFlags.Union) && someConstituentTypeHasKind(type, kinds); - } - // Return the type of a binding element parent. We check SymbolLinks first to see if a type has been // assigned by contextual typing. function getTypeForBindingElementParent(node: VariableLikeDeclaration) { @@ -10217,7 +10213,7 @@ namespace ts { } // Functions with with an explicitly specified 'void' or 'any' return type don't need any return expressions. - if (returnType === voidType || isTypeAny(returnType) || isUnionContaining(returnType, TypeFlags.Any) || isUnionContaining(returnType, TypeFlags.Void)) { + if (returnType === voidType || isTypeAny(returnType) || (returnType && (returnType.flags & TypeFlags.Union) && someConstituentTypeHasKind(returnType, TypeFlags.Any | TypeFlags.Void))) { return; } From cac3a32513d2f06cbf1d7da0e34b4df571fe472b Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Tue, 19 Jan 2016 15:45:41 -0800 Subject: [PATCH 052/160] Add ReadonlyArray to core.d.ts --- src/lib/core.d.ts | 115 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 102 insertions(+), 13 deletions(-) diff --git a/src/lib/core.d.ts b/src/lib/core.d.ts index dbd4d37ef96..cc7d916977c 100644 --- a/src/lib/core.d.ts +++ b/src/lib/core.d.ts @@ -988,6 +988,108 @@ declare var JSON: JSON; /// ECMAScript Array API (specially handled by compiler) ///////////////////////////// +interface ReadonlyArray { + /** + * Gets the length of the array. This is a number one higher than the highest element defined in an array. + */ + readonly length: number; + /** + * Returns a string representation of an array. + */ + toString(): string; + toLocaleString(): string; + /** + * Combines two or more arrays. + * @param items Additional items to add to the end of array1. + */ + concat>(...items: U[]): T[]; + /** + * Combines two or more arrays. + * @param items Additional items to add to the end of array1. + */ + concat(...items: T[]): T[]; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. + */ + slice(start?: number, end?: number): T[]; + /** + * Returns the index of the first occurrence of a value in an array. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. + */ + indexOf(searchElement: T, fromIndex?: number): number; + + /** + * Returns the index of the last occurrence of a specified value in an array. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array. + */ + lastIndexOf(searchElement: T, fromIndex?: number): number; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param callbackfn A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. + */ + every(callbackfn: (value: T, index: number, array: ReadonlyArray) => boolean, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param callbackfn A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. + */ + some(callbackfn: (value: T, index: number, array: ReadonlyArray) => boolean, thisArg?: any): boolean; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: T, index: number, array: ReadonlyArray) => void, thisArg?: any): void; + /** + * Calls a defined callback function on each element of an array, and returns an array that contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: T, index: number, array: ReadonlyArray) => U, thisArg?: any): U[]; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. + */ + filter(callbackfn: (value: T, index: number, array: ReadonlyArray) => boolean, thisArg?: any): T[]; + /** + * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: ReadonlyArray) => T, initialValue?: T): T; + /** + * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: ReadonlyArray) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: ReadonlyArray) => T, initialValue?: T): T; + /** + * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: ReadonlyArray) => U, initialValue: U): U; + + readonly [n: number]: T; +} + interface Array { /** * Gets or sets the length of the array. This is a number one higher than the highest element defined in an array. @@ -1036,19 +1138,16 @@ interface Array { * @param end The end of the specified portion of the array. */ slice(start?: number, end?: number): T[]; - /** * Sorts an array. * @param compareFn The name of the function used to determine the order of the elements. If omitted, the elements are sorted in ascending, ASCII character order. */ sort(compareFn?: (a: T, b: T) => number): T[]; - /** * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. * @param start The zero-based location in the array from which to start removing elements. */ splice(start: number): T[]; - /** * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. * @param start The zero-based location in the array from which to start removing elements. @@ -1056,62 +1155,53 @@ interface Array { * @param items Elements to insert into the array in place of the deleted elements. */ splice(start: number, deleteCount: number, ...items: T[]): T[]; - /** * Inserts new elements at the start of an array. * @param items Elements to insert at the start of the Array. */ unshift(...items: T[]): number; - /** * Returns the index of the first occurrence of a value in an array. * @param searchElement The value to locate in the array. * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. */ indexOf(searchElement: T, fromIndex?: number): number; - /** * Returns the index of the last occurrence of a specified value in an array. * @param searchElement The value to locate in the array. * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array. */ lastIndexOf(searchElement: T, fromIndex?: number): number; - /** * Determines whether all the members of an array satisfy the specified test. * @param callbackfn A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array. * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. */ every(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean; - /** * Determines whether the specified callback function returns true for any element of an array. * @param callbackfn A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array. * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. */ some(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean; - /** * Performs the specified action for each element in an array. * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. */ forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void; - /** * Calls a defined callback function on each element of an array, and returns an array that contains the results. * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. */ map(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[]; - /** * Returns the elements of an array that meet the condition specified in a callback function. * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array. * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. */ filter(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): T[]; - /** * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. @@ -1124,7 +1214,6 @@ interface Array { * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. */ reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; - /** * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. From 8bb00feb09caa2f2cfcaa3706457bcc70c248c9e Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Tue, 19 Jan 2016 15:46:12 -0800 Subject: [PATCH 053/160] Consider ReadonlyArray an array-like type --- src/compiler/checker.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 72a0c71178f..0f880cd17f9 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -145,6 +145,7 @@ namespace ts { let globalObjectType: ObjectType; let globalFunctionType: ObjectType; let globalArrayType: GenericType; + let globalReadonlyArrayType: GenericType; let globalStringType: ObjectType; let globalNumberType: ObjectType; let globalBooleanType: ObjectType; @@ -156,6 +157,7 @@ namespace ts { let globalIterableIteratorType: GenericType; let anyArrayType: Type; + let anyReadonlyArrayType: Type; let getGlobalClassDecoratorType: () => ObjectType; let getGlobalParameterDecoratorType: () => ObjectType; let getGlobalPropertyDecoratorType: () => ObjectType; @@ -6054,8 +6056,10 @@ namespace ts { } function isArrayLikeType(type: Type): boolean { - // A type is array-like if it is not the undefined or null type and if it is assignable to any[] - return !(type.flags & (TypeFlags.Undefined | TypeFlags.Null)) && isTypeAssignableTo(type, anyArrayType); + // A type is array-like if it is a reference to the global Array or global ReadonlyArray type, + // or if it is not the undefined or null type and if it is assignable to ReadonlyArray + return type.flags & TypeFlags.Reference && ((type).target === globalArrayType || (type).target === globalReadonlyArrayType) || + !(type.flags & (TypeFlags.Undefined | TypeFlags.Null)) && isTypeAssignableTo(type, anyReadonlyArrayType); } function isTupleLikeType(type: Type): boolean { @@ -15719,6 +15723,7 @@ namespace ts { // Initialize special types globalArrayType = getGlobalType("Array", /*arity*/ 1); + globalReadonlyArrayType = getGlobalType("ReadonlyArray", /*arity*/ 1); globalObjectType = getGlobalType("Object"); globalFunctionType = getGlobalType("Function"); globalStringType = getGlobalType("String"); @@ -15763,6 +15768,8 @@ namespace ts { } anyArrayType = createArrayType(anyType); + anyReadonlyArrayType = globalReadonlyArrayType === emptyGenericType ? anyArrayType : + createTypeFromGenericGlobalType(globalReadonlyArrayType, [anyType]); } function createInstantiatedPromiseLikeType(): ObjectType { From a2c655d683abda68d7a53abba357a0da0a29b4e6 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Wed, 20 Jan 2016 15:23:46 -0800 Subject: [PATCH 054/160] handle block scoped binding in nested blocks --- src/compiler/checker.ts | 120 ++++---- src/compiler/emitter.ts | 82 ++++-- src/compiler/types.ts | 13 +- src/compiler/utilities.ts | 19 ++ .../reference/capturedLetConstInLoop1.js | 8 +- .../reference/capturedLetConstInLoop2.js | 6 +- .../reference/capturedLetConstInLoop3.js | 6 +- .../reference/capturedLetConstInLoop4.js | 8 +- .../reference/capturedLetConstInLoop5.js | 6 +- .../reference/capturedLetConstInLoop6.js | 8 +- .../reference/capturedLetConstInLoop7.js | 8 +- .../reference/capturedLetConstInLoop9.js | 10 +- .../reference/downlevelLetConst16.js | 2 +- .../reference/downlevelLetConst17.js | 2 +- .../reference/nestedBlockScopedBindings1.js | 97 +++++++ .../nestedBlockScopedBindings1.symbols | 68 +++++ .../nestedBlockScopedBindings1.types | 82 ++++++ .../reference/nestedBlockScopedBindings10.js | 24 ++ .../nestedBlockScopedBindings10.symbols | 19 ++ .../nestedBlockScopedBindings10.types | 27 ++ .../reference/nestedBlockScopedBindings11.js | 28 ++ .../nestedBlockScopedBindings11.symbols | 24 ++ .../nestedBlockScopedBindings11.types | 30 ++ .../reference/nestedBlockScopedBindings12.js | 28 ++ .../nestedBlockScopedBindings12.symbols | 24 ++ .../nestedBlockScopedBindings12.types | 32 +++ .../reference/nestedBlockScopedBindings13.js | 23 ++ .../nestedBlockScopedBindings13.symbols | 16 ++ .../nestedBlockScopedBindings13.types | 23 ++ .../reference/nestedBlockScopedBindings14.js | 27 ++ .../nestedBlockScopedBindings14.symbols | 22 ++ .../nestedBlockScopedBindings14.types | 29 ++ .../reference/nestedBlockScopedBindings15.js | 68 +++++ .../nestedBlockScopedBindings15.symbols | 46 ++++ .../nestedBlockScopedBindings15.types | 66 +++++ .../reference/nestedBlockScopedBindings16.js | 76 ++++++ .../nestedBlockScopedBindings16.symbols | 58 ++++ .../nestedBlockScopedBindings16.types | 78 ++++++ .../reference/nestedBlockScopedBindings2.js | 244 +++++++++++++++++ .../nestedBlockScopedBindings2.symbols | 197 +++++++++++++ .../nestedBlockScopedBindings2.types | 258 ++++++++++++++++++ .../reference/nestedBlockScopedBindings3.js | 150 ++++++++++ .../nestedBlockScopedBindings3.symbols | 130 +++++++++ .../nestedBlockScopedBindings3.types | 177 ++++++++++++ .../reference/nestedBlockScopedBindings4.js | 91 ++++++ .../nestedBlockScopedBindings4.symbols | 93 +++++++ .../nestedBlockScopedBindings4.types | 129 +++++++++ .../reference/nestedBlockScopedBindings5.js | 169 ++++++++++++ .../nestedBlockScopedBindings5.symbols | 163 +++++++++++ .../nestedBlockScopedBindings5.types | 227 +++++++++++++++ .../reference/nestedBlockScopedBindings6.js | 197 +++++++++++++ .../nestedBlockScopedBindings6.symbols | 177 ++++++++++++ .../nestedBlockScopedBindings6.types | 253 +++++++++++++++++ .../reference/nestedBlockScopedBindings7.js | 19 ++ .../nestedBlockScopedBindings7.symbols | 14 + .../nestedBlockScopedBindings7.types | 19 ++ .../reference/nestedBlockScopedBindings8.js | 23 ++ .../nestedBlockScopedBindings8.symbols | 20 ++ .../nestedBlockScopedBindings8.types | 25 ++ .../reference/nestedBlockScopedBindings9.js | 24 ++ .../nestedBlockScopedBindings9.symbols | 19 ++ .../nestedBlockScopedBindings9.types | 25 ++ .../compiler/nestedBlockScopedBindings1.ts | 49 ++++ .../compiler/nestedBlockScopedBindings10.ts | 11 + .../compiler/nestedBlockScopedBindings11.ts | 13 + .../compiler/nestedBlockScopedBindings12.ts | 13 + .../compiler/nestedBlockScopedBindings13.ts | 9 + .../compiler/nestedBlockScopedBindings14.ts | 11 + .../compiler/nestedBlockScopedBindings15.ts | 31 +++ .../compiler/nestedBlockScopedBindings16.ts | 35 +++ .../compiler/nestedBlockScopedBindings2.ts | 126 +++++++++ .../compiler/nestedBlockScopedBindings3.ts | 68 +++++ .../compiler/nestedBlockScopedBindings4.ts | 40 +++ .../compiler/nestedBlockScopedBindings5.ts | 80 ++++++ .../compiler/nestedBlockScopedBindings6.ts | 88 ++++++ .../compiler/nestedBlockScopedBindings7.ts | 7 + .../compiler/nestedBlockScopedBindings8.ts | 9 + .../compiler/nestedBlockScopedBindings9.ts | 11 + 78 files changed, 4636 insertions(+), 121 deletions(-) create mode 100644 tests/baselines/reference/nestedBlockScopedBindings1.js create mode 100644 tests/baselines/reference/nestedBlockScopedBindings1.symbols create mode 100644 tests/baselines/reference/nestedBlockScopedBindings1.types create mode 100644 tests/baselines/reference/nestedBlockScopedBindings10.js create mode 100644 tests/baselines/reference/nestedBlockScopedBindings10.symbols create mode 100644 tests/baselines/reference/nestedBlockScopedBindings10.types create mode 100644 tests/baselines/reference/nestedBlockScopedBindings11.js create mode 100644 tests/baselines/reference/nestedBlockScopedBindings11.symbols create mode 100644 tests/baselines/reference/nestedBlockScopedBindings11.types create mode 100644 tests/baselines/reference/nestedBlockScopedBindings12.js create mode 100644 tests/baselines/reference/nestedBlockScopedBindings12.symbols create mode 100644 tests/baselines/reference/nestedBlockScopedBindings12.types create mode 100644 tests/baselines/reference/nestedBlockScopedBindings13.js create mode 100644 tests/baselines/reference/nestedBlockScopedBindings13.symbols create mode 100644 tests/baselines/reference/nestedBlockScopedBindings13.types create mode 100644 tests/baselines/reference/nestedBlockScopedBindings14.js create mode 100644 tests/baselines/reference/nestedBlockScopedBindings14.symbols create mode 100644 tests/baselines/reference/nestedBlockScopedBindings14.types create mode 100644 tests/baselines/reference/nestedBlockScopedBindings15.js create mode 100644 tests/baselines/reference/nestedBlockScopedBindings15.symbols create mode 100644 tests/baselines/reference/nestedBlockScopedBindings15.types create mode 100644 tests/baselines/reference/nestedBlockScopedBindings16.js create mode 100644 tests/baselines/reference/nestedBlockScopedBindings16.symbols create mode 100644 tests/baselines/reference/nestedBlockScopedBindings16.types create mode 100644 tests/baselines/reference/nestedBlockScopedBindings2.js create mode 100644 tests/baselines/reference/nestedBlockScopedBindings2.symbols create mode 100644 tests/baselines/reference/nestedBlockScopedBindings2.types create mode 100644 tests/baselines/reference/nestedBlockScopedBindings3.js create mode 100644 tests/baselines/reference/nestedBlockScopedBindings3.symbols create mode 100644 tests/baselines/reference/nestedBlockScopedBindings3.types create mode 100644 tests/baselines/reference/nestedBlockScopedBindings4.js create mode 100644 tests/baselines/reference/nestedBlockScopedBindings4.symbols create mode 100644 tests/baselines/reference/nestedBlockScopedBindings4.types create mode 100644 tests/baselines/reference/nestedBlockScopedBindings5.js create mode 100644 tests/baselines/reference/nestedBlockScopedBindings5.symbols create mode 100644 tests/baselines/reference/nestedBlockScopedBindings5.types create mode 100644 tests/baselines/reference/nestedBlockScopedBindings6.js create mode 100644 tests/baselines/reference/nestedBlockScopedBindings6.symbols create mode 100644 tests/baselines/reference/nestedBlockScopedBindings6.types create mode 100644 tests/baselines/reference/nestedBlockScopedBindings7.js create mode 100644 tests/baselines/reference/nestedBlockScopedBindings7.symbols create mode 100644 tests/baselines/reference/nestedBlockScopedBindings7.types create mode 100644 tests/baselines/reference/nestedBlockScopedBindings8.js create mode 100644 tests/baselines/reference/nestedBlockScopedBindings8.symbols create mode 100644 tests/baselines/reference/nestedBlockScopedBindings8.types create mode 100644 tests/baselines/reference/nestedBlockScopedBindings9.js create mode 100644 tests/baselines/reference/nestedBlockScopedBindings9.symbols create mode 100644 tests/baselines/reference/nestedBlockScopedBindings9.types create mode 100644 tests/cases/compiler/nestedBlockScopedBindings1.ts create mode 100644 tests/cases/compiler/nestedBlockScopedBindings10.ts create mode 100644 tests/cases/compiler/nestedBlockScopedBindings11.ts create mode 100644 tests/cases/compiler/nestedBlockScopedBindings12.ts create mode 100644 tests/cases/compiler/nestedBlockScopedBindings13.ts create mode 100644 tests/cases/compiler/nestedBlockScopedBindings14.ts create mode 100644 tests/cases/compiler/nestedBlockScopedBindings15.ts create mode 100644 tests/cases/compiler/nestedBlockScopedBindings16.ts create mode 100644 tests/cases/compiler/nestedBlockScopedBindings2.ts create mode 100644 tests/cases/compiler/nestedBlockScopedBindings3.ts create mode 100644 tests/cases/compiler/nestedBlockScopedBindings4.ts create mode 100644 tests/cases/compiler/nestedBlockScopedBindings5.ts create mode 100644 tests/cases/compiler/nestedBlockScopedBindings6.ts create mode 100644 tests/cases/compiler/nestedBlockScopedBindings7.ts create mode 100644 tests/cases/compiler/nestedBlockScopedBindings8.ts create mode 100644 tests/cases/compiler/nestedBlockScopedBindings9.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index ddb49a2d8f8..1806dc647c1 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -6967,7 +6967,7 @@ namespace ts { checkCollisionWithCapturedSuperVariable(node, node); checkCollisionWithCapturedThisVariable(node, node); - checkBlockScopedBindingCapturedInLoop(node, symbol); + checkNestedBlockScopedBinding(node, symbol); return getNarrowedTypeOfSymbol(getExportSymbolOfValueSymbolIfExported(symbol), node); } @@ -6984,7 +6984,7 @@ namespace ts { return false; } - function checkBlockScopedBindingCapturedInLoop(node: Identifier, symbol: Symbol): void { + function checkNestedBlockScopedBinding(node: Identifier, symbol: Symbol): void { if (languageVersion >= ScriptTarget.ES6 || (symbol.flags & (SymbolFlags.BlockScopedVariable | SymbolFlags.Class)) === 0 || symbol.valueDeclaration.parent.kind === SyntaxKind.CatchClause) { @@ -6996,40 +6996,31 @@ namespace ts { // 2. walk from the declaration up to the boundary of lexical environment and check // if there is an iteration statement in between declaration and boundary (is binding/class declared inside iteration statement) - let container: Node; - if (symbol.flags & SymbolFlags.Class) { - // get parent of class declaration - container = getClassLikeDeclarationOfSymbol(symbol).parent; - } - else { - // nesting structure: - // (variable declaration or binding element) -> variable declaration list -> container - container = symbol.valueDeclaration; - while (container.kind !== SyntaxKind.VariableDeclarationList) { - container = container.parent; - } - // get the parent of variable declaration list - container = container.parent; - if (container.kind === SyntaxKind.VariableStatement) { - // if parent is variable statement - get its parent - container = container.parent; - } - } - - const inFunction = isInsideFunction(node.parent, container); - + const container = getEnclosingBlockScopeContainer(symbol.valueDeclaration); + const usedInFunction = isInsideFunction(node.parent, container); let current = container; + + let containedInIterationStatement = false; while (current && !nodeStartsNewLexicalEnvironment(current)) { if (isIterationStatement(current, /*lookInLabeledStatements*/ false)) { - if (inFunction) { - getNodeLinks(current).flags |= NodeCheckFlags.LoopWithBlockScopedBindingCapturedInFunction; - } - // mark value declaration so during emit they can have a special handling - getNodeLinks(symbol.valueDeclaration).flags |= NodeCheckFlags.BlockScopedBindingInLoop; + containedInIterationStatement = true; break; } current = current.parent; } + + if (containedInIterationStatement) { + if (usedInFunction) { + // mark iteration statement as containing block-scoped binding captured in some function + getNodeLinks(current).flags |= NodeCheckFlags.LoopWithCapturedBlockScopedBinding; + } + // set 'declared inside loop' bit on the block-scoped binding + getNodeLinks(symbol.valueDeclaration).flags |= NodeCheckFlags.BlockScopedBindingInLoop; + } + + if (usedInFunction) { + getNodeLinks(symbol.valueDeclaration).flags |= NodeCheckFlags.CapturedBlockScopedBinding; + } } function captureLexicalThis(node: Node, container: Node): void { @@ -15385,42 +15376,61 @@ namespace ts { return symbol && symbol.flags & SymbolFlags.Alias ? getDeclarationOfAliasSymbol(symbol) : undefined; } - function isStatementWithLocals(node: Node) { - switch (node.kind) { - case SyntaxKind.Block: - case SyntaxKind.CaseBlock: - case SyntaxKind.ForStatement: - case SyntaxKind.ForInStatement: - case SyntaxKind.ForOfStatement: - return true; - } - return false; - } - - function isNestedRedeclarationSymbol(symbol: Symbol): boolean { + function isSymbolOfDeclarationWithCollidingName(symbol: Symbol): boolean { if (symbol.flags & SymbolFlags.BlockScoped) { const links = getSymbolLinks(symbol); - if (links.isNestedRedeclaration === undefined) { + if (links.isDeclaratonWithCollidingName === undefined) { const container = getEnclosingBlockScopeContainer(symbol.valueDeclaration); - links.isNestedRedeclaration = isStatementWithLocals(container) && - !!resolveName(container.parent, symbol.name, SymbolFlags.Value, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined); + if (isStatementWithLocals(container)) { + const nodeLinks = getNodeLinks(symbol.valueDeclaration); + if (!!resolveName(container.parent, symbol.name, SymbolFlags.Value, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined)) { + // redeclaration - always should be renamed + links.isDeclaratonWithCollidingName = true; + } + else if (nodeLinks.flags & NodeCheckFlags.CapturedBlockScopedBinding) { + // binding is captured in the function + // should be renamed if: + // - binding is not top level - top level bindings never collide with anything + // AND + // - binding is not declared in loop, should be renamed to avoid name reuse across siblings + // let a, b + // { let x = 1; a = () => x; } + // { let x = 100; b = () => x; } + // console.log(a()); // should print '1' + // console.log(b()); // should print '100' + // OR + // - binding is declared inside loop but not in inside initializer of iteration statement or directly inside loop body + // * variables from initializer are passed to rewritted loop body as parameters so they are not captured directly + // * variables that are declared immediately in loop body will become top level variable after loop is rewritten and thus + // they will not collide with anything + const isDeclaredInLoop = nodeLinks.flags & NodeCheckFlags.BlockScopedBindingInLoop; + const inLoopInitializer = isIterationStatement(container, /*lookInLabeledStatements*/ false); + const inLoopBodyBlock = container.kind === SyntaxKind.Block && isIterationStatement(container.parent, /*lookInLabeledStatements*/ false); + + links.isDeclaratonWithCollidingName = !isBlockScopedContainerTopLevel(container) && (!isDeclaredInLoop || (!inLoopInitializer && !inLoopBodyBlock)); + } + else { + links.isDeclaratonWithCollidingName = false; + } + } } - return links.isNestedRedeclaration; + return links.isDeclaratonWithCollidingName; } return false; } // When resolved as an expression identifier, if the given node references a nested block scoped entity with - // a name that hides an existing name, return the declaration of that entity. Otherwise, return undefined. - function getReferencedNestedRedeclaration(node: Identifier): Declaration { + // a name that either hides an existing name or might hide it when compiled downlevel, + // return the declaration of that entity. Otherwise, return undefined. + function getReferencedDeclarationWithCollidingName(node: Identifier): Declaration { const symbol = getReferencedValueSymbol(node); - return symbol && isNestedRedeclarationSymbol(symbol) ? symbol.valueDeclaration : undefined; + return symbol && isSymbolOfDeclarationWithCollidingName(symbol) ? symbol.valueDeclaration : undefined; } - // Return true if the given node is a declaration of a nested block scoped entity with a name that hides an - // existing name. - function isNestedRedeclaration(node: Declaration): boolean { - return isNestedRedeclarationSymbol(getSymbolOfNode(node)); + // Return true if the given node is a declaration of a nested block scoped entity with a name that either hides an + // existing name or might hide a name when compiled downlevel + function isDeclarationWithCollidingName(node: Declaration): boolean { + return isSymbolOfDeclarationWithCollidingName(getSymbolOfNode(node)); } function isValueAliasDeclaration(node: Node): boolean { @@ -15621,8 +15631,8 @@ namespace ts { return { getReferencedExportContainer, getReferencedImportDeclaration, - getReferencedNestedRedeclaration, - isNestedRedeclaration, + getReferencedDeclarationWithCollidingName, + isDeclarationWithCollidingName, isValueAliasDeclaration, hasGlobalName, isReferencedAliasDeclaration, diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 05983f72dcb..e50e38a65eb 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -1535,7 +1535,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge } if (languageVersion !== ScriptTarget.ES6) { - const declaration = resolver.getReferencedNestedRedeclaration(node); + const declaration = resolver.getReferencedDeclarationWithCollidingName(node); if (declaration) { write(getGeneratedNameForNode(declaration.name)); return; @@ -1551,7 +1551,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge } } - function isNameOfNestedRedeclaration(node: Identifier) { + function isNameOfNestedBlockScopedRedeclarationOrCapturedBinding(node: Identifier) { if (languageVersion < ScriptTarget.ES6) { const parent = node.parent; switch (parent.kind) { @@ -1559,7 +1559,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge case SyntaxKind.ClassDeclaration: case SyntaxKind.EnumDeclaration: case SyntaxKind.VariableDeclaration: - return (parent).name === node && resolver.isNestedRedeclaration(parent); + return (parent).name === node && resolver.isDeclarationWithCollidingName(parent); } } return false; @@ -1581,7 +1581,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge else if (isExpressionIdentifier(node)) { emitExpressionIdentifier(node); } - else if (isNameOfNestedRedeclaration(node)) { + else if (isNameOfNestedBlockScopedRedeclarationOrCapturedBinding(node)) { write(getGeneratedNameForNode(node)); } else if (nodeIsSynthesized(node)) { @@ -2855,7 +2855,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge function shouldConvertLoopBody(node: IterationStatement): boolean { return languageVersion < ScriptTarget.ES6 && - (resolver.getNodeCheckFlags(node) & NodeCheckFlags.LoopWithBlockScopedBindingCapturedInFunction) !== 0; + (resolver.getNodeCheckFlags(node) & NodeCheckFlags.LoopWithCapturedBlockScopedBinding) !== 0; } function emitLoop(node: IterationStatement, loopEmitter: (n: IterationStatement, convertedLoop: ConvertedLoop) => void): void { @@ -3009,7 +3009,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge function collectNames(name: Identifier | BindingPattern): void { if (name.kind === SyntaxKind.Identifier) { - const nameText = isNameOfNestedRedeclaration(name) ? getGeneratedNameForNode(name) : (name).text; + const nameText = isNameOfNestedBlockScopedRedeclarationOrCapturedBinding(name) ? getGeneratedNameForNode(name) : (name).text; loopParameters.push(nameText); } else { @@ -4025,22 +4025,56 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge } else { let initializer = node.initializer; - if (!initializer && languageVersion < ScriptTarget.ES6) { + if (!initializer && + languageVersion < ScriptTarget.ES6 && + // for names - binding patterns that lack initializer there is no point to emit explicit initializer + // since downlevel codegen for destructuring will fail in the absence of initializer so all binding elements will say uninitialized + node.name.kind === SyntaxKind.Identifier) { - // downlevel emit for non-initialized let bindings defined in loops - // for (...) { let x; } - // should be - // for (...) { var = void 0; } - // this is necessary to preserve ES6 semantic in scenarios like - // for (...) { let x; console.log(x); x = 1 } // assignment on one iteration should not affect other iterations - const isLetDefinedInLoop = - (resolver.getNodeCheckFlags(node) & NodeCheckFlags.BlockScopedBindingInLoop) && - (getCombinedFlagsForIdentifier(node.name) & NodeFlags.Let); + const container = getEnclosingBlockScopeContainer(node); + const flags = resolver.getNodeCheckFlags(node); - // NOTE: default initialization should not be added to let bindings in for-in\for-of statements - if (isLetDefinedInLoop && - node.parent.parent.kind !== SyntaxKind.ForInStatement && - node.parent.parent.kind !== SyntaxKind.ForOfStatement) { + // nested let bindings might need to be initialized explicitly to preserve ES6 semantic + // { let x = 1; } + // { let x; } // x here should be undefined. not 1 + // NOTES: + // Top level bindings never collide with anything and thus don't require explicit initialization. + // As for nested let bindings there are two cases: + // - nested let bindings that were not renamed definitely should be initialized explicitly + // { let x = 1; } + // { let x; if (some-condition) { x = 1}; if (x) { /*1*/ } } + // Without explicit initialization code in /*1*/ can be executed even if some-condition is evaluated to false + // - renaming introduces fresh name that should not collide with any existing names, however renamed bindings sometimes also should be + // explicitly initialized. One particular case: non-captured binding declared inside loop body (but not in loop initializer) + // let x; + // for (;;) { + // let x; + // } + // in downlevel codegen inner 'x' will be renamed so it won't collide with outer 'x' however it will should be reset on every iteration + // as if it was declared anew. + // * Why non-captured binding - because if loop contains block scoped binding captured in some function then loop body will be rewritten + // to have a fresh scope on every iteration so everything will just work. + // * Why loop initializer is excluded - since we've introduced a fresh name it already will be undefined. + const isCapturedInFunction = flags & NodeCheckFlags.CapturedBlockScopedBinding; + const isDeclaredInLoop = flags & NodeCheckFlags.BlockScopedBindingInLoop; + + const emittedAsTopLevel = + isBlockScopedContainerTopLevel(container) || + (isCapturedInFunction && isDeclaredInLoop && container.kind === SyntaxKind.Block && isIterationStatement(container.parent, /*lookInLabeledStatements*/ false)); + + const emittedAsNestedLetDeclaration = + getCombinedNodeFlags(node) & NodeFlags.Let && + !emittedAsTopLevel; + + const emitExplicitInitializer = + emittedAsNestedLetDeclaration && + container.kind !== SyntaxKind.ForInStatement && + container.kind !== SyntaxKind.ForOfStatement && + ( + !resolver.isDeclarationWithCollidingName(node) || + (isDeclaredInLoop && !isCapturedInFunction && !isIterationStatement(container, /*lookInLabeledStatements*/ false)) + ); + if (emitExplicitInitializer) { initializer = createVoidZero(); } } @@ -4075,14 +4109,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge } } - function getCombinedFlagsForIdentifier(node: Identifier): NodeFlags { - if (!node.parent || (node.parent.kind !== SyntaxKind.VariableDeclaration && node.parent.kind !== SyntaxKind.BindingElement)) { - return 0; - } - - return getCombinedNodeFlags(node.parent); - } - function isES6ExportedDeclaration(node: Node) { return !!(node.flags & NodeFlags.Export) && modulekind === ModuleKind.ES6 && diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 74c1af6ae52..38565b5bcc4 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1893,8 +1893,8 @@ namespace ts { hasGlobalName(name: string): boolean; getReferencedExportContainer(node: Identifier): SourceFile | ModuleDeclaration | EnumDeclaration; getReferencedImportDeclaration(node: Identifier): Declaration; - getReferencedNestedRedeclaration(node: Identifier): Declaration; - isNestedRedeclaration(node: Declaration): boolean; + getReferencedDeclarationWithCollidingName(node: Identifier): Declaration; + isDeclarationWithCollidingName(node: Declaration): boolean; isValueAliasDeclaration(node: Node): boolean; isReferencedAliasDeclaration(node: Node, checkChildren?: boolean): boolean; isTopLevelValueImportEqualsWithEntityName(node: ImportEqualsDeclaration): boolean; @@ -2030,7 +2030,7 @@ namespace ts { containingType?: UnionOrIntersectionType; // Containing union or intersection type for synthetic property resolvedExports?: SymbolTable; // Resolved exports of module exportsChecked?: boolean; // True if exports of external module have been checked - isNestedRedeclaration?: boolean; // True if symbol is block scoped redeclaration + isDeclaratonWithCollidingName?: boolean; // True if symbol is block scoped redeclaration bindingElement?: BindingElement; // Binding element associated with property symbol exportsSomeValue?: boolean; // true if module exports some value (not just types) } @@ -2060,9 +2060,10 @@ namespace ts { // Values for enum members have been computed, and any errors have been reported for them. EnumValuesComputed = 0x00002000, - BlockScopedBindingInLoop = 0x00004000, - LexicalModuleMergesWithClass = 0x00008000, // Instantiated lexical module declaration is merged with a previous class declaration. - LoopWithBlockScopedBindingCapturedInFunction = 0x00010000, // Loop that contains block scoped variable captured in closure + LexicalModuleMergesWithClass = 0x00004000, // Instantiated lexical module declaration is merged with a previous class declaration. + LoopWithCapturedBlockScopedBinding = 0x00008000, // Loop that contains block scoped variable captured in closure + CapturedBlockScopedBinding = 0x00010000, // Block-scoped binding that is captured in some function + BlockScopedBindingInLoop = 0x00020000, // Block-scoped binding with declaration nested inside iteration statement } /* @internal */ diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 69941a6095d..f8091a001e9 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -151,6 +151,18 @@ namespace ts { return node; } + export function isStatementWithLocals(node: Node) { + switch (node.kind) { + case SyntaxKind.Block: + case SyntaxKind.CaseBlock: + case SyntaxKind.ForStatement: + case SyntaxKind.ForInStatement: + case SyntaxKind.ForOfStatement: + return true; + } + return false; + } + export function getStartPositionOfLine(line: number, sourceFile: SourceFile): number { Debug.assert(line >= 0); return getLineStarts(sourceFile)[line]; @@ -256,6 +268,13 @@ namespace ts { ((node).name.kind === SyntaxKind.StringLiteral || isGlobalScopeAugmentation(node)); } + export function isBlockScopedContainerTopLevel(node: Node): boolean { + return node.kind === SyntaxKind.SourceFile || + node.kind === SyntaxKind.ModuleDeclaration || + isFunctionLike(node) || + isFunctionBlock(node); + } + export function isGlobalScopeAugmentation(module: ModuleDeclaration): boolean { return !!(module.flags & NodeFlags.GlobalAugmentation); } diff --git a/tests/baselines/reference/capturedLetConstInLoop1.js b/tests/baselines/reference/capturedLetConstInLoop1.js index 633b78af510..fe76bdd5c91 100644 --- a/tests/baselines/reference/capturedLetConstInLoop1.js +++ b/tests/baselines/reference/capturedLetConstInLoop1.js @@ -138,7 +138,7 @@ for (var x = 0; x < 1; ++x) { _loop_3(x); } var _loop_4 = function() { - var x = void 0; + var x; (function () { return x; }); (function () { return x; }); }; @@ -146,7 +146,7 @@ while (1 === 1) { _loop_4(); } var _loop_5 = function() { - var x = void 0; + var x; (function () { return x; }); (function () { return x; }); }; @@ -169,7 +169,7 @@ for (var x = 0, y = 1; x < 1; ++x) { _loop_7(x, y); } var _loop_8 = function() { - var x = void 0, y = void 0; + var x, y; (function () { return x + y; }); (function () { return x + y; }); }; @@ -177,7 +177,7 @@ while (1 === 1) { _loop_8(); } var _loop_9 = function() { - var x = void 0, y = void 0; + var x, y; (function () { return x + y; }); (function () { return x + y; }); }; diff --git a/tests/baselines/reference/capturedLetConstInLoop2.js b/tests/baselines/reference/capturedLetConstInLoop2.js index b9fbcf46f57..b41dd380a24 100644 --- a/tests/baselines/reference/capturedLetConstInLoop2.js +++ b/tests/baselines/reference/capturedLetConstInLoop2.js @@ -225,7 +225,7 @@ function foo2(x) { } function foo3(x) { var _loop_5 = function() { - var x_4 = void 0; + var x_4; var a = arguments_5.length; (function () { return x_4 + a; }); (function () { return x_4 + a; }); @@ -260,7 +260,7 @@ function foo5(x) { } function foo6(x) { var _loop_8 = function() { - var x_7 = void 0, y = void 0; + var x_7, y; var a = arguments_8.length; (function () { return x_7 + y + a; }); (function () { return x_7 + y + a; }); @@ -272,7 +272,7 @@ function foo6(x) { } function foo7(x) { var _loop_9 = function() { - var x_8 = void 0, y = void 0; + var x_8, y; var a = arguments_9.length; (function () { return x_8 + y + a; }); (function () { return x_8 + y + a; }); diff --git a/tests/baselines/reference/capturedLetConstInLoop3.js b/tests/baselines/reference/capturedLetConstInLoop3.js index b38c12967dd..233dfe9206c 100644 --- a/tests/baselines/reference/capturedLetConstInLoop3.js +++ b/tests/baselines/reference/capturedLetConstInLoop3.js @@ -270,7 +270,7 @@ function foo2(x) { } function foo3(x) { var _loop_5 = function() { - var x_5 = void 0; + var x_5; (function () { return x_5 + v; }); (function () { return x_5 + v; }); }; @@ -307,7 +307,7 @@ function foo5(x) { } function foo6(x) { var _loop_8 = function() { - var x_8 = void 0, y = void 0; + var x_8, y; v = x_8; (function () { return x_8 + y + v; }); (function () { return x_8 + y + v; }); @@ -320,7 +320,7 @@ function foo6(x) { } function foo7(x) { var _loop_9 = function() { - var x_9 = void 0, y = void 0; + var x_9, y; v = x_9; (function () { return x_9 + y + v; }); (function () { return x_9 + y + v; }); diff --git a/tests/baselines/reference/capturedLetConstInLoop4.js b/tests/baselines/reference/capturedLetConstInLoop4.js index 724c84fe04f..160be3ccaef 100644 --- a/tests/baselines/reference/capturedLetConstInLoop4.js +++ b/tests/baselines/reference/capturedLetConstInLoop4.js @@ -186,7 +186,7 @@ System.register([], function(exports_1) { _loop_3(x); } var _loop_4 = function() { - var x = void 0; + var x; v2 = x; (function () { return x + v2; }); (function () { return x; }); @@ -195,7 +195,7 @@ System.register([], function(exports_1) { _loop_4(); } var _loop_5 = function() { - var x = void 0; + var x; v3 = x; (function () { return x + v3; }); (function () { return x; }); @@ -221,7 +221,7 @@ System.register([], function(exports_1) { _loop_7(x, y); } var _loop_8 = function() { - var x = void 0, y = void 0; + var x, y; v6 = x; (function () { return x + y + v6; }); (function () { return x + y; }); @@ -230,7 +230,7 @@ System.register([], function(exports_1) { _loop_8(); } var _loop_9 = function() { - var x = void 0, y = void 0; + var x, y; v7 = x; (function () { return x + y + v7; }); (function () { return x + y; }); diff --git a/tests/baselines/reference/capturedLetConstInLoop5.js b/tests/baselines/reference/capturedLetConstInLoop5.js index b73484cb430..7807edd122e 100644 --- a/tests/baselines/reference/capturedLetConstInLoop5.js +++ b/tests/baselines/reference/capturedLetConstInLoop5.js @@ -349,7 +349,7 @@ function foo2(x) { } function foo3(x) { var _loop_5 = function() { - var x_5 = void 0; + var x_5; (function () { return x_5 + v; }); (function () { return x_5 + v; }); if (x_5 == 1) { @@ -398,7 +398,7 @@ function foo5(x) { } function foo6(x) { var _loop_8 = function() { - var x_8 = void 0, y = void 0; + var x_8, y; v = x_8; (function () { return x_8 + y + v; }); (function () { return x_8 + y + v; }); @@ -416,7 +416,7 @@ function foo6(x) { } function foo7(x) { var _loop_9 = function() { - var x_9 = void 0, y = void 0; + var x_9, y; v = x_9; (function () { return x_9 + y + v; }); (function () { return x_9 + y + v; }); diff --git a/tests/baselines/reference/capturedLetConstInLoop6.js b/tests/baselines/reference/capturedLetConstInLoop6.js index ca3b634ef18..e196950e696 100644 --- a/tests/baselines/reference/capturedLetConstInLoop6.js +++ b/tests/baselines/reference/capturedLetConstInLoop6.js @@ -287,7 +287,7 @@ for (var x = 0; x < 1; ++x) { if (state_3 === "continue") continue; } var _loop_4 = function() { - var x = void 0; + var x; (function () { return x; }); (function () { return x; }); if (x == 1) { @@ -303,7 +303,7 @@ while (1 === 1) { if (state_4 === "continue") continue; } var _loop_5 = function() { - var x = void 0; + var x; (function () { return x; }); (function () { return x; }); if (x == 1) { @@ -350,7 +350,7 @@ for (var x = 0, y = 1; x < 1; ++x) { if (state_7 === "continue") continue; } var _loop_8 = function() { - var x = void 0, y = void 0; + var x, y; (function () { return x + y; }); (function () { return x + y; }); if (x == 1) { @@ -366,7 +366,7 @@ while (1 === 1) { if (state_8 === "continue") continue; } var _loop_9 = function() { - var x = void 0, y = void 0; + var x, y; (function () { return x + y; }); (function () { return x + y; }); if (x == 1) { diff --git a/tests/baselines/reference/capturedLetConstInLoop7.js b/tests/baselines/reference/capturedLetConstInLoop7.js index 6ec4ec1df44..8df93bca60f 100644 --- a/tests/baselines/reference/capturedLetConstInLoop7.js +++ b/tests/baselines/reference/capturedLetConstInLoop7.js @@ -454,7 +454,7 @@ l1: for (var x = 0; x < 1; ++x) { } } var _loop_4 = function() { - var x = void 0; + var x; (function () { return x; }); (function () { return x; }); if (x == 1) { @@ -480,7 +480,7 @@ l2: while (1 === 1) { } } var _loop_5 = function() { - var x = void 0; + var x; (function () { return x; }); (function () { return x; }); if (x == 1) { @@ -557,7 +557,7 @@ l5: for (var x = 0, y = 1; x < 1; ++x) { } } var _loop_8 = function() { - var x = void 0, y = void 0; + var x, y; (function () { return x + y; }); (function () { return x + y; }); if (x == 1) { @@ -583,7 +583,7 @@ l6: while (1 === 1) { } } var _loop_9 = function() { - var x = void 0, y = void 0; + var x, y; (function () { return x + y; }); (function () { return x + y; }); if (x == 1) { diff --git a/tests/baselines/reference/capturedLetConstInLoop9.js b/tests/baselines/reference/capturedLetConstInLoop9.js index 9b31218a1e3..cbd4f7efe79 100644 --- a/tests/baselines/reference/capturedLetConstInLoop9.js +++ b/tests/baselines/reference/capturedLetConstInLoop9.js @@ -140,25 +140,25 @@ function foo3 () { //// [capturedLetConstInLoop9.js] var _loop_1 = function(x) { - var x_1 = void 0; + var x_1; (function () { return x_1; }); { - var x_2 = void 0; + var x_2; (function () { return x_2; }); } try { } catch (e) { - var x_3 = void 0; + var x_3; (function () { return x_3; }); } switch (x_1) { case 1: - var x_4 = void 0; + var x_4; (function () { return x_4; }); break; } var _loop_2 = function() { - var x_5 = void 0; + var x_5; (function () { return x_5; }); }; while (1 == 1) { diff --git a/tests/baselines/reference/downlevelLetConst16.js b/tests/baselines/reference/downlevelLetConst16.js index 4b9d4c438fc..edc778209be 100644 --- a/tests/baselines/reference/downlevelLetConst16.js +++ b/tests/baselines/reference/downlevelLetConst16.js @@ -367,7 +367,7 @@ var M4; use(z); })(M4 || (M4 = {})); function foo3() { - for (var x_7 = void 0;;) { + for (var x_7;;) { use(x_7); } for (var y_7 = [][0];;) { diff --git a/tests/baselines/reference/downlevelLetConst17.js b/tests/baselines/reference/downlevelLetConst17.js index 56ab1e6df54..49212b267f0 100644 --- a/tests/baselines/reference/downlevelLetConst17.js +++ b/tests/baselines/reference/downlevelLetConst17.js @@ -86,7 +86,7 @@ for (;;) { var x_4 = 10; use(x_4); } -for (var x_5 = void 0;;) { +for (var x_5;;) { use(x_5); x_5 = 1; } diff --git a/tests/baselines/reference/nestedBlockScopedBindings1.js b/tests/baselines/reference/nestedBlockScopedBindings1.js new file mode 100644 index 00000000000..ea2745c472e --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings1.js @@ -0,0 +1,97 @@ +//// [nestedBlockScopedBindings1.ts] +function a0() { + { + let x = 1; + } + { + let x = 1; + } +} + +function a1() { + { + let x; + } + { + let x = 1; + } +} + +function a2() { + { + let x = 1; + } + { + let x; + } +} + +function a3() { + { + let x = 1; + } + switch (1) { + case 1: + let x; + break; + } +} + + +function a4() { + { + let x; + } + switch (1) { + case 1: + let x = 1; + break; + } +} + + +//// [nestedBlockScopedBindings1.js] +function a0() { + { + var x = 1; + } + { + var x = 1; + } +} +function a1() { + { + var x = void 0; + } + { + var x = 1; + } +} +function a2() { + { + var x = 1; + } + { + var x = void 0; + } +} +function a3() { + { + var x = 1; + } + switch (1) { + case 1: + var x = void 0; + break; + } +} +function a4() { + { + var x = void 0; + } + switch (1) { + case 1: + var x = 1; + break; + } +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings1.symbols b/tests/baselines/reference/nestedBlockScopedBindings1.symbols new file mode 100644 index 00000000000..80348a13911 --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings1.symbols @@ -0,0 +1,68 @@ +=== tests/cases/compiler/nestedBlockScopedBindings1.ts === +function a0() { +>a0 : Symbol(a0, Decl(nestedBlockScopedBindings1.ts, 0, 0)) + { + let x = 1; +>x : Symbol(x, Decl(nestedBlockScopedBindings1.ts, 2, 11)) + } + { + let x = 1; +>x : Symbol(x, Decl(nestedBlockScopedBindings1.ts, 5, 11)) + } +} + +function a1() { +>a1 : Symbol(a1, Decl(nestedBlockScopedBindings1.ts, 7, 1)) + { + let x; +>x : Symbol(x, Decl(nestedBlockScopedBindings1.ts, 11, 11)) + } + { + let x = 1; +>x : Symbol(x, Decl(nestedBlockScopedBindings1.ts, 14, 11)) + } +} + +function a2() { +>a2 : Symbol(a2, Decl(nestedBlockScopedBindings1.ts, 16, 1)) + { + let x = 1; +>x : Symbol(x, Decl(nestedBlockScopedBindings1.ts, 20, 11)) + } + { + let x; +>x : Symbol(x, Decl(nestedBlockScopedBindings1.ts, 23, 11)) + } +} + +function a3() { +>a3 : Symbol(a3, Decl(nestedBlockScopedBindings1.ts, 25, 1)) + { + let x = 1; +>x : Symbol(x, Decl(nestedBlockScopedBindings1.ts, 29, 11)) + } + switch (1) { + case 1: + let x; +>x : Symbol(x, Decl(nestedBlockScopedBindings1.ts, 33, 15)) + + break; + } +} + + +function a4() { +>a4 : Symbol(a4, Decl(nestedBlockScopedBindings1.ts, 36, 1)) + { + let x; +>x : Symbol(x, Decl(nestedBlockScopedBindings1.ts, 41, 11)) + } + switch (1) { + case 1: + let x = 1; +>x : Symbol(x, Decl(nestedBlockScopedBindings1.ts, 45, 15)) + + break; + } +} + diff --git a/tests/baselines/reference/nestedBlockScopedBindings1.types b/tests/baselines/reference/nestedBlockScopedBindings1.types new file mode 100644 index 00000000000..6d5b47a348b --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings1.types @@ -0,0 +1,82 @@ +=== tests/cases/compiler/nestedBlockScopedBindings1.ts === +function a0() { +>a0 : () => void + { + let x = 1; +>x : number +>1 : number + } + { + let x = 1; +>x : number +>1 : number + } +} + +function a1() { +>a1 : () => void + { + let x; +>x : any + } + { + let x = 1; +>x : number +>1 : number + } +} + +function a2() { +>a2 : () => void + { + let x = 1; +>x : number +>1 : number + } + { + let x; +>x : any + } +} + +function a3() { +>a3 : () => void + { + let x = 1; +>x : number +>1 : number + } + switch (1) { +>1 : number + + case 1: +>1 : number + + let x; +>x : any + + break; + } +} + + +function a4() { +>a4 : () => void + { + let x; +>x : any + } + switch (1) { +>1 : number + + case 1: +>1 : number + + let x = 1; +>x : number +>1 : number + + break; + } +} + diff --git a/tests/baselines/reference/nestedBlockScopedBindings10.js b/tests/baselines/reference/nestedBlockScopedBindings10.js new file mode 100644 index 00000000000..4cac5bceeeb --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings10.js @@ -0,0 +1,24 @@ +//// [nestedBlockScopedBindings10.ts] +{ + let x; + x = 1; +} + +switch (1) { + case 1: + let y; + y = 1; + break; +} + +//// [nestedBlockScopedBindings10.js] +{ + var x = void 0; + x = 1; +} +switch (1) { + case 1: + var y = void 0; + y = 1; + break; +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings10.symbols b/tests/baselines/reference/nestedBlockScopedBindings10.symbols new file mode 100644 index 00000000000..a569e1b1f92 --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings10.symbols @@ -0,0 +1,19 @@ +=== tests/cases/compiler/nestedBlockScopedBindings10.ts === +{ + let x; +>x : Symbol(x, Decl(nestedBlockScopedBindings10.ts, 1, 7)) + + x = 1; +>x : Symbol(x, Decl(nestedBlockScopedBindings10.ts, 1, 7)) +} + +switch (1) { + case 1: + let y; +>y : Symbol(y, Decl(nestedBlockScopedBindings10.ts, 7, 11)) + + y = 1; +>y : Symbol(y, Decl(nestedBlockScopedBindings10.ts, 7, 11)) + + break; +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings10.types b/tests/baselines/reference/nestedBlockScopedBindings10.types new file mode 100644 index 00000000000..ee2701cdcf1 --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings10.types @@ -0,0 +1,27 @@ +=== tests/cases/compiler/nestedBlockScopedBindings10.ts === +{ + let x; +>x : any + + x = 1; +>x = 1 : number +>x : any +>1 : number +} + +switch (1) { +>1 : number + + case 1: +>1 : number + + let y; +>y : any + + y = 1; +>y = 1 : number +>y : any +>1 : number + + break; +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings11.js b/tests/baselines/reference/nestedBlockScopedBindings11.js new file mode 100644 index 00000000000..23a536bcbb1 --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings11.js @@ -0,0 +1,28 @@ +//// [nestedBlockScopedBindings11.ts] +var x; +{ + let x; + () => x; +} + +var y; +switch (1) { + case 1: + let y; + () => y; + break; +} + +//// [nestedBlockScopedBindings11.js] +var x; +{ + var x_1; + (function () { return x_1; }); +} +var y; +switch (1) { + case 1: + var y_1; + (function () { return y_1; }); + break; +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings11.symbols b/tests/baselines/reference/nestedBlockScopedBindings11.symbols new file mode 100644 index 00000000000..fb3886fedee --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings11.symbols @@ -0,0 +1,24 @@ +=== tests/cases/compiler/nestedBlockScopedBindings11.ts === +var x; +>x : Symbol(x, Decl(nestedBlockScopedBindings11.ts, 0, 3)) +{ + let x; +>x : Symbol(x, Decl(nestedBlockScopedBindings11.ts, 2, 7)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings11.ts, 2, 7)) +} + +var y; +>y : Symbol(y, Decl(nestedBlockScopedBindings11.ts, 6, 3)) + +switch (1) { + case 1: + let y; +>y : Symbol(y, Decl(nestedBlockScopedBindings11.ts, 9, 11)) + + () => y; +>y : Symbol(y, Decl(nestedBlockScopedBindings11.ts, 9, 11)) + + break; +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings11.types b/tests/baselines/reference/nestedBlockScopedBindings11.types new file mode 100644 index 00000000000..ab7b4228278 --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings11.types @@ -0,0 +1,30 @@ +=== tests/cases/compiler/nestedBlockScopedBindings11.ts === +var x; +>x : any +{ + let x; +>x : any + + () => x; +>() => x : () => any +>x : any +} + +var y; +>y : any + +switch (1) { +>1 : number + + case 1: +>1 : number + + let y; +>y : any + + () => y; +>() => y : () => any +>y : any + + break; +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings12.js b/tests/baselines/reference/nestedBlockScopedBindings12.js new file mode 100644 index 00000000000..0b3e323a263 --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings12.js @@ -0,0 +1,28 @@ +//// [nestedBlockScopedBindings12.ts] +var x; +{ + let x; + x = 1; +} + +var y; +switch (1) { + case 1: + let y; + y = 1; + break; +} + +//// [nestedBlockScopedBindings12.js] +var x; +{ + var x_1; + x_1 = 1; +} +var y; +switch (1) { + case 1: + var y_1; + y_1 = 1; + break; +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings12.symbols b/tests/baselines/reference/nestedBlockScopedBindings12.symbols new file mode 100644 index 00000000000..bff0293e45f --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings12.symbols @@ -0,0 +1,24 @@ +=== tests/cases/compiler/nestedBlockScopedBindings12.ts === +var x; +>x : Symbol(x, Decl(nestedBlockScopedBindings12.ts, 0, 3)) +{ + let x; +>x : Symbol(x, Decl(nestedBlockScopedBindings12.ts, 2, 7)) + + x = 1; +>x : Symbol(x, Decl(nestedBlockScopedBindings12.ts, 2, 7)) +} + +var y; +>y : Symbol(y, Decl(nestedBlockScopedBindings12.ts, 6, 3)) + +switch (1) { + case 1: + let y; +>y : Symbol(y, Decl(nestedBlockScopedBindings12.ts, 9, 11)) + + y = 1; +>y : Symbol(y, Decl(nestedBlockScopedBindings12.ts, 9, 11)) + + break; +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings12.types b/tests/baselines/reference/nestedBlockScopedBindings12.types new file mode 100644 index 00000000000..8c1fdda0ce0 --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings12.types @@ -0,0 +1,32 @@ +=== tests/cases/compiler/nestedBlockScopedBindings12.ts === +var x; +>x : any +{ + let x; +>x : any + + x = 1; +>x = 1 : number +>x : any +>1 : number +} + +var y; +>y : any + +switch (1) { +>1 : number + + case 1: +>1 : number + + let y; +>y : any + + y = 1; +>y = 1 : number +>y : any +>1 : number + + break; +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings13.js b/tests/baselines/reference/nestedBlockScopedBindings13.js new file mode 100644 index 00000000000..86e5635df68 --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings13.js @@ -0,0 +1,23 @@ +//// [nestedBlockScopedBindings13.ts] +for (; false;) { + let x; + () => x; +} + +for (; false;) { + let y; + y = 1; +} + +//// [nestedBlockScopedBindings13.js] +var _loop_1 = function() { + var x; + (function () { return x; }); +}; +for (; false;) { + _loop_1(); +} +for (; false;) { + var y = void 0; + y = 1; +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings13.symbols b/tests/baselines/reference/nestedBlockScopedBindings13.symbols new file mode 100644 index 00000000000..a5bc7ed7866 --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings13.symbols @@ -0,0 +1,16 @@ +=== tests/cases/compiler/nestedBlockScopedBindings13.ts === +for (; false;) { + let x; +>x : Symbol(x, Decl(nestedBlockScopedBindings13.ts, 1, 7)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings13.ts, 1, 7)) +} + +for (; false;) { + let y; +>y : Symbol(y, Decl(nestedBlockScopedBindings13.ts, 6, 7)) + + y = 1; +>y : Symbol(y, Decl(nestedBlockScopedBindings13.ts, 6, 7)) +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings13.types b/tests/baselines/reference/nestedBlockScopedBindings13.types new file mode 100644 index 00000000000..2e7bc7de77e --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings13.types @@ -0,0 +1,23 @@ +=== tests/cases/compiler/nestedBlockScopedBindings13.ts === +for (; false;) { +>false : boolean + + let x; +>x : any + + () => x; +>() => x : () => any +>x : any +} + +for (; false;) { +>false : boolean + + let y; +>y : any + + y = 1; +>y = 1 : number +>y : any +>1 : number +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings14.js b/tests/baselines/reference/nestedBlockScopedBindings14.js new file mode 100644 index 00000000000..1180f587420 --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings14.js @@ -0,0 +1,27 @@ +//// [nestedBlockScopedBindings14.ts] +var x; +for (; false;) { + let x; + () => x; +} + +var y; +for (; false;) { + let y; + y = 1; +} + +//// [nestedBlockScopedBindings14.js] +var x; +var _loop_1 = function() { + var x_1; + (function () { return x_1; }); +}; +for (; false;) { + _loop_1(); +} +var y; +for (; false;) { + var y_1 = void 0; + y_1 = 1; +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings14.symbols b/tests/baselines/reference/nestedBlockScopedBindings14.symbols new file mode 100644 index 00000000000..4a13b296e88 --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings14.symbols @@ -0,0 +1,22 @@ +=== tests/cases/compiler/nestedBlockScopedBindings14.ts === +var x; +>x : Symbol(x, Decl(nestedBlockScopedBindings14.ts, 0, 3)) + +for (; false;) { + let x; +>x : Symbol(x, Decl(nestedBlockScopedBindings14.ts, 2, 7)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings14.ts, 2, 7)) +} + +var y; +>y : Symbol(y, Decl(nestedBlockScopedBindings14.ts, 6, 3)) + +for (; false;) { + let y; +>y : Symbol(y, Decl(nestedBlockScopedBindings14.ts, 8, 7)) + + y = 1; +>y : Symbol(y, Decl(nestedBlockScopedBindings14.ts, 8, 7)) +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings14.types b/tests/baselines/reference/nestedBlockScopedBindings14.types new file mode 100644 index 00000000000..966eaaaac7a --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings14.types @@ -0,0 +1,29 @@ +=== tests/cases/compiler/nestedBlockScopedBindings14.ts === +var x; +>x : any + +for (; false;) { +>false : boolean + + let x; +>x : any + + () => x; +>() => x : () => any +>x : any +} + +var y; +>y : any + +for (; false;) { +>false : boolean + + let y; +>y : any + + y = 1; +>y = 1 : number +>y : any +>1 : number +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings15.js b/tests/baselines/reference/nestedBlockScopedBindings15.js new file mode 100644 index 00000000000..8e294de98e4 --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings15.js @@ -0,0 +1,68 @@ +//// [nestedBlockScopedBindings15.ts] +for (; false;) { + { + let x; + () => x; + } +} + +for (; false;) { + { + let y; + y = 1; + } +} + +for (; false;) { + switch (1){ + case 1: + let z0; + () => z0; + break; + } +} + +for (; false;) { + switch (1){ + case 1: + let z; + z = 1; + break; + } +} + +//// [nestedBlockScopedBindings15.js] +var _loop_1 = function() { + { + var x_1; + (function () { return x_1; }); + } +}; +for (; false;) { + _loop_1(); +} +for (; false;) { + { + var y = void 0; + y = 1; + } +} +var _loop_2 = function() { + switch (1) { + case 1: + var z0_1; + (function () { return z0_1; }); + break; + } +}; +for (; false;) { + _loop_2(); +} +for (; false;) { + switch (1) { + case 1: + var z = void 0; + z = 1; + break; + } +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings15.symbols b/tests/baselines/reference/nestedBlockScopedBindings15.symbols new file mode 100644 index 00000000000..26ef28f6050 --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings15.symbols @@ -0,0 +1,46 @@ +=== tests/cases/compiler/nestedBlockScopedBindings15.ts === +for (; false;) { + { + let x; +>x : Symbol(x, Decl(nestedBlockScopedBindings15.ts, 2, 11)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings15.ts, 2, 11)) + } +} + +for (; false;) { + { + let y; +>y : Symbol(y, Decl(nestedBlockScopedBindings15.ts, 9, 11)) + + y = 1; +>y : Symbol(y, Decl(nestedBlockScopedBindings15.ts, 9, 11)) + } +} + +for (; false;) { + switch (1){ + case 1: + let z0; +>z0 : Symbol(z0, Decl(nestedBlockScopedBindings15.ts, 17, 15)) + + () => z0; +>z0 : Symbol(z0, Decl(nestedBlockScopedBindings15.ts, 17, 15)) + + break; + } +} + +for (; false;) { + switch (1){ + case 1: + let z; +>z : Symbol(z, Decl(nestedBlockScopedBindings15.ts, 26, 15)) + + z = 1; +>z : Symbol(z, Decl(nestedBlockScopedBindings15.ts, 26, 15)) + + break; + } +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings15.types b/tests/baselines/reference/nestedBlockScopedBindings15.types new file mode 100644 index 00000000000..5173c0c5600 --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings15.types @@ -0,0 +1,66 @@ +=== tests/cases/compiler/nestedBlockScopedBindings15.ts === +for (; false;) { +>false : boolean + { + let x; +>x : any + + () => x; +>() => x : () => any +>x : any + } +} + +for (; false;) { +>false : boolean + { + let y; +>y : any + + y = 1; +>y = 1 : number +>y : any +>1 : number + } +} + +for (; false;) { +>false : boolean + + switch (1){ +>1 : number + + case 1: +>1 : number + + let z0; +>z0 : any + + () => z0; +>() => z0 : () => any +>z0 : any + + break; + } +} + +for (; false;) { +>false : boolean + + switch (1){ +>1 : number + + case 1: +>1 : number + + let z; +>z : any + + z = 1; +>z = 1 : number +>z : any +>1 : number + + break; + } +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings16.js b/tests/baselines/reference/nestedBlockScopedBindings16.js new file mode 100644 index 00000000000..91f67d0d8f2 --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings16.js @@ -0,0 +1,76 @@ +//// [nestedBlockScopedBindings16.ts] +var x; +for (; false;) { + { + let x; + () => x; + } +} + +var y; +for (; false;) { + { + let y; + y = 1; + } +} + +var z0; +for (; false;) { + switch (1){ + case 1: + let z0; + () => z0; + break; + } +} + +var z; +for (; false;) { + switch (1){ + case 1: + let z; + z = 1; + break; + } +} + +//// [nestedBlockScopedBindings16.js] +var x; +var _loop_1 = function() { + { + var x_1; + (function () { return x_1; }); + } +}; +for (; false;) { + _loop_1(); +} +var y; +for (; false;) { + { + var y_1 = void 0; + y_1 = 1; + } +} +var z0; +var _loop_2 = function() { + switch (1) { + case 1: + var z0_1; + (function () { return z0_1; }); + break; + } +}; +for (; false;) { + _loop_2(); +} +var z; +for (; false;) { + switch (1) { + case 1: + var z_1 = void 0; + z_1 = 1; + break; + } +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings16.symbols b/tests/baselines/reference/nestedBlockScopedBindings16.symbols new file mode 100644 index 00000000000..cbe8114cf14 --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings16.symbols @@ -0,0 +1,58 @@ +=== tests/cases/compiler/nestedBlockScopedBindings16.ts === +var x; +>x : Symbol(x, Decl(nestedBlockScopedBindings16.ts, 0, 3)) + +for (; false;) { + { + let x; +>x : Symbol(x, Decl(nestedBlockScopedBindings16.ts, 3, 11)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings16.ts, 3, 11)) + } +} + +var y; +>y : Symbol(y, Decl(nestedBlockScopedBindings16.ts, 8, 3)) + +for (; false;) { + { + let y; +>y : Symbol(y, Decl(nestedBlockScopedBindings16.ts, 11, 11)) + + y = 1; +>y : Symbol(y, Decl(nestedBlockScopedBindings16.ts, 11, 11)) + } +} + +var z0; +>z0 : Symbol(z0, Decl(nestedBlockScopedBindings16.ts, 16, 3)) + +for (; false;) { + switch (1){ + case 1: + let z0; +>z0 : Symbol(z0, Decl(nestedBlockScopedBindings16.ts, 20, 15)) + + () => z0; +>z0 : Symbol(z0, Decl(nestedBlockScopedBindings16.ts, 20, 15)) + + break; + } +} + +var z; +>z : Symbol(z, Decl(nestedBlockScopedBindings16.ts, 26, 3)) + +for (; false;) { + switch (1){ + case 1: + let z; +>z : Symbol(z, Decl(nestedBlockScopedBindings16.ts, 30, 15)) + + z = 1; +>z : Symbol(z, Decl(nestedBlockScopedBindings16.ts, 30, 15)) + + break; + } +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings16.types b/tests/baselines/reference/nestedBlockScopedBindings16.types new file mode 100644 index 00000000000..22698402a62 --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings16.types @@ -0,0 +1,78 @@ +=== tests/cases/compiler/nestedBlockScopedBindings16.ts === +var x; +>x : any + +for (; false;) { +>false : boolean + { + let x; +>x : any + + () => x; +>() => x : () => any +>x : any + } +} + +var y; +>y : any + +for (; false;) { +>false : boolean + { + let y; +>y : any + + y = 1; +>y = 1 : number +>y : any +>1 : number + } +} + +var z0; +>z0 : any + +for (; false;) { +>false : boolean + + switch (1){ +>1 : number + + case 1: +>1 : number + + let z0; +>z0 : any + + () => z0; +>() => z0 : () => any +>z0 : any + + break; + } +} + +var z; +>z : any + +for (; false;) { +>false : boolean + + switch (1){ +>1 : number + + case 1: +>1 : number + + let z; +>z : any + + z = 1; +>z = 1 : number +>z : any +>1 : number + + break; + } +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings2.js b/tests/baselines/reference/nestedBlockScopedBindings2.js new file mode 100644 index 00000000000..f3a8d7f0f67 --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings2.js @@ -0,0 +1,244 @@ +//// [nestedBlockScopedBindings2.ts] +function a0() { + { + let x = 1; + () => x; + } + { + let x = 1; + } +} + +function a1() { + { + let x; + } + { + let x = 1; + () => x; + } +} + +function a2() { + { + let x = 1; + () => x; + } + { + let x; + () => x; + } +} + + +function a3() { + { + let x = 1; + () => x; + } + switch (1) { + case 1: + let x; + () => x; + break; + } +} + + +function a4() { + { + let x; + } + switch (1) { + case 1: + let x; + () => x; + break; + } +} + + +function a5() { + { + let x; + () => x; + } + switch (1) { + case 1: + let x; + break; + } +} + +function a6() { + switch (1) { + case 1: + let x; + break; + } + switch (1) { + case 1: + let x; + break; + } +} + +function a7() { + switch (1) { + case 1: + let x; + () => x; + break; + } + switch (1) { + case 1: + let x; + break; + } +} + +function a8() { + switch (1) { + case 1: + let x; + break; + } + switch (1) { + case 1: + let x; + () => x; + break; + } +} + +function a9() { + switch (1) { + case 1: + let x; + () => x; + break; + } + switch (1) { + case 1: + let x; + () => x; + break; + } +} + + +//// [nestedBlockScopedBindings2.js] +function a0() { + { + var x_1 = 1; + (function () { return x_1; }); + } + { + var x = 1; + } +} +function a1() { + { + var x = void 0; + } + { + var x_2 = 1; + (function () { return x_2; }); + } +} +function a2() { + { + var x_3 = 1; + (function () { return x_3; }); + } + { + var x_4; + (function () { return x_4; }); + } +} +function a3() { + { + var x_5 = 1; + (function () { return x_5; }); + } + switch (1) { + case 1: + var x_6; + (function () { return x_6; }); + break; + } +} +function a4() { + { + var x = void 0; + } + switch (1) { + case 1: + var x_7; + (function () { return x_7; }); + break; + } +} +function a5() { + { + var x_8; + (function () { return x_8; }); + } + switch (1) { + case 1: + var x = void 0; + break; + } +} +function a6() { + switch (1) { + case 1: + var x = void 0; + break; + } + switch (1) { + case 1: + var x = void 0; + break; + } +} +function a7() { + switch (1) { + case 1: + var x_9; + (function () { return x_9; }); + break; + } + switch (1) { + case 1: + var x = void 0; + break; + } +} +function a8() { + switch (1) { + case 1: + var x = void 0; + break; + } + switch (1) { + case 1: + var x_10; + (function () { return x_10; }); + break; + } +} +function a9() { + switch (1) { + case 1: + var x_11; + (function () { return x_11; }); + break; + } + switch (1) { + case 1: + var x_12; + (function () { return x_12; }); + break; + } +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings2.symbols b/tests/baselines/reference/nestedBlockScopedBindings2.symbols new file mode 100644 index 00000000000..e97e1539e95 --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings2.symbols @@ -0,0 +1,197 @@ +=== tests/cases/compiler/nestedBlockScopedBindings2.ts === +function a0() { +>a0 : Symbol(a0, Decl(nestedBlockScopedBindings2.ts, 0, 0)) + { + let x = 1; +>x : Symbol(x, Decl(nestedBlockScopedBindings2.ts, 2, 11)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings2.ts, 2, 11)) + } + { + let x = 1; +>x : Symbol(x, Decl(nestedBlockScopedBindings2.ts, 6, 11)) + } +} + +function a1() { +>a1 : Symbol(a1, Decl(nestedBlockScopedBindings2.ts, 8, 1)) + { + let x; +>x : Symbol(x, Decl(nestedBlockScopedBindings2.ts, 12, 11)) + } + { + let x = 1; +>x : Symbol(x, Decl(nestedBlockScopedBindings2.ts, 15, 11)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings2.ts, 15, 11)) + } +} + +function a2() { +>a2 : Symbol(a2, Decl(nestedBlockScopedBindings2.ts, 18, 1)) + { + let x = 1; +>x : Symbol(x, Decl(nestedBlockScopedBindings2.ts, 22, 11)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings2.ts, 22, 11)) + } + { + let x; +>x : Symbol(x, Decl(nestedBlockScopedBindings2.ts, 26, 11)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings2.ts, 26, 11)) + } +} + + +function a3() { +>a3 : Symbol(a3, Decl(nestedBlockScopedBindings2.ts, 29, 1)) + { + let x = 1; +>x : Symbol(x, Decl(nestedBlockScopedBindings2.ts, 34, 11)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings2.ts, 34, 11)) + } + switch (1) { + case 1: + let x; +>x : Symbol(x, Decl(nestedBlockScopedBindings2.ts, 39, 15)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings2.ts, 39, 15)) + + break; + } +} + + +function a4() { +>a4 : Symbol(a4, Decl(nestedBlockScopedBindings2.ts, 43, 1)) + { + let x; +>x : Symbol(x, Decl(nestedBlockScopedBindings2.ts, 48, 11)) + } + switch (1) { + case 1: + let x; +>x : Symbol(x, Decl(nestedBlockScopedBindings2.ts, 52, 15)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings2.ts, 52, 15)) + + break; + } +} + + +function a5() { +>a5 : Symbol(a5, Decl(nestedBlockScopedBindings2.ts, 56, 1)) + { + let x; +>x : Symbol(x, Decl(nestedBlockScopedBindings2.ts, 61, 11)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings2.ts, 61, 11)) + } + switch (1) { + case 1: + let x; +>x : Symbol(x, Decl(nestedBlockScopedBindings2.ts, 66, 15)) + + break; + } +} + +function a6() { +>a6 : Symbol(a6, Decl(nestedBlockScopedBindings2.ts, 69, 1)) + + switch (1) { + case 1: + let x; +>x : Symbol(x, Decl(nestedBlockScopedBindings2.ts, 74, 15)) + + break; + } + switch (1) { + case 1: + let x; +>x : Symbol(x, Decl(nestedBlockScopedBindings2.ts, 79, 15)) + + break; + } +} + +function a7() { +>a7 : Symbol(a7, Decl(nestedBlockScopedBindings2.ts, 82, 1)) + + switch (1) { + case 1: + let x; +>x : Symbol(x, Decl(nestedBlockScopedBindings2.ts, 87, 15)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings2.ts, 87, 15)) + + break; + } + switch (1) { + case 1: + let x; +>x : Symbol(x, Decl(nestedBlockScopedBindings2.ts, 93, 15)) + + break; + } +} + +function a8() { +>a8 : Symbol(a8, Decl(nestedBlockScopedBindings2.ts, 96, 1)) + + switch (1) { + case 1: + let x; +>x : Symbol(x, Decl(nestedBlockScopedBindings2.ts, 101, 15)) + + break; + } + switch (1) { + case 1: + let x; +>x : Symbol(x, Decl(nestedBlockScopedBindings2.ts, 106, 15)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings2.ts, 106, 15)) + + break; + } +} + +function a9() { +>a9 : Symbol(a9, Decl(nestedBlockScopedBindings2.ts, 110, 1)) + + switch (1) { + case 1: + let x; +>x : Symbol(x, Decl(nestedBlockScopedBindings2.ts, 115, 15)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings2.ts, 115, 15)) + + break; + } + switch (1) { + case 1: + let x; +>x : Symbol(x, Decl(nestedBlockScopedBindings2.ts, 121, 15)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings2.ts, 121, 15)) + + break; + } +} + diff --git a/tests/baselines/reference/nestedBlockScopedBindings2.types b/tests/baselines/reference/nestedBlockScopedBindings2.types new file mode 100644 index 00000000000..adb33b4dc76 --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings2.types @@ -0,0 +1,258 @@ +=== tests/cases/compiler/nestedBlockScopedBindings2.ts === +function a0() { +>a0 : () => void + { + let x = 1; +>x : number +>1 : number + + () => x; +>() => x : () => number +>x : number + } + { + let x = 1; +>x : number +>1 : number + } +} + +function a1() { +>a1 : () => void + { + let x; +>x : any + } + { + let x = 1; +>x : number +>1 : number + + () => x; +>() => x : () => number +>x : number + } +} + +function a2() { +>a2 : () => void + { + let x = 1; +>x : number +>1 : number + + () => x; +>() => x : () => number +>x : number + } + { + let x; +>x : any + + () => x; +>() => x : () => any +>x : any + } +} + + +function a3() { +>a3 : () => void + { + let x = 1; +>x : number +>1 : number + + () => x; +>() => x : () => number +>x : number + } + switch (1) { +>1 : number + + case 1: +>1 : number + + let x; +>x : any + + () => x; +>() => x : () => any +>x : any + + break; + } +} + + +function a4() { +>a4 : () => void + { + let x; +>x : any + } + switch (1) { +>1 : number + + case 1: +>1 : number + + let x; +>x : any + + () => x; +>() => x : () => any +>x : any + + break; + } +} + + +function a5() { +>a5 : () => void + { + let x; +>x : any + + () => x; +>() => x : () => any +>x : any + } + switch (1) { +>1 : number + + case 1: +>1 : number + + let x; +>x : any + + break; + } +} + +function a6() { +>a6 : () => void + + switch (1) { +>1 : number + + case 1: +>1 : number + + let x; +>x : any + + break; + } + switch (1) { +>1 : number + + case 1: +>1 : number + + let x; +>x : any + + break; + } +} + +function a7() { +>a7 : () => void + + switch (1) { +>1 : number + + case 1: +>1 : number + + let x; +>x : any + + () => x; +>() => x : () => any +>x : any + + break; + } + switch (1) { +>1 : number + + case 1: +>1 : number + + let x; +>x : any + + break; + } +} + +function a8() { +>a8 : () => void + + switch (1) { +>1 : number + + case 1: +>1 : number + + let x; +>x : any + + break; + } + switch (1) { +>1 : number + + case 1: +>1 : number + + let x; +>x : any + + () => x; +>() => x : () => any +>x : any + + break; + } +} + +function a9() { +>a9 : () => void + + switch (1) { +>1 : number + + case 1: +>1 : number + + let x; +>x : any + + () => x; +>() => x : () => any +>x : any + + break; + } + switch (1) { +>1 : number + + case 1: +>1 : number + + let x; +>x : any + + () => x; +>() => x : () => any +>x : any + + break; + } +} + diff --git a/tests/baselines/reference/nestedBlockScopedBindings3.js b/tests/baselines/reference/nestedBlockScopedBindings3.js new file mode 100644 index 00000000000..97fba2da301 --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings3.js @@ -0,0 +1,150 @@ +//// [nestedBlockScopedBindings3.ts] +function a0() { + { + for (let x = 0; x < 1; ) { + () => x; + } + } + { + for (let x;;) { + () => x; + } + } +} + +function a1() { + for (let x; x < 1;) { + () => x; + } + for (let x;;) { + () => x; + } +} + +function a2() { + for (let x; x < 1;) { + x = x + 1; + } + for (let x;;) { + x = x + 2; + } +} + + +function a3() { + for (let x; x < 1;) { + x = x + 1; + } + switch (1) { + case 1: + let x; + break; + } +} + +function a4() { + for (let x; x < 1;) { + x = x + 1; + () => x; + } + switch (1) { + case 1: + let x; + break; + } +} + + +function a5() { + for (let x; x < 1;) { + x = x + 1; + () => x; + } + switch (1) { + case 1: + let x; + () => x; + break; + } +} + +//// [nestedBlockScopedBindings3.js] +function a0() { + { + var _loop_1 = function(x) { + (function () { return x; }); + }; + for (var x = 0; x < 1;) { + _loop_1(x); + } + } + { + var _loop_2 = function(x) { + (function () { return x; }); + }; + for (var x = void 0;;) { + _loop_2(x); + } + } +} +function a1() { + var _loop_3 = function(x) { + (function () { return x; }); + }; + for (var x = void 0; x < 1;) { + _loop_3(x); + } + var _loop_4 = function(x) { + (function () { return x; }); + }; + for (var x = void 0;;) { + _loop_4(x); + } +} +function a2() { + for (var x = void 0; x < 1;) { + x = x + 1; + } + for (var x = void 0;;) { + x = x + 2; + } +} +function a3() { + for (var x = void 0; x < 1;) { + x = x + 1; + } + switch (1) { + case 1: + var x = void 0; + break; + } +} +function a4() { + var _loop_5 = function(x) { + x = x + 1; + (function () { return x; }); + }; + for (var x = void 0; x < 1;) { + _loop_5(x); + } + switch (1) { + case 1: + var x = void 0; + break; + } +} +function a5() { + var _loop_6 = function(x) { + x = x + 1; + (function () { return x; }); + }; + for (var x = void 0; x < 1;) { + _loop_6(x); + } + switch (1) { + case 1: + var x_1; + (function () { return x_1; }); + break; + } +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings3.symbols b/tests/baselines/reference/nestedBlockScopedBindings3.symbols new file mode 100644 index 00000000000..160f40a0472 --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings3.symbols @@ -0,0 +1,130 @@ +=== tests/cases/compiler/nestedBlockScopedBindings3.ts === +function a0() { +>a0 : Symbol(a0, Decl(nestedBlockScopedBindings3.ts, 0, 0)) + { + for (let x = 0; x < 1; ) { +>x : Symbol(x, Decl(nestedBlockScopedBindings3.ts, 2, 16)) +>x : Symbol(x, Decl(nestedBlockScopedBindings3.ts, 2, 16)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings3.ts, 2, 16)) + } + } + { + for (let x;;) { +>x : Symbol(x, Decl(nestedBlockScopedBindings3.ts, 7, 16)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings3.ts, 7, 16)) + } + } +} + +function a1() { +>a1 : Symbol(a1, Decl(nestedBlockScopedBindings3.ts, 11, 1)) + + for (let x; x < 1;) { +>x : Symbol(x, Decl(nestedBlockScopedBindings3.ts, 14, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings3.ts, 14, 12)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings3.ts, 14, 12)) + } + for (let x;;) { +>x : Symbol(x, Decl(nestedBlockScopedBindings3.ts, 17, 12)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings3.ts, 17, 12)) + } +} + +function a2() { +>a2 : Symbol(a2, Decl(nestedBlockScopedBindings3.ts, 20, 1)) + + for (let x; x < 1;) { +>x : Symbol(x, Decl(nestedBlockScopedBindings3.ts, 23, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings3.ts, 23, 12)) + + x = x + 1; +>x : Symbol(x, Decl(nestedBlockScopedBindings3.ts, 23, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings3.ts, 23, 12)) + } + for (let x;;) { +>x : Symbol(x, Decl(nestedBlockScopedBindings3.ts, 26, 12)) + + x = x + 2; +>x : Symbol(x, Decl(nestedBlockScopedBindings3.ts, 26, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings3.ts, 26, 12)) + } +} + + +function a3() { +>a3 : Symbol(a3, Decl(nestedBlockScopedBindings3.ts, 29, 1)) + + for (let x; x < 1;) { +>x : Symbol(x, Decl(nestedBlockScopedBindings3.ts, 33, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings3.ts, 33, 12)) + + x = x + 1; +>x : Symbol(x, Decl(nestedBlockScopedBindings3.ts, 33, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings3.ts, 33, 12)) + } + switch (1) { + case 1: + let x; +>x : Symbol(x, Decl(nestedBlockScopedBindings3.ts, 38, 15)) + + break; + } +} + +function a4() { +>a4 : Symbol(a4, Decl(nestedBlockScopedBindings3.ts, 41, 1)) + + for (let x; x < 1;) { +>x : Symbol(x, Decl(nestedBlockScopedBindings3.ts, 44, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings3.ts, 44, 12)) + + x = x + 1; +>x : Symbol(x, Decl(nestedBlockScopedBindings3.ts, 44, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings3.ts, 44, 12)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings3.ts, 44, 12)) + } + switch (1) { + case 1: + let x; +>x : Symbol(x, Decl(nestedBlockScopedBindings3.ts, 50, 15)) + + break; + } +} + + +function a5() { +>a5 : Symbol(a5, Decl(nestedBlockScopedBindings3.ts, 53, 1)) + + for (let x; x < 1;) { +>x : Symbol(x, Decl(nestedBlockScopedBindings3.ts, 57, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings3.ts, 57, 12)) + + x = x + 1; +>x : Symbol(x, Decl(nestedBlockScopedBindings3.ts, 57, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings3.ts, 57, 12)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings3.ts, 57, 12)) + } + switch (1) { + case 1: + let x; +>x : Symbol(x, Decl(nestedBlockScopedBindings3.ts, 63, 15)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings3.ts, 63, 15)) + + break; + } +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings3.types b/tests/baselines/reference/nestedBlockScopedBindings3.types new file mode 100644 index 00000000000..37b89242f3e --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings3.types @@ -0,0 +1,177 @@ +=== tests/cases/compiler/nestedBlockScopedBindings3.ts === +function a0() { +>a0 : () => void + { + for (let x = 0; x < 1; ) { +>x : number +>0 : number +>x < 1 : boolean +>x : number +>1 : number + + () => x; +>() => x : () => number +>x : number + } + } + { + for (let x;;) { +>x : any + + () => x; +>() => x : () => any +>x : any + } + } +} + +function a1() { +>a1 : () => void + + for (let x; x < 1;) { +>x : any +>x < 1 : boolean +>x : any +>1 : number + + () => x; +>() => x : () => any +>x : any + } + for (let x;;) { +>x : any + + () => x; +>() => x : () => any +>x : any + } +} + +function a2() { +>a2 : () => void + + for (let x; x < 1;) { +>x : any +>x < 1 : boolean +>x : any +>1 : number + + x = x + 1; +>x = x + 1 : any +>x : any +>x + 1 : any +>x : any +>1 : number + } + for (let x;;) { +>x : any + + x = x + 2; +>x = x + 2 : any +>x : any +>x + 2 : any +>x : any +>2 : number + } +} + + +function a3() { +>a3 : () => void + + for (let x; x < 1;) { +>x : any +>x < 1 : boolean +>x : any +>1 : number + + x = x + 1; +>x = x + 1 : any +>x : any +>x + 1 : any +>x : any +>1 : number + } + switch (1) { +>1 : number + + case 1: +>1 : number + + let x; +>x : any + + break; + } +} + +function a4() { +>a4 : () => void + + for (let x; x < 1;) { +>x : any +>x < 1 : boolean +>x : any +>1 : number + + x = x + 1; +>x = x + 1 : any +>x : any +>x + 1 : any +>x : any +>1 : number + + () => x; +>() => x : () => any +>x : any + } + switch (1) { +>1 : number + + case 1: +>1 : number + + let x; +>x : any + + break; + } +} + + +function a5() { +>a5 : () => void + + for (let x; x < 1;) { +>x : any +>x < 1 : boolean +>x : any +>1 : number + + x = x + 1; +>x = x + 1 : any +>x : any +>x + 1 : any +>x : any +>1 : number + + () => x; +>() => x : () => any +>x : any + } + switch (1) { +>1 : number + + case 1: +>1 : number + + let x; +>x : any + + () => x; +>() => x : () => any +>x : any + + break; + } +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings4.js b/tests/baselines/reference/nestedBlockScopedBindings4.js new file mode 100644 index 00000000000..51cddcf676d --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings4.js @@ -0,0 +1,91 @@ +//// [nestedBlockScopedBindings4.ts] +function a0() { + for (let x; x < 1;) { + x = x + 1; + } + for (let x;;) { + x = x + 2; + } +} + +function a1() { + for (let x; x < 1;) { + x = x + 1; + () => x; + } + for (let x;;) { + x = x + 2; + } +} + +function a2() { + for (let x; x < 1;) { + x = x + 1; + } + for (let x;;) { + x = x + 2; + () => x; + } +} + + +function a3() { + for (let x; x < 1;) { + x = x + 1; + () => x; + } + for (let x;;) { + x = x + 2; + () => x; + } +} + +//// [nestedBlockScopedBindings4.js] +function a0() { + for (var x = void 0; x < 1;) { + x = x + 1; + } + for (var x = void 0;;) { + x = x + 2; + } +} +function a1() { + var _loop_1 = function(x) { + x = x + 1; + (function () { return x; }); + }; + for (var x = void 0; x < 1;) { + _loop_1(x); + } + for (var x = void 0;;) { + x = x + 2; + } +} +function a2() { + for (var x = void 0; x < 1;) { + x = x + 1; + } + var _loop_2 = function(x) { + x = x + 2; + (function () { return x; }); + }; + for (var x = void 0;;) { + _loop_2(x); + } +} +function a3() { + var _loop_3 = function(x) { + x = x + 1; + (function () { return x; }); + }; + for (var x = void 0; x < 1;) { + _loop_3(x); + } + var _loop_4 = function(x) { + x = x + 2; + (function () { return x; }); + }; + for (var x = void 0;;) { + _loop_4(x); + } +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings4.symbols b/tests/baselines/reference/nestedBlockScopedBindings4.symbols new file mode 100644 index 00000000000..dac99d8158f --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings4.symbols @@ -0,0 +1,93 @@ +=== tests/cases/compiler/nestedBlockScopedBindings4.ts === +function a0() { +>a0 : Symbol(a0, Decl(nestedBlockScopedBindings4.ts, 0, 0)) + + for (let x; x < 1;) { +>x : Symbol(x, Decl(nestedBlockScopedBindings4.ts, 1, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings4.ts, 1, 12)) + + x = x + 1; +>x : Symbol(x, Decl(nestedBlockScopedBindings4.ts, 1, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings4.ts, 1, 12)) + } + for (let x;;) { +>x : Symbol(x, Decl(nestedBlockScopedBindings4.ts, 4, 12)) + + x = x + 2; +>x : Symbol(x, Decl(nestedBlockScopedBindings4.ts, 4, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings4.ts, 4, 12)) + } +} + +function a1() { +>a1 : Symbol(a1, Decl(nestedBlockScopedBindings4.ts, 7, 1)) + + for (let x; x < 1;) { +>x : Symbol(x, Decl(nestedBlockScopedBindings4.ts, 10, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings4.ts, 10, 12)) + + x = x + 1; +>x : Symbol(x, Decl(nestedBlockScopedBindings4.ts, 10, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings4.ts, 10, 12)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings4.ts, 10, 12)) + } + for (let x;;) { +>x : Symbol(x, Decl(nestedBlockScopedBindings4.ts, 14, 12)) + + x = x + 2; +>x : Symbol(x, Decl(nestedBlockScopedBindings4.ts, 14, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings4.ts, 14, 12)) + } +} + +function a2() { +>a2 : Symbol(a2, Decl(nestedBlockScopedBindings4.ts, 17, 1)) + + for (let x; x < 1;) { +>x : Symbol(x, Decl(nestedBlockScopedBindings4.ts, 20, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings4.ts, 20, 12)) + + x = x + 1; +>x : Symbol(x, Decl(nestedBlockScopedBindings4.ts, 20, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings4.ts, 20, 12)) + } + for (let x;;) { +>x : Symbol(x, Decl(nestedBlockScopedBindings4.ts, 23, 12)) + + x = x + 2; +>x : Symbol(x, Decl(nestedBlockScopedBindings4.ts, 23, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings4.ts, 23, 12)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings4.ts, 23, 12)) + } +} + + +function a3() { +>a3 : Symbol(a3, Decl(nestedBlockScopedBindings4.ts, 27, 1)) + + for (let x; x < 1;) { +>x : Symbol(x, Decl(nestedBlockScopedBindings4.ts, 31, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings4.ts, 31, 12)) + + x = x + 1; +>x : Symbol(x, Decl(nestedBlockScopedBindings4.ts, 31, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings4.ts, 31, 12)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings4.ts, 31, 12)) + } + for (let x;;) { +>x : Symbol(x, Decl(nestedBlockScopedBindings4.ts, 35, 12)) + + x = x + 2; +>x : Symbol(x, Decl(nestedBlockScopedBindings4.ts, 35, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings4.ts, 35, 12)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings4.ts, 35, 12)) + } +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings4.types b/tests/baselines/reference/nestedBlockScopedBindings4.types new file mode 100644 index 00000000000..b38d61f3f44 --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings4.types @@ -0,0 +1,129 @@ +=== tests/cases/compiler/nestedBlockScopedBindings4.ts === +function a0() { +>a0 : () => void + + for (let x; x < 1;) { +>x : any +>x < 1 : boolean +>x : any +>1 : number + + x = x + 1; +>x = x + 1 : any +>x : any +>x + 1 : any +>x : any +>1 : number + } + for (let x;;) { +>x : any + + x = x + 2; +>x = x + 2 : any +>x : any +>x + 2 : any +>x : any +>2 : number + } +} + +function a1() { +>a1 : () => void + + for (let x; x < 1;) { +>x : any +>x < 1 : boolean +>x : any +>1 : number + + x = x + 1; +>x = x + 1 : any +>x : any +>x + 1 : any +>x : any +>1 : number + + () => x; +>() => x : () => any +>x : any + } + for (let x;;) { +>x : any + + x = x + 2; +>x = x + 2 : any +>x : any +>x + 2 : any +>x : any +>2 : number + } +} + +function a2() { +>a2 : () => void + + for (let x; x < 1;) { +>x : any +>x < 1 : boolean +>x : any +>1 : number + + x = x + 1; +>x = x + 1 : any +>x : any +>x + 1 : any +>x : any +>1 : number + } + for (let x;;) { +>x : any + + x = x + 2; +>x = x + 2 : any +>x : any +>x + 2 : any +>x : any +>2 : number + + () => x; +>() => x : () => any +>x : any + } +} + + +function a3() { +>a3 : () => void + + for (let x; x < 1;) { +>x : any +>x < 1 : boolean +>x : any +>1 : number + + x = x + 1; +>x = x + 1 : any +>x : any +>x + 1 : any +>x : any +>1 : number + + () => x; +>() => x : () => any +>x : any + } + for (let x;;) { +>x : any + + x = x + 2; +>x = x + 2 : any +>x : any +>x + 2 : any +>x : any +>2 : number + + () => x; +>() => x : () => any +>x : any + } +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings5.js b/tests/baselines/reference/nestedBlockScopedBindings5.js new file mode 100644 index 00000000000..c80c72c0ed6 --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings5.js @@ -0,0 +1,169 @@ +//// [nestedBlockScopedBindings5.ts] +function a0() { + for (let x in []) { + x = x + 1; + } + for (let x;;) { + x = x + 2; + } +} + +function a1() { + for (let x in []) { + x = x + 1; + () => x; + } + for (let x;;) { + x = x + 2; + } +} + +function a2() { + for (let x in []) { + x = x + 1; + } + for (let x;;) { + x = x + 2; + () => x; + } +} + + +function a3() { + for (let x in []) { + x = x + 1; + () => x; + } + for (let x;false;) { + x = x + 2; + () => x; + } + switch (1) { + case 1: + let x; + () => x; + break; + } + +} + +function a4() { + for (let x in []) { + x = x + 1; + } + for (let x;false;) { + x = x + 2; + } + switch (1) { + case 1: + let x; + () => x; + break; + } + +} + +function a5() { + let y; + for (let x in []) { + x = x + 1; + } + for (let x;false;) { + x = x + 2; + () => x; + } + switch (1) { + case 1: + let x; + break; + } + +} + +//// [nestedBlockScopedBindings5.js] +function a0() { + for (var x in []) { + x = x + 1; + } + for (var x = void 0;;) { + x = x + 2; + } +} +function a1() { + var _loop_1 = function(x) { + x = x + 1; + (function () { return x; }); + }; + for (var x in []) { + _loop_1(x); + } + for (var x = void 0;;) { + x = x + 2; + } +} +function a2() { + for (var x in []) { + x = x + 1; + } + var _loop_2 = function(x) { + x = x + 2; + (function () { return x; }); + }; + for (var x = void 0;;) { + _loop_2(x); + } +} +function a3() { + var _loop_3 = function(x) { + x = x + 1; + (function () { return x; }); + }; + for (var x in []) { + _loop_3(x); + } + var _loop_4 = function(x) { + x = x + 2; + (function () { return x; }); + }; + for (var x = void 0; false;) { + _loop_4(x); + } + switch (1) { + case 1: + var x_1; + (function () { return x_1; }); + break; + } +} +function a4() { + for (var x in []) { + x = x + 1; + } + for (var x = void 0; false;) { + x = x + 2; + } + switch (1) { + case 1: + var x_2; + (function () { return x_2; }); + break; + } +} +function a5() { + var y; + for (var x in []) { + x = x + 1; + } + var _loop_5 = function(x) { + x = x + 2; + (function () { return x; }); + }; + for (var x = void 0; false;) { + _loop_5(x); + } + switch (1) { + case 1: + var x = void 0; + break; + } +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings5.symbols b/tests/baselines/reference/nestedBlockScopedBindings5.symbols new file mode 100644 index 00000000000..202a1d2e83f --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings5.symbols @@ -0,0 +1,163 @@ +=== tests/cases/compiler/nestedBlockScopedBindings5.ts === +function a0() { +>a0 : Symbol(a0, Decl(nestedBlockScopedBindings5.ts, 0, 0)) + + for (let x in []) { +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 1, 12)) + + x = x + 1; +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 1, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 1, 12)) + } + for (let x;;) { +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 4, 12)) + + x = x + 2; +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 4, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 4, 12)) + } +} + +function a1() { +>a1 : Symbol(a1, Decl(nestedBlockScopedBindings5.ts, 7, 1)) + + for (let x in []) { +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 10, 12)) + + x = x + 1; +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 10, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 10, 12)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 10, 12)) + } + for (let x;;) { +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 14, 12)) + + x = x + 2; +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 14, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 14, 12)) + } +} + +function a2() { +>a2 : Symbol(a2, Decl(nestedBlockScopedBindings5.ts, 17, 1)) + + for (let x in []) { +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 20, 12)) + + x = x + 1; +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 20, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 20, 12)) + } + for (let x;;) { +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 23, 12)) + + x = x + 2; +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 23, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 23, 12)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 23, 12)) + } +} + + +function a3() { +>a3 : Symbol(a3, Decl(nestedBlockScopedBindings5.ts, 27, 1)) + + for (let x in []) { +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 31, 12)) + + x = x + 1; +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 31, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 31, 12)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 31, 12)) + } + for (let x;false;) { +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 35, 12)) + + x = x + 2; +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 35, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 35, 12)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 35, 12)) + } + switch (1) { + case 1: + let x; +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 41, 15)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 41, 15)) + + break; + } + +} + +function a4() { +>a4 : Symbol(a4, Decl(nestedBlockScopedBindings5.ts, 46, 1)) + + for (let x in []) { +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 49, 12)) + + x = x + 1; +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 49, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 49, 12)) + } + for (let x;false;) { +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 52, 12)) + + x = x + 2; +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 52, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 52, 12)) + } + switch (1) { + case 1: + let x; +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 57, 15)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 57, 15)) + + break; + } + +} + +function a5() { +>a5 : Symbol(a5, Decl(nestedBlockScopedBindings5.ts, 62, 1)) + + let y; +>y : Symbol(y, Decl(nestedBlockScopedBindings5.ts, 65, 7)) + + for (let x in []) { +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 66, 12)) + + x = x + 1; +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 66, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 66, 12)) + } + for (let x;false;) { +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 69, 12)) + + x = x + 2; +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 69, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 69, 12)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 69, 12)) + } + switch (1) { + case 1: + let x; +>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 75, 15)) + + break; + } + +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings5.types b/tests/baselines/reference/nestedBlockScopedBindings5.types new file mode 100644 index 00000000000..10ea0e5f902 --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings5.types @@ -0,0 +1,227 @@ +=== tests/cases/compiler/nestedBlockScopedBindings5.ts === +function a0() { +>a0 : () => void + + for (let x in []) { +>x : string +>[] : undefined[] + + x = x + 1; +>x = x + 1 : string +>x : string +>x + 1 : string +>x : string +>1 : number + } + for (let x;;) { +>x : any + + x = x + 2; +>x = x + 2 : any +>x : any +>x + 2 : any +>x : any +>2 : number + } +} + +function a1() { +>a1 : () => void + + for (let x in []) { +>x : string +>[] : undefined[] + + x = x + 1; +>x = x + 1 : string +>x : string +>x + 1 : string +>x : string +>1 : number + + () => x; +>() => x : () => string +>x : string + } + for (let x;;) { +>x : any + + x = x + 2; +>x = x + 2 : any +>x : any +>x + 2 : any +>x : any +>2 : number + } +} + +function a2() { +>a2 : () => void + + for (let x in []) { +>x : string +>[] : undefined[] + + x = x + 1; +>x = x + 1 : string +>x : string +>x + 1 : string +>x : string +>1 : number + } + for (let x;;) { +>x : any + + x = x + 2; +>x = x + 2 : any +>x : any +>x + 2 : any +>x : any +>2 : number + + () => x; +>() => x : () => any +>x : any + } +} + + +function a3() { +>a3 : () => void + + for (let x in []) { +>x : string +>[] : undefined[] + + x = x + 1; +>x = x + 1 : string +>x : string +>x + 1 : string +>x : string +>1 : number + + () => x; +>() => x : () => string +>x : string + } + for (let x;false;) { +>x : any +>false : boolean + + x = x + 2; +>x = x + 2 : any +>x : any +>x + 2 : any +>x : any +>2 : number + + () => x; +>() => x : () => any +>x : any + } + switch (1) { +>1 : number + + case 1: +>1 : number + + let x; +>x : any + + () => x; +>() => x : () => any +>x : any + + break; + } + +} + +function a4() { +>a4 : () => void + + for (let x in []) { +>x : string +>[] : undefined[] + + x = x + 1; +>x = x + 1 : string +>x : string +>x + 1 : string +>x : string +>1 : number + } + for (let x;false;) { +>x : any +>false : boolean + + x = x + 2; +>x = x + 2 : any +>x : any +>x + 2 : any +>x : any +>2 : number + } + switch (1) { +>1 : number + + case 1: +>1 : number + + let x; +>x : any + + () => x; +>() => x : () => any +>x : any + + break; + } + +} + +function a5() { +>a5 : () => void + + let y; +>y : any + + for (let x in []) { +>x : string +>[] : undefined[] + + x = x + 1; +>x = x + 1 : string +>x : string +>x + 1 : string +>x : string +>1 : number + } + for (let x;false;) { +>x : any +>false : boolean + + x = x + 2; +>x = x + 2 : any +>x : any +>x + 2 : any +>x : any +>2 : number + + () => x; +>() => x : () => any +>x : any + } + switch (1) { +>1 : number + + case 1: +>1 : number + + let x; +>x : any + + break; + } + +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings6.js b/tests/baselines/reference/nestedBlockScopedBindings6.js new file mode 100644 index 00000000000..78207b98fcd --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings6.js @@ -0,0 +1,197 @@ +//// [nestedBlockScopedBindings6.ts] +function a0() { + for (let x of [1]) { + x = x + 1; + } + for (let x;;) { + x = x + 2; + } +} + +function a1() { + for (let x of [1]) { + x = x + 1; + () => x; + } + for (let x;;) { + x = x + 2; + } +} + +function a2() { + for (let x of [1]) { + x = x + 1; + } + for (let x;;) { + x = x + 2; + () => x; + } +} + +function a3() { + for (let x of [1]) { + x = x + 1; + () => x; + } + for (let x;;) { + x = x + 2; + () => x; + } +} + +function a4() { + for (let x of [1]) { + x = x + 1; + () => x; + } + switch (1) { + case 1: + let x; + break; + } +} + + +function a5() { + for (let x of [1]) { + x = x + 1; + } + switch (1) { + case 1: + let x; + () => x; + break; + } +} + +function a6() { + for (let x of [1]) { + x = x + 1; + } + switch (1) { + case 1: + let x; + break; + } +} + +function a7() { + for (let x of [1]) { + x = x + 1; + () => x; + } + switch (1) { + case 1: + let x; + () => x; + break; + } +} + +//// [nestedBlockScopedBindings6.js] +function a0() { + for (var _i = 0, _a = [1]; _i < _a.length; _i++) { + var x = _a[_i]; + x = x + 1; + } + for (var x = void 0;;) { + x = x + 2; + } +} +function a1() { + var _loop_1 = function(x) { + x = x + 1; + (function () { return x; }); + }; + for (var _i = 0, _a = [1]; _i < _a.length; _i++) { + var x = _a[_i]; + _loop_1(x); + } + for (var x = void 0;;) { + x = x + 2; + } +} +function a2() { + for (var _i = 0, _a = [1]; _i < _a.length; _i++) { + var x = _a[_i]; + x = x + 1; + } + var _loop_2 = function(x) { + x = x + 2; + (function () { return x; }); + }; + for (var x = void 0;;) { + _loop_2(x); + } +} +function a3() { + var _loop_3 = function(x) { + x = x + 1; + (function () { return x; }); + }; + for (var _i = 0, _a = [1]; _i < _a.length; _i++) { + var x = _a[_i]; + _loop_3(x); + } + var _loop_4 = function(x) { + x = x + 2; + (function () { return x; }); + }; + for (var x = void 0;;) { + _loop_4(x); + } +} +function a4() { + var _loop_5 = function(x) { + x = x + 1; + (function () { return x; }); + }; + for (var _i = 0, _a = [1]; _i < _a.length; _i++) { + var x = _a[_i]; + _loop_5(x); + } + switch (1) { + case 1: + var x = void 0; + break; + } +} +function a5() { + for (var _i = 0, _a = [1]; _i < _a.length; _i++) { + var x = _a[_i]; + x = x + 1; + } + switch (1) { + case 1: + var x_1; + (function () { return x_1; }); + break; + } +} +function a6() { + for (var _i = 0, _a = [1]; _i < _a.length; _i++) { + var x = _a[_i]; + x = x + 1; + } + switch (1) { + case 1: + var x = void 0; + break; + } +} +function a7() { + var _loop_6 = function(x) { + x = x + 1; + (function () { return x; }); + }; + for (var _i = 0, _a = [1]; _i < _a.length; _i++) { + var x = _a[_i]; + _loop_6(x); + } + switch (1) { + case 1: + var x_2; + (function () { return x_2; }); + break; + } +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings6.symbols b/tests/baselines/reference/nestedBlockScopedBindings6.symbols new file mode 100644 index 00000000000..43cfcb43814 --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings6.symbols @@ -0,0 +1,177 @@ +=== tests/cases/compiler/nestedBlockScopedBindings6.ts === +function a0() { +>a0 : Symbol(a0, Decl(nestedBlockScopedBindings6.ts, 0, 0)) + + for (let x of [1]) { +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 1, 12)) + + x = x + 1; +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 1, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 1, 12)) + } + for (let x;;) { +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 4, 12)) + + x = x + 2; +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 4, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 4, 12)) + } +} + +function a1() { +>a1 : Symbol(a1, Decl(nestedBlockScopedBindings6.ts, 7, 1)) + + for (let x of [1]) { +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 10, 12)) + + x = x + 1; +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 10, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 10, 12)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 10, 12)) + } + for (let x;;) { +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 14, 12)) + + x = x + 2; +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 14, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 14, 12)) + } +} + +function a2() { +>a2 : Symbol(a2, Decl(nestedBlockScopedBindings6.ts, 17, 1)) + + for (let x of [1]) { +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 20, 12)) + + x = x + 1; +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 20, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 20, 12)) + } + for (let x;;) { +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 23, 12)) + + x = x + 2; +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 23, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 23, 12)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 23, 12)) + } +} + +function a3() { +>a3 : Symbol(a3, Decl(nestedBlockScopedBindings6.ts, 27, 1)) + + for (let x of [1]) { +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 30, 12)) + + x = x + 1; +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 30, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 30, 12)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 30, 12)) + } + for (let x;;) { +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 34, 12)) + + x = x + 2; +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 34, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 34, 12)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 34, 12)) + } +} + +function a4() { +>a4 : Symbol(a4, Decl(nestedBlockScopedBindings6.ts, 38, 1)) + + for (let x of [1]) { +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 41, 12)) + + x = x + 1; +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 41, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 41, 12)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 41, 12)) + } + switch (1) { + case 1: + let x; +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 47, 15)) + + break; + } +} + + +function a5() { +>a5 : Symbol(a5, Decl(nestedBlockScopedBindings6.ts, 50, 1)) + + for (let x of [1]) { +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 54, 12)) + + x = x + 1; +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 54, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 54, 12)) + } + switch (1) { + case 1: + let x; +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 59, 15)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 59, 15)) + + break; + } +} + +function a6() { +>a6 : Symbol(a6, Decl(nestedBlockScopedBindings6.ts, 63, 1)) + + for (let x of [1]) { +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 66, 12)) + + x = x + 1; +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 66, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 66, 12)) + } + switch (1) { + case 1: + let x; +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 71, 15)) + + break; + } +} + +function a7() { +>a7 : Symbol(a7, Decl(nestedBlockScopedBindings6.ts, 74, 1)) + + for (let x of [1]) { +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 77, 12)) + + x = x + 1; +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 77, 12)) +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 77, 12)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 77, 12)) + } + switch (1) { + case 1: + let x; +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 83, 15)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings6.ts, 83, 15)) + + break; + } +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings6.types b/tests/baselines/reference/nestedBlockScopedBindings6.types new file mode 100644 index 00000000000..5c8c1fa68fa --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings6.types @@ -0,0 +1,253 @@ +=== tests/cases/compiler/nestedBlockScopedBindings6.ts === +function a0() { +>a0 : () => void + + for (let x of [1]) { +>x : number +>[1] : number[] +>1 : number + + x = x + 1; +>x = x + 1 : number +>x : number +>x + 1 : number +>x : number +>1 : number + } + for (let x;;) { +>x : any + + x = x + 2; +>x = x + 2 : any +>x : any +>x + 2 : any +>x : any +>2 : number + } +} + +function a1() { +>a1 : () => void + + for (let x of [1]) { +>x : number +>[1] : number[] +>1 : number + + x = x + 1; +>x = x + 1 : number +>x : number +>x + 1 : number +>x : number +>1 : number + + () => x; +>() => x : () => number +>x : number + } + for (let x;;) { +>x : any + + x = x + 2; +>x = x + 2 : any +>x : any +>x + 2 : any +>x : any +>2 : number + } +} + +function a2() { +>a2 : () => void + + for (let x of [1]) { +>x : number +>[1] : number[] +>1 : number + + x = x + 1; +>x = x + 1 : number +>x : number +>x + 1 : number +>x : number +>1 : number + } + for (let x;;) { +>x : any + + x = x + 2; +>x = x + 2 : any +>x : any +>x + 2 : any +>x : any +>2 : number + + () => x; +>() => x : () => any +>x : any + } +} + +function a3() { +>a3 : () => void + + for (let x of [1]) { +>x : number +>[1] : number[] +>1 : number + + x = x + 1; +>x = x + 1 : number +>x : number +>x + 1 : number +>x : number +>1 : number + + () => x; +>() => x : () => number +>x : number + } + for (let x;;) { +>x : any + + x = x + 2; +>x = x + 2 : any +>x : any +>x + 2 : any +>x : any +>2 : number + + () => x; +>() => x : () => any +>x : any + } +} + +function a4() { +>a4 : () => void + + for (let x of [1]) { +>x : number +>[1] : number[] +>1 : number + + x = x + 1; +>x = x + 1 : number +>x : number +>x + 1 : number +>x : number +>1 : number + + () => x; +>() => x : () => number +>x : number + } + switch (1) { +>1 : number + + case 1: +>1 : number + + let x; +>x : any + + break; + } +} + + +function a5() { +>a5 : () => void + + for (let x of [1]) { +>x : number +>[1] : number[] +>1 : number + + x = x + 1; +>x = x + 1 : number +>x : number +>x + 1 : number +>x : number +>1 : number + } + switch (1) { +>1 : number + + case 1: +>1 : number + + let x; +>x : any + + () => x; +>() => x : () => any +>x : any + + break; + } +} + +function a6() { +>a6 : () => void + + for (let x of [1]) { +>x : number +>[1] : number[] +>1 : number + + x = x + 1; +>x = x + 1 : number +>x : number +>x + 1 : number +>x : number +>1 : number + } + switch (1) { +>1 : number + + case 1: +>1 : number + + let x; +>x : any + + break; + } +} + +function a7() { +>a7 : () => void + + for (let x of [1]) { +>x : number +>[1] : number[] +>1 : number + + x = x + 1; +>x = x + 1 : number +>x : number +>x + 1 : number +>x : number +>1 : number + + () => x; +>() => x : () => number +>x : number + } + switch (1) { +>1 : number + + case 1: +>1 : number + + let x; +>x : any + + () => x; +>() => x : () => any +>x : any + + break; + } +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings7.js b/tests/baselines/reference/nestedBlockScopedBindings7.js new file mode 100644 index 00000000000..df0e6c52a62 --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings7.js @@ -0,0 +1,19 @@ +//// [nestedBlockScopedBindings7.ts] +for (let x; false;) { + () => x; +} + +for (let y; false;) { + y = 1; +} + +//// [nestedBlockScopedBindings7.js] +var _loop_1 = function(x) { + (function () { return x; }); +}; +for (var x = void 0; false;) { + _loop_1(x); +} +for (var y = void 0; false;) { + y = 1; +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings7.symbols b/tests/baselines/reference/nestedBlockScopedBindings7.symbols new file mode 100644 index 00000000000..2d65af06a96 --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings7.symbols @@ -0,0 +1,14 @@ +=== tests/cases/compiler/nestedBlockScopedBindings7.ts === +for (let x; false;) { +>x : Symbol(x, Decl(nestedBlockScopedBindings7.ts, 0, 8)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings7.ts, 0, 8)) +} + +for (let y; false;) { +>y : Symbol(y, Decl(nestedBlockScopedBindings7.ts, 4, 8)) + + y = 1; +>y : Symbol(y, Decl(nestedBlockScopedBindings7.ts, 4, 8)) +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings7.types b/tests/baselines/reference/nestedBlockScopedBindings7.types new file mode 100644 index 00000000000..2fdb2d90e76 --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings7.types @@ -0,0 +1,19 @@ +=== tests/cases/compiler/nestedBlockScopedBindings7.ts === +for (let x; false;) { +>x : any +>false : boolean + + () => x; +>() => x : () => any +>x : any +} + +for (let y; false;) { +>y : any +>false : boolean + + y = 1; +>y = 1 : number +>y : any +>1 : number +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings8.js b/tests/baselines/reference/nestedBlockScopedBindings8.js new file mode 100644 index 00000000000..772dc020d6d --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings8.js @@ -0,0 +1,23 @@ +//// [nestedBlockScopedBindings8.ts] +var x; +for (let x; false; ) { + () => x; +} + +var y; +for (let y; false; ) { + y = 1; +} + +//// [nestedBlockScopedBindings8.js] +var x; +var _loop_1 = function(x_1) { + (function () { return x_1; }); +}; +for (var x_1; false;) { + _loop_1(x_1); +} +var y; +for (var y_1; false;) { + y_1 = 1; +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings8.symbols b/tests/baselines/reference/nestedBlockScopedBindings8.symbols new file mode 100644 index 00000000000..a61df0502ec --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings8.symbols @@ -0,0 +1,20 @@ +=== tests/cases/compiler/nestedBlockScopedBindings8.ts === +var x; +>x : Symbol(x, Decl(nestedBlockScopedBindings8.ts, 0, 3)) + +for (let x; false; ) { +>x : Symbol(x, Decl(nestedBlockScopedBindings8.ts, 1, 8)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings8.ts, 1, 8)) +} + +var y; +>y : Symbol(y, Decl(nestedBlockScopedBindings8.ts, 5, 3)) + +for (let y; false; ) { +>y : Symbol(y, Decl(nestedBlockScopedBindings8.ts, 6, 8)) + + y = 1; +>y : Symbol(y, Decl(nestedBlockScopedBindings8.ts, 6, 8)) +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings8.types b/tests/baselines/reference/nestedBlockScopedBindings8.types new file mode 100644 index 00000000000..9e4b98ffbf2 --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings8.types @@ -0,0 +1,25 @@ +=== tests/cases/compiler/nestedBlockScopedBindings8.ts === +var x; +>x : any + +for (let x; false; ) { +>x : any +>false : boolean + + () => x; +>() => x : () => any +>x : any +} + +var y; +>y : any + +for (let y; false; ) { +>y : any +>false : boolean + + y = 1; +>y = 1 : number +>y : any +>1 : number +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings9.js b/tests/baselines/reference/nestedBlockScopedBindings9.js new file mode 100644 index 00000000000..9f037924c68 --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings9.js @@ -0,0 +1,24 @@ +//// [nestedBlockScopedBindings9.ts] +{ + let x; + () => x; +} + +switch (1) { + case 1: + let y; + () => y; + break; +} + +//// [nestedBlockScopedBindings9.js] +{ + var x_1; + (function () { return x_1; }); +} +switch (1) { + case 1: + var y_1; + (function () { return y_1; }); + break; +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings9.symbols b/tests/baselines/reference/nestedBlockScopedBindings9.symbols new file mode 100644 index 00000000000..1564c9e8931 --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings9.symbols @@ -0,0 +1,19 @@ +=== tests/cases/compiler/nestedBlockScopedBindings9.ts === +{ + let x; +>x : Symbol(x, Decl(nestedBlockScopedBindings9.ts, 1, 7)) + + () => x; +>x : Symbol(x, Decl(nestedBlockScopedBindings9.ts, 1, 7)) +} + +switch (1) { + case 1: + let y; +>y : Symbol(y, Decl(nestedBlockScopedBindings9.ts, 7, 11)) + + () => y; +>y : Symbol(y, Decl(nestedBlockScopedBindings9.ts, 7, 11)) + + break; +} diff --git a/tests/baselines/reference/nestedBlockScopedBindings9.types b/tests/baselines/reference/nestedBlockScopedBindings9.types new file mode 100644 index 00000000000..b889421e7dd --- /dev/null +++ b/tests/baselines/reference/nestedBlockScopedBindings9.types @@ -0,0 +1,25 @@ +=== tests/cases/compiler/nestedBlockScopedBindings9.ts === +{ + let x; +>x : any + + () => x; +>() => x : () => any +>x : any +} + +switch (1) { +>1 : number + + case 1: +>1 : number + + let y; +>y : any + + () => y; +>() => y : () => any +>y : any + + break; +} diff --git a/tests/cases/compiler/nestedBlockScopedBindings1.ts b/tests/cases/compiler/nestedBlockScopedBindings1.ts new file mode 100644 index 00000000000..9fd580044a5 --- /dev/null +++ b/tests/cases/compiler/nestedBlockScopedBindings1.ts @@ -0,0 +1,49 @@ +function a0() { + { + let x = 1; + } + { + let x = 1; + } +} + +function a1() { + { + let x; + } + { + let x = 1; + } +} + +function a2() { + { + let x = 1; + } + { + let x; + } +} + +function a3() { + { + let x = 1; + } + switch (1) { + case 1: + let x; + break; + } +} + + +function a4() { + { + let x; + } + switch (1) { + case 1: + let x = 1; + break; + } +} diff --git a/tests/cases/compiler/nestedBlockScopedBindings10.ts b/tests/cases/compiler/nestedBlockScopedBindings10.ts new file mode 100644 index 00000000000..5b3e5ad34a6 --- /dev/null +++ b/tests/cases/compiler/nestedBlockScopedBindings10.ts @@ -0,0 +1,11 @@ +{ + let x; + x = 1; +} + +switch (1) { + case 1: + let y; + y = 1; + break; +} \ No newline at end of file diff --git a/tests/cases/compiler/nestedBlockScopedBindings11.ts b/tests/cases/compiler/nestedBlockScopedBindings11.ts new file mode 100644 index 00000000000..5d3e527eaf0 --- /dev/null +++ b/tests/cases/compiler/nestedBlockScopedBindings11.ts @@ -0,0 +1,13 @@ +var x; +{ + let x; + () => x; +} + +var y; +switch (1) { + case 1: + let y; + () => y; + break; +} \ No newline at end of file diff --git a/tests/cases/compiler/nestedBlockScopedBindings12.ts b/tests/cases/compiler/nestedBlockScopedBindings12.ts new file mode 100644 index 00000000000..05aa00c1b5b --- /dev/null +++ b/tests/cases/compiler/nestedBlockScopedBindings12.ts @@ -0,0 +1,13 @@ +var x; +{ + let x; + x = 1; +} + +var y; +switch (1) { + case 1: + let y; + y = 1; + break; +} \ No newline at end of file diff --git a/tests/cases/compiler/nestedBlockScopedBindings13.ts b/tests/cases/compiler/nestedBlockScopedBindings13.ts new file mode 100644 index 00000000000..6cb1133a9f6 --- /dev/null +++ b/tests/cases/compiler/nestedBlockScopedBindings13.ts @@ -0,0 +1,9 @@ +for (; false;) { + let x; + () => x; +} + +for (; false;) { + let y; + y = 1; +} \ No newline at end of file diff --git a/tests/cases/compiler/nestedBlockScopedBindings14.ts b/tests/cases/compiler/nestedBlockScopedBindings14.ts new file mode 100644 index 00000000000..879551a041a --- /dev/null +++ b/tests/cases/compiler/nestedBlockScopedBindings14.ts @@ -0,0 +1,11 @@ +var x; +for (; false;) { + let x; + () => x; +} + +var y; +for (; false;) { + let y; + y = 1; +} \ No newline at end of file diff --git a/tests/cases/compiler/nestedBlockScopedBindings15.ts b/tests/cases/compiler/nestedBlockScopedBindings15.ts new file mode 100644 index 00000000000..703494e0949 --- /dev/null +++ b/tests/cases/compiler/nestedBlockScopedBindings15.ts @@ -0,0 +1,31 @@ +for (; false;) { + { + let x; + () => x; + } +} + +for (; false;) { + { + let y; + y = 1; + } +} + +for (; false;) { + switch (1){ + case 1: + let z0; + () => z0; + break; + } +} + +for (; false;) { + switch (1){ + case 1: + let z; + z = 1; + break; + } +} \ No newline at end of file diff --git a/tests/cases/compiler/nestedBlockScopedBindings16.ts b/tests/cases/compiler/nestedBlockScopedBindings16.ts new file mode 100644 index 00000000000..c85a9421102 --- /dev/null +++ b/tests/cases/compiler/nestedBlockScopedBindings16.ts @@ -0,0 +1,35 @@ +var x; +for (; false;) { + { + let x; + () => x; + } +} + +var y; +for (; false;) { + { + let y; + y = 1; + } +} + +var z0; +for (; false;) { + switch (1){ + case 1: + let z0; + () => z0; + break; + } +} + +var z; +for (; false;) { + switch (1){ + case 1: + let z; + z = 1; + break; + } +} \ No newline at end of file diff --git a/tests/cases/compiler/nestedBlockScopedBindings2.ts b/tests/cases/compiler/nestedBlockScopedBindings2.ts new file mode 100644 index 00000000000..694f27d1a24 --- /dev/null +++ b/tests/cases/compiler/nestedBlockScopedBindings2.ts @@ -0,0 +1,126 @@ +function a0() { + { + let x = 1; + () => x; + } + { + let x = 1; + } +} + +function a1() { + { + let x; + } + { + let x = 1; + () => x; + } +} + +function a2() { + { + let x = 1; + () => x; + } + { + let x; + () => x; + } +} + + +function a3() { + { + let x = 1; + () => x; + } + switch (1) { + case 1: + let x; + () => x; + break; + } +} + + +function a4() { + { + let x; + } + switch (1) { + case 1: + let x; + () => x; + break; + } +} + + +function a5() { + { + let x; + () => x; + } + switch (1) { + case 1: + let x; + break; + } +} + +function a6() { + switch (1) { + case 1: + let x; + break; + } + switch (1) { + case 1: + let x; + break; + } +} + +function a7() { + switch (1) { + case 1: + let x; + () => x; + break; + } + switch (1) { + case 1: + let x; + break; + } +} + +function a8() { + switch (1) { + case 1: + let x; + break; + } + switch (1) { + case 1: + let x; + () => x; + break; + } +} + +function a9() { + switch (1) { + case 1: + let x; + () => x; + break; + } + switch (1) { + case 1: + let x; + () => x; + break; + } +} diff --git a/tests/cases/compiler/nestedBlockScopedBindings3.ts b/tests/cases/compiler/nestedBlockScopedBindings3.ts new file mode 100644 index 00000000000..e073bebadb9 --- /dev/null +++ b/tests/cases/compiler/nestedBlockScopedBindings3.ts @@ -0,0 +1,68 @@ +function a0() { + { + for (let x = 0; x < 1; ) { + () => x; + } + } + { + for (let x;;) { + () => x; + } + } +} + +function a1() { + for (let x; x < 1;) { + () => x; + } + for (let x;;) { + () => x; + } +} + +function a2() { + for (let x; x < 1;) { + x = x + 1; + } + for (let x;;) { + x = x + 2; + } +} + + +function a3() { + for (let x; x < 1;) { + x = x + 1; + } + switch (1) { + case 1: + let x; + break; + } +} + +function a4() { + for (let x; x < 1;) { + x = x + 1; + () => x; + } + switch (1) { + case 1: + let x; + break; + } +} + + +function a5() { + for (let x; x < 1;) { + x = x + 1; + () => x; + } + switch (1) { + case 1: + let x; + () => x; + break; + } +} \ No newline at end of file diff --git a/tests/cases/compiler/nestedBlockScopedBindings4.ts b/tests/cases/compiler/nestedBlockScopedBindings4.ts new file mode 100644 index 00000000000..33ad21e2c42 --- /dev/null +++ b/tests/cases/compiler/nestedBlockScopedBindings4.ts @@ -0,0 +1,40 @@ +function a0() { + for (let x; x < 1;) { + x = x + 1; + } + for (let x;;) { + x = x + 2; + } +} + +function a1() { + for (let x; x < 1;) { + x = x + 1; + () => x; + } + for (let x;;) { + x = x + 2; + } +} + +function a2() { + for (let x; x < 1;) { + x = x + 1; + } + for (let x;;) { + x = x + 2; + () => x; + } +} + + +function a3() { + for (let x; x < 1;) { + x = x + 1; + () => x; + } + for (let x;;) { + x = x + 2; + () => x; + } +} \ No newline at end of file diff --git a/tests/cases/compiler/nestedBlockScopedBindings5.ts b/tests/cases/compiler/nestedBlockScopedBindings5.ts new file mode 100644 index 00000000000..65093bcc91f --- /dev/null +++ b/tests/cases/compiler/nestedBlockScopedBindings5.ts @@ -0,0 +1,80 @@ +function a0() { + for (let x in []) { + x = x + 1; + } + for (let x;;) { + x = x + 2; + } +} + +function a1() { + for (let x in []) { + x = x + 1; + () => x; + } + for (let x;;) { + x = x + 2; + } +} + +function a2() { + for (let x in []) { + x = x + 1; + } + for (let x;;) { + x = x + 2; + () => x; + } +} + + +function a3() { + for (let x in []) { + x = x + 1; + () => x; + } + for (let x;false;) { + x = x + 2; + () => x; + } + switch (1) { + case 1: + let x; + () => x; + break; + } + +} + +function a4() { + for (let x in []) { + x = x + 1; + } + for (let x;false;) { + x = x + 2; + } + switch (1) { + case 1: + let x; + () => x; + break; + } + +} + +function a5() { + let y; + for (let x in []) { + x = x + 1; + } + for (let x;false;) { + x = x + 2; + () => x; + } + switch (1) { + case 1: + let x; + break; + } + +} \ No newline at end of file diff --git a/tests/cases/compiler/nestedBlockScopedBindings6.ts b/tests/cases/compiler/nestedBlockScopedBindings6.ts new file mode 100644 index 00000000000..badf1db6e59 --- /dev/null +++ b/tests/cases/compiler/nestedBlockScopedBindings6.ts @@ -0,0 +1,88 @@ +function a0() { + for (let x of [1]) { + x = x + 1; + } + for (let x;;) { + x = x + 2; + } +} + +function a1() { + for (let x of [1]) { + x = x + 1; + () => x; + } + for (let x;;) { + x = x + 2; + } +} + +function a2() { + for (let x of [1]) { + x = x + 1; + } + for (let x;;) { + x = x + 2; + () => x; + } +} + +function a3() { + for (let x of [1]) { + x = x + 1; + () => x; + } + for (let x;;) { + x = x + 2; + () => x; + } +} + +function a4() { + for (let x of [1]) { + x = x + 1; + () => x; + } + switch (1) { + case 1: + let x; + break; + } +} + + +function a5() { + for (let x of [1]) { + x = x + 1; + } + switch (1) { + case 1: + let x; + () => x; + break; + } +} + +function a6() { + for (let x of [1]) { + x = x + 1; + } + switch (1) { + case 1: + let x; + break; + } +} + +function a7() { + for (let x of [1]) { + x = x + 1; + () => x; + } + switch (1) { + case 1: + let x; + () => x; + break; + } +} \ No newline at end of file diff --git a/tests/cases/compiler/nestedBlockScopedBindings7.ts b/tests/cases/compiler/nestedBlockScopedBindings7.ts new file mode 100644 index 00000000000..67da827305b --- /dev/null +++ b/tests/cases/compiler/nestedBlockScopedBindings7.ts @@ -0,0 +1,7 @@ +for (let x; false;) { + () => x; +} + +for (let y; false;) { + y = 1; +} \ No newline at end of file diff --git a/tests/cases/compiler/nestedBlockScopedBindings8.ts b/tests/cases/compiler/nestedBlockScopedBindings8.ts new file mode 100644 index 00000000000..14e33615dc2 --- /dev/null +++ b/tests/cases/compiler/nestedBlockScopedBindings8.ts @@ -0,0 +1,9 @@ +var x; +for (let x; false; ) { + () => x; +} + +var y; +for (let y; false; ) { + y = 1; +} \ No newline at end of file diff --git a/tests/cases/compiler/nestedBlockScopedBindings9.ts b/tests/cases/compiler/nestedBlockScopedBindings9.ts new file mode 100644 index 00000000000..d7d749dcf7c --- /dev/null +++ b/tests/cases/compiler/nestedBlockScopedBindings9.ts @@ -0,0 +1,11 @@ +{ + let x; + () => x; +} + +switch (1) { + case 1: + let y; + () => y; + break; +} \ No newline at end of file From fc6947b081a7e2e649f12ed9f6e86942733a3970 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Wed, 20 Jan 2016 16:51:48 -0800 Subject: [PATCH 055/160] Make get only accessor compatible with writable property in type relationships --- src/compiler/checker.ts | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 0f880cd17f9..465411e0c68 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -10412,19 +10412,13 @@ namespace ts { } function isReadonlySymbol(symbol: Symbol): boolean { - if (symbol.flags & SymbolFlags.Property) { - return symbol === undefinedSymbol || (getDeclarationFlagsFromSymbol(symbol) & NodeFlags.Readonly) !== 0; - } - if (symbol.flags & SymbolFlags.Accessor) { - return !(symbol.flags & SymbolFlags.SetAccessor); - } - return false; + return symbol.flags & SymbolFlags.Property && (getDeclarationFlagsFromSymbol(symbol) & NodeFlags.Readonly) !== 0; } function isConstantSymbol(symbol: Symbol): boolean { - if (symbol.flags & SymbolFlags.Variable) { - return (getDeclarationFlagsFromSymbol(symbol) & NodeFlags.Const) !== 0; - } + return symbol === undefinedSymbol || + symbol.flags & SymbolFlags.Variable && (getDeclarationFlagsFromSymbol(symbol) & NodeFlags.Const) !== 0 || + symbol.flags & SymbolFlags.Accessor && !(symbol.flags & SymbolFlags.SetAccessor); } function checkReferenceExpression(expr: Expression, invalidReferenceMessage: DiagnosticMessage, constantVariableMessage: DiagnosticMessage): boolean { @@ -15723,7 +15717,6 @@ namespace ts { // Initialize special types globalArrayType = getGlobalType("Array", /*arity*/ 1); - globalReadonlyArrayType = getGlobalType("ReadonlyArray", /*arity*/ 1); globalObjectType = getGlobalType("Object"); globalFunctionType = getGlobalType("Function"); globalStringType = getGlobalType("String"); @@ -15768,8 +15761,10 @@ namespace ts { } anyArrayType = createArrayType(anyType); - anyReadonlyArrayType = globalReadonlyArrayType === emptyGenericType ? anyArrayType : - createTypeFromGenericGlobalType(globalReadonlyArrayType, [anyType]); + + const symbol = getGlobalSymbol("ReadonlyArray", SymbolFlags.Type, /*diagnostic*/ undefined); + globalReadonlyArrayType = symbol && getTypeOfGlobalSymbol(symbol, /*arity*/ 1); + anyReadonlyArrayType = globalReadonlyArrayType ? createTypeFromGenericGlobalType(globalReadonlyArrayType, [anyType]) : anyArrayType; } function createInstantiatedPromiseLikeType(): ObjectType { From 95623535e18da5869c613da42b5faddb7917d41e Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Wed, 20 Jan 2016 16:58:53 -0800 Subject: [PATCH 056/160] Fixing fourslash test --- .../cases/fourslash/quickInfoOnObjectLiteralWithOnlyGetter.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/cases/fourslash/quickInfoOnObjectLiteralWithOnlyGetter.ts b/tests/cases/fourslash/quickInfoOnObjectLiteralWithOnlyGetter.ts index a2e783d9ce0..53f5e6988b7 100644 --- a/tests/cases/fourslash/quickInfoOnObjectLiteralWithOnlyGetter.ts +++ b/tests/cases/fourslash/quickInfoOnObjectLiteralWithOnlyGetter.ts @@ -9,7 +9,7 @@ ////var /*2*/x = point./*3*/x; goTo.marker('1'); -verify.quickInfoIs("function makePoint(x: number): {\n readonly x: number;\n}", undefined); +verify.quickInfoIs("function makePoint(x: number): {\n x: number;\n}", undefined); goTo.marker('2'); verify.quickInfoIs("var x: number", undefined); @@ -18,4 +18,4 @@ goTo.marker('3'); verify.memberListContains("x", "(property) x: number", undefined); goTo.marker('4'); -verify.quickInfoIs("var point: {\n readonly x: number;\n}", undefined); +verify.quickInfoIs("var point: {\n x: number;\n}", undefined); From b6f43e6cae8995aa9e37f9c7879a072d19f713a9 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Wed, 20 Jan 2016 16:59:03 -0800 Subject: [PATCH 057/160] Accepting new baselines --- tests/baselines/reference/accessorWithES5.types | 4 ++-- .../reference/commentsOnObjectLiteral4.types | 4 ++-- .../reference/computedPropertyNames11_ES5.types | 4 ++-- .../reference/computedPropertyNames11_ES6.types | 4 ++-- .../reference/declFileObjectLiteralWithOnlyGetter.js | 4 ++-- .../declFileObjectLiteralWithOnlyGetter.types | 12 ++++++------ tests/baselines/reference/downlevelLetConst18.types | 4 ++-- .../reference/interfaceImplementation5.errors.txt | 12 +----------- tests/baselines/reference/symbolProperty5.types | 4 ++-- 9 files changed, 21 insertions(+), 31 deletions(-) diff --git a/tests/baselines/reference/accessorWithES5.types b/tests/baselines/reference/accessorWithES5.types index 29471548918..cb54e92b184 100644 --- a/tests/baselines/reference/accessorWithES5.types +++ b/tests/baselines/reference/accessorWithES5.types @@ -21,8 +21,8 @@ class D { } var x = { ->x : { readonly a: number; } ->{ get a() { return 1 }} : { readonly a: number; } +>x : { a: number; } +>{ get a() { return 1 }} : { a: number; } get a() { return 1 } >a : number diff --git a/tests/baselines/reference/commentsOnObjectLiteral4.types b/tests/baselines/reference/commentsOnObjectLiteral4.types index f458d73ae36..364df6e5ea1 100644 --- a/tests/baselines/reference/commentsOnObjectLiteral4.types +++ b/tests/baselines/reference/commentsOnObjectLiteral4.types @@ -1,8 +1,8 @@ === tests/cases/compiler/commentsOnObjectLiteral4.ts === var v = { ->v : { readonly bar: number; } ->{ /** * @type {number} */ get bar(): number { return this._bar; }} : { readonly bar: number; } +>v : { bar: number; } +>{ /** * @type {number} */ get bar(): number { return this._bar; }} : { bar: number; } /** * @type {number} diff --git a/tests/baselines/reference/computedPropertyNames11_ES5.types b/tests/baselines/reference/computedPropertyNames11_ES5.types index ae626ec3cba..e0787fc3ee7 100644 --- a/tests/baselines/reference/computedPropertyNames11_ES5.types +++ b/tests/baselines/reference/computedPropertyNames11_ES5.types @@ -9,8 +9,8 @@ var a: any; >a : any var v = { ->v : { readonly [0]: number; [""]: any; } ->{ get [s]() { return 0; }, set [n](v) { }, get [s + s]() { return 0; }, set [s + n](v) { }, get [+s]() { return 0; }, set [""](v) { }, get [0]() { return 0; }, set [a](v) { }, get [true]() { return 0; }, set [`hello bye`](v) { }, get [`hello ${a} bye`]() { return 0; }} : { readonly [0]: number; [""]: any; } +>v : { [0]: number; [""]: any; } +>{ get [s]() { return 0; }, set [n](v) { }, get [s + s]() { return 0; }, set [s + n](v) { }, get [+s]() { return 0; }, set [""](v) { }, get [0]() { return 0; }, set [a](v) { }, get [true]() { return 0; }, set [`hello bye`](v) { }, get [`hello ${a} bye`]() { return 0; }} : { [0]: number; [""]: any; } get [s]() { return 0; }, >s : string diff --git a/tests/baselines/reference/computedPropertyNames11_ES6.types b/tests/baselines/reference/computedPropertyNames11_ES6.types index 06dc26e9843..8ad31a7c2a1 100644 --- a/tests/baselines/reference/computedPropertyNames11_ES6.types +++ b/tests/baselines/reference/computedPropertyNames11_ES6.types @@ -9,8 +9,8 @@ var a: any; >a : any var v = { ->v : { readonly [0]: number; [""]: any; } ->{ get [s]() { return 0; }, set [n](v) { }, get [s + s]() { return 0; }, set [s + n](v) { }, get [+s]() { return 0; }, set [""](v) { }, get [0]() { return 0; }, set [a](v) { }, get [true]() { return 0; }, set [`hello bye`](v) { }, get [`hello ${a} bye`]() { return 0; }} : { readonly [0]: number; [""]: any; } +>v : { [0]: number; [""]: any; } +>{ get [s]() { return 0; }, set [n](v) { }, get [s + s]() { return 0; }, set [s + n](v) { }, get [+s]() { return 0; }, set [""](v) { }, get [0]() { return 0; }, set [a](v) { }, get [true]() { return 0; }, set [`hello bye`](v) { }, get [`hello ${a} bye`]() { return 0; }} : { [0]: number; [""]: any; } get [s]() { return 0; }, >s : string diff --git a/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.js b/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.js index eb440c028d5..396ee75422e 100644 --- a/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.js +++ b/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.js @@ -22,9 +22,9 @@ var /*2*/ x = point.x; //// [declFileObjectLiteralWithOnlyGetter.d.ts] declare function makePoint(x: number): { - readonly x: number; + x: number; }; declare var point: { - readonly x: number; + x: number; }; declare var x: number; diff --git a/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.types b/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.types index dd3cbe20983..c0fb7b763fc 100644 --- a/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.types +++ b/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.types @@ -1,11 +1,11 @@ === tests/cases/compiler/declFileObjectLiteralWithOnlyGetter.ts === function /*1*/makePoint(x: number) { ->makePoint : (x: number) => { readonly x: number; } +>makePoint : (x: number) => { x: number; } >x : number return { ->{ get x() { return x; }, } : { readonly x: number; } +>{ get x() { return x; }, } : { x: number; } get x() { return x; }, >x : number @@ -14,14 +14,14 @@ function /*1*/makePoint(x: number) { }; }; var /*4*/point = makePoint(2); ->point : { readonly x: number; } ->makePoint(2) : { readonly x: number; } ->makePoint : (x: number) => { readonly x: number; } +>point : { x: number; } +>makePoint(2) : { x: number; } +>makePoint : (x: number) => { x: number; } >2 : number var /*2*/x = point./*3*/x; >x : number >point./*3*/x : number ->point : { readonly x: number; } +>point : { x: number; } >x : number diff --git a/tests/baselines/reference/downlevelLetConst18.types b/tests/baselines/reference/downlevelLetConst18.types index 1f7be616124..42421aa80c0 100644 --- a/tests/baselines/reference/downlevelLetConst18.types +++ b/tests/baselines/reference/downlevelLetConst18.types @@ -54,8 +54,8 @@ for (let x; ;) { >x : any ({ get foo() { return x } }) ->({ get foo() { return x } }) : { readonly foo: any; } ->{ get foo() { return x } } : { readonly foo: any; } +>({ get foo() { return x } }) : { foo: any; } +>{ get foo() { return x } } : { foo: any; } >foo : any >x : any } diff --git a/tests/baselines/reference/interfaceImplementation5.errors.txt b/tests/baselines/reference/interfaceImplementation5.errors.txt index bb2d5f1bdb0..882d8516121 100644 --- a/tests/baselines/reference/interfaceImplementation5.errors.txt +++ b/tests/baselines/reference/interfaceImplementation5.errors.txt @@ -1,26 +1,19 @@ -tests/cases/compiler/interfaceImplementation5.ts(5,7): error TS2420: Class 'C1' incorrectly implements interface 'I1'. - Property 'getset1' is read-only in type 'C1' but writable in type 'I1'. tests/cases/compiler/interfaceImplementation5.ts(6,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/interfaceImplementation5.ts(10,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/interfaceImplementation5.ts(14,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/interfaceImplementation5.ts(15,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/interfaceImplementation5.ts(18,7): error TS2420: Class 'C4' incorrectly implements interface 'I1'. - Property 'getset1' is read-only in type 'C4' but writable in type 'I1'. tests/cases/compiler/interfaceImplementation5.ts(19,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/interfaceImplementation5.ts(23,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/interfaceImplementation5.ts(27,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/interfaceImplementation5.ts(28,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -==== tests/cases/compiler/interfaceImplementation5.ts (10 errors) ==== +==== tests/cases/compiler/interfaceImplementation5.ts (8 errors) ==== interface I1 { getset1:number; } class C1 implements I1 { - ~~ -!!! error TS2420: Class 'C1' incorrectly implements interface 'I1'. -!!! error TS2420: Property 'getset1' is read-only in type 'C1' but writable in type 'I1'. public get getset1(){return 1;} ~~~~~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. @@ -42,9 +35,6 @@ tests/cases/compiler/interfaceImplementation5.ts(28,16): error TS1056: Accessors } class C4 implements I1 { - ~~ -!!! error TS2420: Class 'C4' incorrectly implements interface 'I1'. -!!! error TS2420: Property 'getset1' is read-only in type 'C4' but writable in type 'I1'. public get getset1(){var x:any; return x;} ~~~~~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. diff --git a/tests/baselines/reference/symbolProperty5.types b/tests/baselines/reference/symbolProperty5.types index b338f94f6d3..4af020dca1b 100644 --- a/tests/baselines/reference/symbolProperty5.types +++ b/tests/baselines/reference/symbolProperty5.types @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/Symbols/symbolProperty5.ts === var x = { ->x : { [Symbol.iterator]: number; [Symbol.toPrimitive](): void; readonly [Symbol.toStringTag]: number; } ->{ [Symbol.iterator]: 0, [Symbol.toPrimitive]() { }, get [Symbol.toStringTag]() { return 0; }} : { [Symbol.iterator]: number; [Symbol.toPrimitive](): void; readonly [Symbol.toStringTag]: number; } +>x : { [Symbol.iterator]: number; [Symbol.toPrimitive](): void; [Symbol.toStringTag]: number; } +>{ [Symbol.iterator]: 0, [Symbol.toPrimitive]() { }, get [Symbol.toStringTag]() { return 0; }} : { [Symbol.iterator]: number; [Symbol.toPrimitive](): void; [Symbol.toStringTag]: number; } [Symbol.iterator]: 0, >Symbol.iterator : symbol From 2653a8da461eb9c43e0f6fdb47c29c0a95b9741e Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Thu, 21 Jan 2016 12:27:11 -0800 Subject: [PATCH 058/160] Treat .js as JSX --- src/compiler/parser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index e391408b419..16196e277dc 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -546,7 +546,7 @@ namespace ts { function getLanguageVariant(fileName: string) { // .tsx and .jsx files are treated as jsx language variant. - return fileExtensionIs(fileName, ".tsx") || fileExtensionIs(fileName, ".jsx") ? LanguageVariant.JSX : LanguageVariant.Standard; + return fileExtensionIs(fileName, ".tsx") || fileExtensionIs(fileName, ".jsx") || fileExtensionIs(fileName, '.js') ? LanguageVariant.JSX : LanguageVariant.Standard; } function initializeState(fileName: string, _sourceText: string, languageVersion: ScriptTarget, isJavaScriptFile: boolean, _syntaxCursor: IncrementalParser.SyntaxCursor) { From 125d1f448a2502f004cf553acfd1a0bfc4139782 Mon Sep 17 00:00:00 2001 From: Yui T Date: Thu, 21 Jan 2016 16:16:52 -0800 Subject: [PATCH 059/160] Address PR --- src/compiler/emitter.ts | 2 +- src/compiler/utilities.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 0caff291b60..cc4cec5895f 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -3848,7 +3848,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi // We create a synthetic copy of the identifier in order to avoid the rewriting that might // otherwise occur when the identifier is emitted. index = createSynthesizedNode(propName.kind); - // We need to escape identifier here because when parsing an identifier prefixing with "__" + // We need to unescape identifier here because when parsing an identifier prefixing with "__" // the parser need to append "_" in order to escape colliding with magic identifiers such as "__proto__" // Therefore, in order to correctly emit identifiers that are written in original TypeScript file, // we will unescapeIdentifier to remove additional underscore (if no underscore is added, the function will return original input string) diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 0beabe4b9ea..7bc708c7178 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -232,8 +232,7 @@ namespace ts { // Add an extra underscore to identifiers that start with two underscores to avoid issues with magic names like '__proto__' export function escapeIdentifier(identifier: string): string { - const prefixedWithUnderscores = identifier.length >= 3 && identifier.charCodeAt(0) === CharacterCodes._ && identifier.charCodeAt(1) === CharacterCodes._; - return prefixedWithUnderscores ? "_" + identifier : identifier; + return identifier.length >= 2 && identifier.charCodeAt(0) === CharacterCodes._ && identifier.charCodeAt(1) === CharacterCodes._ ? "_" + identifier : identifier; } // Remove extra underscore from escaped identifier From fac1bf6eefdce6be46aae32df1d84dcc82b810df Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Fri, 22 Jan 2016 10:32:17 -0800 Subject: [PATCH 060/160] Disallow assigments to exported variables from external modules --- src/compiler/checker.ts | 54 ++++++++++++++++++++++++++++------------- 1 file changed, 37 insertions(+), 17 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 465411e0c68..e8a3cd115d0 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -10400,25 +10400,44 @@ namespace ts { return true; } - function isReferenceWithinOwnConstructor(expr: Expression, symbol: Symbol): boolean { - // Allow assignments to readonly properties or methods (but not readonly accessors) within constructors - // of the same class declaration. - if ((expr.kind === SyntaxKind.PropertyAccessExpression || expr.kind === SyntaxKind.ElementAccessExpression) && - (expr as PropertyAccessExpression | ElementAccessExpression).expression.kind === SyntaxKind.ThisKeyword && - symbol.flags & (SymbolFlags.Property | SymbolFlags.Method)) { - const func = getContainingFunction(expr); - return func && func.kind === SyntaxKind.Constructor && func.parent === symbol.valueDeclaration.parent; - } - } - function isReadonlySymbol(symbol: Symbol): boolean { return symbol.flags & SymbolFlags.Property && (getDeclarationFlagsFromSymbol(symbol) & NodeFlags.Readonly) !== 0; } - function isConstantSymbol(symbol: Symbol): boolean { - return symbol === undefinedSymbol || - symbol.flags & SymbolFlags.Variable && (getDeclarationFlagsFromSymbol(symbol) & NodeFlags.Const) !== 0 || - symbol.flags & SymbolFlags.Accessor && !(symbol.flags & SymbolFlags.SetAccessor); + function isReferenceToConstant(expr: Expression, symbol: Symbol): boolean { + if (symbol.flags & SymbolFlags.Variable) { + // A variable declared with 'const' is considered constant. + if (getDeclarationFlagsFromSymbol(symbol) & NodeFlags.Const) { + return true; + } + // An exported variable declared in an external module and accessed through a property + // or element access is considered constant. + if (expr.kind === SyntaxKind.PropertyAccessExpression || expr.kind === SyntaxKind.ElementAccessExpression) { + if (symbol.parent && symbol.parent.flags & SymbolFlags.ValueModule) { + const declaration = symbol.parent.valueDeclaration; + return declaration && (declaration.kind === SyntaxKind.SourceFile || + declaration.kind === SyntaxKind.ModuleDeclaration && (declaration).name.kind === SyntaxKind.StringLiteral); + } + } + } + if (symbol.flags & SymbolFlags.Accessor) { + // An get accessor with no corresponding set accessor is considered constant. + return !(symbol.flags & SymbolFlags.SetAccessor); + } + return false; + } + + function isReferenceToReadonlyProperty(expr: Expression, symbol: Symbol): boolean { + if (isReadonlySymbol(symbol)) { + // Allow assignments to readonly properties within constructors of the same class declaration. + if ((expr.kind === SyntaxKind.PropertyAccessExpression || expr.kind === SyntaxKind.ElementAccessExpression) && + (expr as PropertyAccessExpression | ElementAccessExpression).expression.kind === SyntaxKind.ThisKeyword) { + const func = getContainingFunction(expr); + return !(func && func.kind === SyntaxKind.Constructor && func.parent === symbol.valueDeclaration.parent); + } + return true; + } + return false; } function checkReferenceExpression(expr: Expression, invalidReferenceMessage: DiagnosticMessage, constantVariableMessage: DiagnosticMessage): boolean { @@ -10435,11 +10454,12 @@ namespace ts { const symbol = getExportSymbolOfValueSymbolIfExported(links.resolvedSymbol); if (symbol) { if (symbol !== unknownSymbol && symbol !== argumentsSymbol) { - if (symbol === undefinedSymbol || !(symbol.flags & (SymbolFlags.Variable | SymbolFlags.Property | SymbolFlags.Method | SymbolFlags.Accessor))) { + if (symbol === undefinedSymbol || + !(symbol.flags & (SymbolFlags.Variable | SymbolFlags.Property | SymbolFlags.Method | SymbolFlags.Accessor))) { error(expr, invalidReferenceMessage); return false; } - if (isConstantSymbol(symbol) || (isReadonlySymbol(symbol) && !isReferenceWithinOwnConstructor(expr, symbol))) { + if (isReferenceToConstant(node, symbol) || isReferenceToReadonlyProperty(node, symbol)) { error(expr, constantVariableMessage); return false; } From e5063786ecccaa2c9b1e78ab3746112df98fbdd5 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Fri, 22 Jan 2016 10:32:42 -0800 Subject: [PATCH 061/160] Accepting new baselines --- ...externalModuleImmutableBindings.errors.txt | 38 ++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/tests/baselines/reference/externalModuleImmutableBindings.errors.txt b/tests/baselines/reference/externalModuleImmutableBindings.errors.txt index a6040c154f0..c8c61b2dc81 100644 --- a/tests/baselines/reference/externalModuleImmutableBindings.errors.txt +++ b/tests/baselines/reference/externalModuleImmutableBindings.errors.txt @@ -1,11 +1,23 @@ +tests/cases/compiler/f2.ts(7,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/f2.ts(8,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. tests/cases/compiler/f2.ts(9,7): error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'. +tests/cases/compiler/f2.ts(12,1): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. +tests/cases/compiler/f2.ts(13,1): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. +tests/cases/compiler/f2.ts(17,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/f2.ts(18,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. tests/cases/compiler/f2.ts(19,8): error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'. +tests/cases/compiler/f2.ts(22,1): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. +tests/cases/compiler/f2.ts(23,1): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. tests/cases/compiler/f2.ts(27,6): error TS2405: The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. +tests/cases/compiler/f2.ts(28,6): error TS2485: The left-hand side of a 'for...of' statement cannot be a constant or a read-only property. tests/cases/compiler/f2.ts(29,6): error TS2405: The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. +tests/cases/compiler/f2.ts(30,6): error TS2485: The left-hand side of a 'for...of' statement cannot be a constant or a read-only property. tests/cases/compiler/f2.ts(31,12): error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'. tests/cases/compiler/f2.ts(32,12): error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'. tests/cases/compiler/f2.ts(36,6): error TS2405: The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. +tests/cases/compiler/f2.ts(37,6): error TS2485: The left-hand side of a 'for...of' statement cannot be a constant or a read-only property. tests/cases/compiler/f2.ts(38,6): error TS2405: The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. +tests/cases/compiler/f2.ts(39,6): error TS2485: The left-hand side of a 'for...of' statement cannot be a constant or a read-only property. tests/cases/compiler/f2.ts(40,13): error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'. tests/cases/compiler/f2.ts(41,13): error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'. @@ -13,7 +25,7 @@ tests/cases/compiler/f2.ts(41,13): error TS2339: Property 'blah' does not exist ==== tests/cases/compiler/f1.ts (0 errors) ==== export var x = 1; -==== tests/cases/compiler/f2.ts (10 errors) ==== +==== tests/cases/compiler/f2.ts (22 errors) ==== // all mutations below are illegal and should be fixed import * as stuff from './f1'; @@ -21,26 +33,42 @@ tests/cases/compiler/f2.ts(41,13): error TS2339: Property 'blah' does not exist var n = 'baz'; stuff.x = 0; + ~~~~~~~ +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. stuff['x'] = 1; + ~~~~~~~~~~ +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. stuff.blah = 2; ~~~~ !!! error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'. stuff[n] = 3; stuff.x++; + ~~~~~~~ +!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. stuff['x']++; + ~~~~~~~~~~ +!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. stuff['blah']++; stuff[n]++; (stuff.x) = 0; + ~~~~~~~~~ +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. (stuff['x']) = 1; + ~~~~~~~~~~~~ +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. (stuff.blah) = 2; ~~~~ !!! error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'. (stuff[n]) = 3; (stuff.x)++; + ~~~~~~~~~ +!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. (stuff['x'])++; + ~~~~~~~~~~~~ +!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. (stuff['blah'])++; (stuff[n])++; @@ -48,10 +76,14 @@ tests/cases/compiler/f2.ts(41,13): error TS2339: Property 'blah' does not exist ~~~~~~~ !!! error TS2405: The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. for (stuff.x of []) {} + ~~~~~~~ +!!! error TS2485: The left-hand side of a 'for...of' statement cannot be a constant or a read-only property. for (stuff['x'] in []) {} ~~~~~~~~~~ !!! error TS2405: The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. for (stuff['x'] of []) {} + ~~~~~~~~~~ +!!! error TS2485: The left-hand side of a 'for...of' statement cannot be a constant or a read-only property. for (stuff.blah in []) {} ~~~~ !!! error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'. @@ -65,10 +97,14 @@ tests/cases/compiler/f2.ts(41,13): error TS2339: Property 'blah' does not exist ~~~~~~~~~ !!! error TS2405: The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. for ((stuff.x) of []) {} + ~~~~~~~~~ +!!! error TS2485: The left-hand side of a 'for...of' statement cannot be a constant or a read-only property. for ((stuff['x']) in []) {} ~~~~~~~~~~~~ !!! error TS2405: The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. for ((stuff['x']) of []) {} + ~~~~~~~~~~~~ +!!! error TS2485: The left-hand side of a 'for...of' statement cannot be a constant or a read-only property. for ((stuff.blah) in []) {} ~~~~ !!! error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'. From ee0060bb2f6dce7bb43b15fc7e8a1d4e6d5b9074 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sat, 23 Jan 2016 15:35:33 -0800 Subject: [PATCH 062/160] No readonly checks in type relationships + No assignments through namespace imports --- src/compiler/checker.ts | 69 +++++++++------------------- src/compiler/diagnosticMessages.json | 8 ---- 2 files changed, 22 insertions(+), 55 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index e8a3cd115d0..7b0da6e4fcc 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -5641,13 +5641,6 @@ namespace ts { } return Ternary.False; } - if (isReadonlySymbol(sourceProp) && !isReadonlySymbol(targetProp)) { - if (reportErrors) { - reportError(Diagnostics.Property_0_is_read_only_in_type_1_but_writable_in_type_2, - symbolToString(targetProp), typeToString(source), typeToString(target)); - } - return Ternary.False; - } } } } @@ -5780,13 +5773,6 @@ namespace ts { } return Ternary.False; } - if (sourceInfo.isReadonly && !targetInfo.isReadonly) { - if (reportErrors) { - reportError(Diagnostics.Index_signature_is_read_only_in_type_0_but_writable_in_type_1, - typeToString(source), typeToString(target)); - } - return Ternary.False; - } return related; } return Ternary.True; @@ -5826,13 +5812,6 @@ namespace ts { } return Ternary.False; } - if ((sourceStringInfo && sourceStringInfo.isReadonly || sourceNumberInfo && sourceNumberInfo.isReadonly) && !targetInfo.isReadonly) { - if (reportErrors) { - reportError(Diagnostics.Index_signature_is_read_only_in_type_0_but_writable_in_type_1, - typeToString(source), typeToString(target)); - } - return Ternary.False; - } return related; } return Ternary.True; @@ -10401,36 +10380,19 @@ namespace ts { } function isReadonlySymbol(symbol: Symbol): boolean { - return symbol.flags & SymbolFlags.Property && (getDeclarationFlagsFromSymbol(symbol) & NodeFlags.Readonly) !== 0; + return symbol.flags & SymbolFlags.Property && (getDeclarationFlagsFromSymbol(symbol) & NodeFlags.Readonly) !== 0 || + symbol.flags & SymbolFlags.Accessor && !(symbol.flags & SymbolFlags.SetAccessor); } - function isReferenceToConstant(expr: Expression, symbol: Symbol): boolean { - if (symbol.flags & SymbolFlags.Variable) { - // A variable declared with 'const' is considered constant. - if (getDeclarationFlagsFromSymbol(symbol) & NodeFlags.Const) { - return true; - } - // An exported variable declared in an external module and accessed through a property - // or element access is considered constant. - if (expr.kind === SyntaxKind.PropertyAccessExpression || expr.kind === SyntaxKind.ElementAccessExpression) { - if (symbol.parent && symbol.parent.flags & SymbolFlags.ValueModule) { - const declaration = symbol.parent.valueDeclaration; - return declaration && (declaration.kind === SyntaxKind.SourceFile || - declaration.kind === SyntaxKind.ModuleDeclaration && (declaration).name.kind === SyntaxKind.StringLiteral); - } - } - } - if (symbol.flags & SymbolFlags.Accessor) { - // An get accessor with no corresponding set accessor is considered constant. - return !(symbol.flags & SymbolFlags.SetAccessor); - } - return false; + function isConstantSymbol(symbol: Symbol): boolean { + return symbol.flags & SymbolFlags.Variable && (getDeclarationFlagsFromSymbol(symbol) & NodeFlags.Const) !== 0; } function isReferenceToReadonlyProperty(expr: Expression, symbol: Symbol): boolean { if (isReadonlySymbol(symbol)) { // Allow assignments to readonly properties within constructors of the same class declaration. - if ((expr.kind === SyntaxKind.PropertyAccessExpression || expr.kind === SyntaxKind.ElementAccessExpression) && + if (symbol.flags & SymbolFlags.Property && + (expr.kind === SyntaxKind.PropertyAccessExpression || expr.kind === SyntaxKind.ElementAccessExpression) && (expr as PropertyAccessExpression | ElementAccessExpression).expression.kind === SyntaxKind.ThisKeyword) { const func = getContainingFunction(expr); return !(func && func.kind === SyntaxKind.Constructor && func.parent === symbol.valueDeclaration.parent); @@ -10440,6 +10402,20 @@ namespace ts { return false; } + function isReferenceThroughNamespaceImport(expr: Expression): boolean { + if (expr.kind === SyntaxKind.PropertyAccessExpression || expr.kind === SyntaxKind.ElementAccessExpression) { + const node = skipParenthesizedNodes((expr as PropertyAccessExpression | ElementAccessExpression).expression); + if (node.kind === SyntaxKind.Identifier) { + const symbol = getNodeLinks(node).resolvedSymbol; + if (symbol.flags & SymbolFlags.Alias) { + const declaration = getDeclarationOfAliasSymbol(symbol); + return declaration && declaration.kind === SyntaxKind.NamespaceImport; + } + } + } + return false; + } + function checkReferenceExpression(expr: Expression, invalidReferenceMessage: DiagnosticMessage, constantVariableMessage: DiagnosticMessage): boolean { // References are combinations of identifiers, parentheses, and property accesses. const node = skipParenthesizedNodes(expr); @@ -10454,12 +10430,11 @@ namespace ts { const symbol = getExportSymbolOfValueSymbolIfExported(links.resolvedSymbol); if (symbol) { if (symbol !== unknownSymbol && symbol !== argumentsSymbol) { - if (symbol === undefinedSymbol || - !(symbol.flags & (SymbolFlags.Variable | SymbolFlags.Property | SymbolFlags.Method | SymbolFlags.Accessor))) { + if (node.kind === SyntaxKind.Identifier && !(symbol.flags & SymbolFlags.Variable) || symbol.flags & SymbolFlags.EnumMember) { error(expr, invalidReferenceMessage); return false; } - if (isReferenceToConstant(node, symbol) || isReferenceToReadonlyProperty(node, symbol)) { + if (isConstantSymbol(symbol) || isReferenceToReadonlyProperty(node, symbol) || isReferenceThroughNamespaceImport(node)) { error(expr, constantVariableMessage); return false; } diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index cb01650d13f..87de69bb4d5 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -995,10 +995,6 @@ "category": "Error", "code": 2342 }, - "Property '{0}' is read-only in type '{1}' but writable in type '{2}'.": { - "category": "Error", - "code": 2343 - }, "Type '{0}' does not satisfy the constraint '{1}'.": { "category": "Error", "code": 2344 @@ -1087,10 +1083,6 @@ "category": "Error", "code": 2365 }, - "Index signature is read-only in type '{0}' but writable in type '{1}'.": { - "category": "Error", - "code": 2366 - }, "Type parameter name cannot be '{0}'": { "category": "Error", "code": 2368 From 7405a4b9c88a9401894d99740c4aaa52a06604af Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sat, 23 Jan 2016 15:36:09 -0800 Subject: [PATCH 063/160] Accepting new baselines --- .../baselines/reference/accessorWithES5.types | 4 +-- ...nmentToParenthesizedIdentifiers.errors.txt | 35 ++++++++++--------- .../reference/commentsOnObjectLiteral4.types | 4 +-- .../computedPropertyNames11_ES5.types | 4 +-- .../computedPropertyNames11_ES6.types | 4 +-- .../declFileObjectLiteralWithOnlyGetter.js | 4 +-- .../declFileObjectLiteralWithOnlyGetter.types | 12 +++---- .../reference/downlevelLetConst18.types | 4 +-- .../baselines/reference/symbolProperty5.types | 4 +-- 9 files changed, 39 insertions(+), 36 deletions(-) diff --git a/tests/baselines/reference/accessorWithES5.types b/tests/baselines/reference/accessorWithES5.types index cb54e92b184..29471548918 100644 --- a/tests/baselines/reference/accessorWithES5.types +++ b/tests/baselines/reference/accessorWithES5.types @@ -21,8 +21,8 @@ class D { } var x = { ->x : { a: number; } ->{ get a() { return 1 }} : { a: number; } +>x : { readonly a: number; } +>{ get a() { return 1 }} : { readonly a: number; } get a() { return 1 } >a : number diff --git a/tests/baselines/reference/assignmentToParenthesizedIdentifiers.errors.txt b/tests/baselines/reference/assignmentToParenthesizedIdentifiers.errors.txt index dcfed4ae28b..a50ffdf72d7 100644 --- a/tests/baselines/reference/assignmentToParenthesizedIdentifiers.errors.txt +++ b/tests/baselines/reference/assignmentToParenthesizedIdentifiers.errors.txt @@ -6,12 +6,15 @@ tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesize tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(17,1): error TS2364: Invalid left-hand side of assignment expression. tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(18,1): error TS2364: Invalid left-hand side of assignment expression. tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(25,5): error TS2364: Invalid left-hand side of assignment expression. -tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(27,1): error TS2364: Invalid left-hand side of assignment expression. -tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(28,1): error TS2364: Invalid left-hand side of assignment expression. -tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(29,1): error TS2364: Invalid left-hand side of assignment expression. -tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(31,1): error TS2364: Invalid left-hand side of assignment expression. -tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(32,1): error TS2364: Invalid left-hand side of assignment expression. -tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(33,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(31,1): error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3'. + Types of property 'x' are incompatible. + Type 'string' is not assignable to type 'number'. +tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(32,1): error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3'. + Types of property 'x' are incompatible. + Type 'string' is not assignable to type 'number'. +tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(33,1): error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3'. + Types of property 'x' are incompatible. + Type 'string' is not assignable to type 'number'. tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(37,1): error TS2364: Invalid left-hand side of assignment expression. tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(38,1): error TS2364: Invalid left-hand side of assignment expression. tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(43,5): error TS2322: Type 'string' is not assignable to type 'number'. @@ -27,7 +30,7 @@ tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesize tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(70,1): error TS2364: Invalid left-hand side of assignment expression. -==== tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts (27 errors) ==== +==== tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts (24 errors) ==== var x: number; x = 3; // OK (x) = 3; // OK @@ -71,24 +74,24 @@ tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesize !!! error TS2364: Invalid left-hand side of assignment expression. } M2.M3 = { x: 3 }; // OK - ~~~~~ -!!! error TS2364: Invalid left-hand side of assignment expression. (M2).M3 = { x: 3 }; // OK - ~~~~~~~ -!!! error TS2364: Invalid left-hand side of assignment expression. (M2.M3) = { x: 3 }; // OK - ~~~~~~~ -!!! error TS2364: Invalid left-hand side of assignment expression. M2.M3 = { x: '' }; // Error ~~~~~ -!!! error TS2364: Invalid left-hand side of assignment expression. +!!! error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3'. +!!! error TS2322: Types of property 'x' are incompatible. +!!! error TS2322: Type 'string' is not assignable to type 'number'. (M2).M3 = { x: '' }; // Error ~~~~~~~ -!!! error TS2364: Invalid left-hand side of assignment expression. +!!! error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3'. +!!! error TS2322: Types of property 'x' are incompatible. +!!! error TS2322: Type 'string' is not assignable to type 'number'. (M2.M3) = { x: '' }; // Error ~~~~~~~ -!!! error TS2364: Invalid left-hand side of assignment expression. +!!! error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3'. +!!! error TS2322: Types of property 'x' are incompatible. +!!! error TS2322: Type 'string' is not assignable to type 'number'. function fn() { } diff --git a/tests/baselines/reference/commentsOnObjectLiteral4.types b/tests/baselines/reference/commentsOnObjectLiteral4.types index 364df6e5ea1..f458d73ae36 100644 --- a/tests/baselines/reference/commentsOnObjectLiteral4.types +++ b/tests/baselines/reference/commentsOnObjectLiteral4.types @@ -1,8 +1,8 @@ === tests/cases/compiler/commentsOnObjectLiteral4.ts === var v = { ->v : { bar: number; } ->{ /** * @type {number} */ get bar(): number { return this._bar; }} : { bar: number; } +>v : { readonly bar: number; } +>{ /** * @type {number} */ get bar(): number { return this._bar; }} : { readonly bar: number; } /** * @type {number} diff --git a/tests/baselines/reference/computedPropertyNames11_ES5.types b/tests/baselines/reference/computedPropertyNames11_ES5.types index e0787fc3ee7..ae626ec3cba 100644 --- a/tests/baselines/reference/computedPropertyNames11_ES5.types +++ b/tests/baselines/reference/computedPropertyNames11_ES5.types @@ -9,8 +9,8 @@ var a: any; >a : any var v = { ->v : { [0]: number; [""]: any; } ->{ get [s]() { return 0; }, set [n](v) { }, get [s + s]() { return 0; }, set [s + n](v) { }, get [+s]() { return 0; }, set [""](v) { }, get [0]() { return 0; }, set [a](v) { }, get [true]() { return 0; }, set [`hello bye`](v) { }, get [`hello ${a} bye`]() { return 0; }} : { [0]: number; [""]: any; } +>v : { readonly [0]: number; [""]: any; } +>{ get [s]() { return 0; }, set [n](v) { }, get [s + s]() { return 0; }, set [s + n](v) { }, get [+s]() { return 0; }, set [""](v) { }, get [0]() { return 0; }, set [a](v) { }, get [true]() { return 0; }, set [`hello bye`](v) { }, get [`hello ${a} bye`]() { return 0; }} : { readonly [0]: number; [""]: any; } get [s]() { return 0; }, >s : string diff --git a/tests/baselines/reference/computedPropertyNames11_ES6.types b/tests/baselines/reference/computedPropertyNames11_ES6.types index 8ad31a7c2a1..06dc26e9843 100644 --- a/tests/baselines/reference/computedPropertyNames11_ES6.types +++ b/tests/baselines/reference/computedPropertyNames11_ES6.types @@ -9,8 +9,8 @@ var a: any; >a : any var v = { ->v : { [0]: number; [""]: any; } ->{ get [s]() { return 0; }, set [n](v) { }, get [s + s]() { return 0; }, set [s + n](v) { }, get [+s]() { return 0; }, set [""](v) { }, get [0]() { return 0; }, set [a](v) { }, get [true]() { return 0; }, set [`hello bye`](v) { }, get [`hello ${a} bye`]() { return 0; }} : { [0]: number; [""]: any; } +>v : { readonly [0]: number; [""]: any; } +>{ get [s]() { return 0; }, set [n](v) { }, get [s + s]() { return 0; }, set [s + n](v) { }, get [+s]() { return 0; }, set [""](v) { }, get [0]() { return 0; }, set [a](v) { }, get [true]() { return 0; }, set [`hello bye`](v) { }, get [`hello ${a} bye`]() { return 0; }} : { readonly [0]: number; [""]: any; } get [s]() { return 0; }, >s : string diff --git a/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.js b/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.js index 396ee75422e..eb440c028d5 100644 --- a/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.js +++ b/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.js @@ -22,9 +22,9 @@ var /*2*/ x = point.x; //// [declFileObjectLiteralWithOnlyGetter.d.ts] declare function makePoint(x: number): { - x: number; + readonly x: number; }; declare var point: { - x: number; + readonly x: number; }; declare var x: number; diff --git a/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.types b/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.types index c0fb7b763fc..dd3cbe20983 100644 --- a/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.types +++ b/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.types @@ -1,11 +1,11 @@ === tests/cases/compiler/declFileObjectLiteralWithOnlyGetter.ts === function /*1*/makePoint(x: number) { ->makePoint : (x: number) => { x: number; } +>makePoint : (x: number) => { readonly x: number; } >x : number return { ->{ get x() { return x; }, } : { x: number; } +>{ get x() { return x; }, } : { readonly x: number; } get x() { return x; }, >x : number @@ -14,14 +14,14 @@ function /*1*/makePoint(x: number) { }; }; var /*4*/point = makePoint(2); ->point : { x: number; } ->makePoint(2) : { x: number; } ->makePoint : (x: number) => { x: number; } +>point : { readonly x: number; } +>makePoint(2) : { readonly x: number; } +>makePoint : (x: number) => { readonly x: number; } >2 : number var /*2*/x = point./*3*/x; >x : number >point./*3*/x : number ->point : { x: number; } +>point : { readonly x: number; } >x : number diff --git a/tests/baselines/reference/downlevelLetConst18.types b/tests/baselines/reference/downlevelLetConst18.types index 42421aa80c0..1f7be616124 100644 --- a/tests/baselines/reference/downlevelLetConst18.types +++ b/tests/baselines/reference/downlevelLetConst18.types @@ -54,8 +54,8 @@ for (let x; ;) { >x : any ({ get foo() { return x } }) ->({ get foo() { return x } }) : { foo: any; } ->{ get foo() { return x } } : { foo: any; } +>({ get foo() { return x } }) : { readonly foo: any; } +>{ get foo() { return x } } : { readonly foo: any; } >foo : any >x : any } diff --git a/tests/baselines/reference/symbolProperty5.types b/tests/baselines/reference/symbolProperty5.types index 4af020dca1b..b338f94f6d3 100644 --- a/tests/baselines/reference/symbolProperty5.types +++ b/tests/baselines/reference/symbolProperty5.types @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/Symbols/symbolProperty5.ts === var x = { ->x : { [Symbol.iterator]: number; [Symbol.toPrimitive](): void; [Symbol.toStringTag]: number; } ->{ [Symbol.iterator]: 0, [Symbol.toPrimitive]() { }, get [Symbol.toStringTag]() { return 0; }} : { [Symbol.iterator]: number; [Symbol.toPrimitive](): void; [Symbol.toStringTag]: number; } +>x : { [Symbol.iterator]: number; [Symbol.toPrimitive](): void; readonly [Symbol.toStringTag]: number; } +>{ [Symbol.iterator]: 0, [Symbol.toPrimitive]() { }, get [Symbol.toStringTag]() { return 0; }} : { [Symbol.iterator]: number; [Symbol.toPrimitive](): void; readonly [Symbol.toStringTag]: number; } [Symbol.iterator]: 0, >Symbol.iterator : symbol From ac196eb2aa509c8d270fa47a2e2a8defe23dc034 Mon Sep 17 00:00:00 2001 From: york yao Date: Sun, 24 Jan 2016 17:10:44 +0800 Subject: [PATCH 064/160] use `const` rather than `var` when emitting external import declaration and the target is es6 --- src/compiler/emitter.ts | 23 ++++++++++++++++--- .../reference/asyncImportedPromise_es6.js | 2 +- ...rtDefaultBindingFollowedWithNamedImport.js | 10 ++++---- .../reference/es6ImportNameSpaceImport.js | 2 +- .../reference/es6ImportNamedImport.js | 18 +++++++-------- .../es6ImportNamedImportInExportAssignment.js | 2 +- .../reference/exportsAndImports1-es6.js | 2 +- .../reference/exportsAndImports2-es6.js | 2 +- .../reference/exportsAndImports3-es6.js | 2 +- .../reference/exportsAndImports4-es6.js | 12 +++++----- .../shorthandPropertyAssignmentInES6Module.js | 4 ++-- 11 files changed, 48 insertions(+), 31 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 44cb0ea3ccf..dbde9c14153 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -6107,7 +6107,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge if (namespaceDeclaration && !isDefaultImport(node)) { // import x = require("foo") // import * as x from "foo" - if (!isExportedImport) write("var "); + if (!isExportedImport) { + if (languageVersion !== ScriptTarget.ES6) { + write("var "); + } + else { + write("const "); + } + }; emitModuleMemberName(namespaceDeclaration); write(" = "); } @@ -6119,7 +6126,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge // import d, { x, y } from "foo" const isNakedImport = SyntaxKind.ImportDeclaration && !(node).importClause; if (!isNakedImport) { - write("var "); + if (languageVersion !== ScriptTarget.ES6) { + write("var "); + } + else { + write("const "); + } write(getGeneratedNameForNode(node)); write(" = "); } @@ -6146,7 +6158,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge } else if (namespaceDeclaration && isDefaultImport(node)) { // import d, * as x from "foo" - write("var "); + if (languageVersion !== ScriptTarget.ES6) { + write("var "); + } + else { + write("const "); + } emitModuleMemberName(namespaceDeclaration); write(" = "); write(getGeneratedNameForNode(node)); diff --git a/tests/baselines/reference/asyncImportedPromise_es6.js b/tests/baselines/reference/asyncImportedPromise_es6.js index d861012488c..a63d7844f4c 100644 --- a/tests/baselines/reference/asyncImportedPromise_es6.js +++ b/tests/baselines/reference/asyncImportedPromise_es6.js @@ -24,7 +24,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.call(thisArg, _arguments)).next()); }); }; -var task_1 = require("./task"); +const task_1 = require("./task"); class Test { example() { return __awaiter(this, void 0, task_1.Task, function* () { return; }); diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport.js index d7dfe29208d..4bff2abf82d 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport.js @@ -31,16 +31,16 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.default = {}; //// [es6ImportDefaultBindingFollowedWithNamedImport_1.js] "use strict"; -var es6ImportDefaultBindingFollowedWithNamedImport_0_1 = require("./es6ImportDefaultBindingFollowedWithNamedImport_0"); +const es6ImportDefaultBindingFollowedWithNamedImport_0_1 = require("./es6ImportDefaultBindingFollowedWithNamedImport_0"); var x1 = es6ImportDefaultBindingFollowedWithNamedImport_0_1.a; -var es6ImportDefaultBindingFollowedWithNamedImport_0_2 = require("./es6ImportDefaultBindingFollowedWithNamedImport_0"); +const es6ImportDefaultBindingFollowedWithNamedImport_0_2 = require("./es6ImportDefaultBindingFollowedWithNamedImport_0"); var x1 = es6ImportDefaultBindingFollowedWithNamedImport_0_2.a; -var es6ImportDefaultBindingFollowedWithNamedImport_0_3 = require("./es6ImportDefaultBindingFollowedWithNamedImport_0"); +const es6ImportDefaultBindingFollowedWithNamedImport_0_3 = require("./es6ImportDefaultBindingFollowedWithNamedImport_0"); var x1 = es6ImportDefaultBindingFollowedWithNamedImport_0_3.x; var x1 = es6ImportDefaultBindingFollowedWithNamedImport_0_3.a; -var es6ImportDefaultBindingFollowedWithNamedImport_0_4 = require("./es6ImportDefaultBindingFollowedWithNamedImport_0"); +const es6ImportDefaultBindingFollowedWithNamedImport_0_4 = require("./es6ImportDefaultBindingFollowedWithNamedImport_0"); var x1 = es6ImportDefaultBindingFollowedWithNamedImport_0_4.x; -var es6ImportDefaultBindingFollowedWithNamedImport_0_5 = require("./es6ImportDefaultBindingFollowedWithNamedImport_0"); +const es6ImportDefaultBindingFollowedWithNamedImport_0_5 = require("./es6ImportDefaultBindingFollowedWithNamedImport_0"); var x1 = es6ImportDefaultBindingFollowedWithNamedImport_0_5.m; diff --git a/tests/baselines/reference/es6ImportNameSpaceImport.js b/tests/baselines/reference/es6ImportNameSpaceImport.js index 685e1cf643c..8e109779f45 100644 --- a/tests/baselines/reference/es6ImportNameSpaceImport.js +++ b/tests/baselines/reference/es6ImportNameSpaceImport.js @@ -15,7 +15,7 @@ import * as nameSpaceBinding2 from "./es6ImportNameSpaceImport_0"; // elide this exports.a = 10; //// [es6ImportNameSpaceImport_1.js] "use strict"; -var nameSpaceBinding = require("./es6ImportNameSpaceImport_0"); +const nameSpaceBinding = require("./es6ImportNameSpaceImport_0"); var x = nameSpaceBinding.a; diff --git a/tests/baselines/reference/es6ImportNamedImport.js b/tests/baselines/reference/es6ImportNamedImport.js index 73fe8f4ec1b..8dbdf7ce6f1 100644 --- a/tests/baselines/reference/es6ImportNamedImport.js +++ b/tests/baselines/reference/es6ImportNamedImport.js @@ -53,26 +53,26 @@ exports.z2 = 10; exports.aaaa = 10; //// [es6ImportNamedImport_1.js] "use strict"; -var es6ImportNamedImport_0_1 = require("./es6ImportNamedImport_0"); +const es6ImportNamedImport_0_1 = require("./es6ImportNamedImport_0"); var xxxx = es6ImportNamedImport_0_1.a; -var es6ImportNamedImport_0_2 = require("./es6ImportNamedImport_0"); +const es6ImportNamedImport_0_2 = require("./es6ImportNamedImport_0"); var xxxx = es6ImportNamedImport_0_2.a; -var es6ImportNamedImport_0_3 = require("./es6ImportNamedImport_0"); +const es6ImportNamedImport_0_3 = require("./es6ImportNamedImport_0"); var xxxx = es6ImportNamedImport_0_3.x; var xxxx = es6ImportNamedImport_0_3.a; -var es6ImportNamedImport_0_4 = require("./es6ImportNamedImport_0"); +const es6ImportNamedImport_0_4 = require("./es6ImportNamedImport_0"); var xxxx = es6ImportNamedImport_0_4.x; -var es6ImportNamedImport_0_5 = require("./es6ImportNamedImport_0"); +const es6ImportNamedImport_0_5 = require("./es6ImportNamedImport_0"); var xxxx = es6ImportNamedImport_0_5.m; -var es6ImportNamedImport_0_6 = require("./es6ImportNamedImport_0"); +const es6ImportNamedImport_0_6 = require("./es6ImportNamedImport_0"); var xxxx = es6ImportNamedImport_0_6.a1; var xxxx = es6ImportNamedImport_0_6.x1; -var es6ImportNamedImport_0_7 = require("./es6ImportNamedImport_0"); +const es6ImportNamedImport_0_7 = require("./es6ImportNamedImport_0"); var xxxx = es6ImportNamedImport_0_7.a1; var xxxx = es6ImportNamedImport_0_7.x1; -var es6ImportNamedImport_0_8 = require("./es6ImportNamedImport_0"); +const es6ImportNamedImport_0_8 = require("./es6ImportNamedImport_0"); var z111 = es6ImportNamedImport_0_8.z1; -var es6ImportNamedImport_0_9 = require("./es6ImportNamedImport_0"); +const es6ImportNamedImport_0_9 = require("./es6ImportNamedImport_0"); var z2 = es6ImportNamedImport_0_9.z2; // z2 shouldn't give redeclare error diff --git a/tests/baselines/reference/es6ImportNamedImportInExportAssignment.js b/tests/baselines/reference/es6ImportNamedImportInExportAssignment.js index b67f61e88ae..38766d32cd9 100644 --- a/tests/baselines/reference/es6ImportNamedImportInExportAssignment.js +++ b/tests/baselines/reference/es6ImportNamedImportInExportAssignment.js @@ -13,7 +13,7 @@ export = a; exports.a = 10; //// [es6ImportNamedImportInExportAssignment_1.js] "use strict"; -var es6ImportNamedImportInExportAssignment_0_1 = require("./es6ImportNamedImportInExportAssignment_0"); +const es6ImportNamedImportInExportAssignment_0_1 = require("./es6ImportNamedImportInExportAssignment_0"); module.exports = es6ImportNamedImportInExportAssignment_0_1.a; diff --git a/tests/baselines/reference/exportsAndImports1-es6.js b/tests/baselines/reference/exportsAndImports1-es6.js index ece98a80318..3ac5aeb0dc5 100644 --- a/tests/baselines/reference/exportsAndImports1-es6.js +++ b/tests/baselines/reference/exportsAndImports1-es6.js @@ -67,7 +67,7 @@ exports.M = t1_1.M; exports.a = t1_1.a; //// [t3.js] "use strict"; -var t1_1 = require("./t1"); +const t1_1 = require("./t1"); exports.v = t1_1.v; exports.f = t1_1.f; exports.C = t1_1.C; diff --git a/tests/baselines/reference/exportsAndImports2-es6.js b/tests/baselines/reference/exportsAndImports2-es6.js index 865534b2851..56639bdbecf 100644 --- a/tests/baselines/reference/exportsAndImports2-es6.js +++ b/tests/baselines/reference/exportsAndImports2-es6.js @@ -24,6 +24,6 @@ exports.y = t1_1.x; exports.x = t1_1.y; //// [t3.js] "use strict"; -var t1_1 = require("./t1"); +const t1_1 = require("./t1"); exports.y = t1_1.x; exports.x = t1_1.y; diff --git a/tests/baselines/reference/exportsAndImports3-es6.js b/tests/baselines/reference/exportsAndImports3-es6.js index ed509d31437..ea16836b1f2 100644 --- a/tests/baselines/reference/exportsAndImports3-es6.js +++ b/tests/baselines/reference/exportsAndImports3-es6.js @@ -69,7 +69,7 @@ exports.M = t1_1.M1; exports.a = t1_1.a1; //// [t3.js] "use strict"; -var t1_1 = require("./t1"); +const t1_1 = require("./t1"); exports.v = t1_1.v1; exports.f = t1_1.f1; exports.C = t1_1.C1; diff --git a/tests/baselines/reference/exportsAndImports4-es6.js b/tests/baselines/reference/exportsAndImports4-es6.js index 39c6583e935..8a8d4f81225 100644 --- a/tests/baselines/reference/exportsAndImports4-es6.js +++ b/tests/baselines/reference/exportsAndImports4-es6.js @@ -45,24 +45,24 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.default = "hello"; //// [t3.js] "use strict"; -var a = require("./t1"); +const a = require("./t1"); exports.a = a; a.default; -var t1_1 = require("./t1"); +const t1_1 = require("./t1"); exports.b = t1_1.default; t1_1.default; -var c = require("./t1"); +const c = require("./t1"); exports.c = c; c.default; -var t1_2 = require("./t1"); +const t1_2 = require("./t1"); exports.d = t1_2.default; t1_2.default; -var t1_3 = require("./t1"), e2 = t1_3; +const t1_3 = require("./t1"), e2 = t1_3; exports.e1 = t1_3.default; exports.e2 = e2; t1_3.default; e2.default; -var t1_4 = require("./t1"); +const t1_4 = require("./t1"); exports.f1 = t1_4.default; exports.f2 = t1_4.default; t1_4.default; diff --git a/tests/baselines/reference/shorthandPropertyAssignmentInES6Module.js b/tests/baselines/reference/shorthandPropertyAssignmentInES6Module.js index cab16b96bc3..d52622dffc7 100644 --- a/tests/baselines/reference/shorthandPropertyAssignmentInES6Module.js +++ b/tests/baselines/reference/shorthandPropertyAssignmentInES6Module.js @@ -20,8 +20,8 @@ use(foo); exports.x = 1; //// [test.js] "use strict"; -var existingModule_1 = require('./existingModule'); -var missingModule_1 = require('./missingModule'); +const existingModule_1 = require('./existingModule'); +const missingModule_1 = require('./missingModule'); const test = { x: existingModule_1.x, foo: missingModule_1.foo }; use(existingModule_1.x); use(missingModule_1.foo); From 49dd54e91a65b165d468cbaf85c6d56f3d6bb383 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sun, 24 Jan 2016 13:44:05 -0800 Subject: [PATCH 065/160] Include readonly in type equality checks + Treat more symbols as readonly --- src/compiler/checker.ts | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 7b0da6e4fcc..73b36e07476 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -134,7 +134,7 @@ namespace ts { const anySignature = createSignature(undefined, undefined, emptyArray, anyType, 0, /*hasRestParameter*/ false, /*hasStringLiterals*/ false); const unknownSignature = createSignature(undefined, undefined, emptyArray, unknownType, 0, /*hasRestParameter*/ false, /*hasStringLiterals*/ false); - const enumNumberIndexInfo = createIndexInfo(stringType, /*isReadonly*/ false); + const enumNumberIndexInfo = createIndexInfo(stringType, /*isReadonly*/ true); const globals: SymbolTable = {}; @@ -5912,6 +5912,9 @@ namespace ts { return Ternary.False; } } + if (isReadonlySymbol(sourceProp) !== isReadonlySymbol(targetProp)) { + return Ternary.False; + } return compareTypes(getTypeOfSymbol(sourceProp), getTypeOfSymbol(targetProp)); } @@ -10380,15 +10383,18 @@ namespace ts { } function isReadonlySymbol(symbol: Symbol): boolean { + // The following symbols are considered read-only: + // Properties with a 'readonly' modifier + // Variables declared with 'const' + // Get accessors without matching set accessors + // Enum members return symbol.flags & SymbolFlags.Property && (getDeclarationFlagsFromSymbol(symbol) & NodeFlags.Readonly) !== 0 || - symbol.flags & SymbolFlags.Accessor && !(symbol.flags & SymbolFlags.SetAccessor); + symbol.flags & SymbolFlags.Variable && (getDeclarationFlagsFromSymbol(symbol) & NodeFlags.Const) !== 0 || + symbol.flags & SymbolFlags.Accessor && !(symbol.flags & SymbolFlags.SetAccessor) || + (symbol.flags & SymbolFlags.EnumMember) !== 0; } - function isConstantSymbol(symbol: Symbol): boolean { - return symbol.flags & SymbolFlags.Variable && (getDeclarationFlagsFromSymbol(symbol) & NodeFlags.Const) !== 0; - } - - function isReferenceToReadonlyProperty(expr: Expression, symbol: Symbol): boolean { + function isReferenceToReadonlyEntity(expr: Expression, symbol: Symbol): boolean { if (isReadonlySymbol(symbol)) { // Allow assignments to readonly properties within constructors of the same class declaration. if (symbol.flags & SymbolFlags.Property && @@ -10430,11 +10436,13 @@ namespace ts { const symbol = getExportSymbolOfValueSymbolIfExported(links.resolvedSymbol); if (symbol) { if (symbol !== unknownSymbol && symbol !== argumentsSymbol) { - if (node.kind === SyntaxKind.Identifier && !(symbol.flags & SymbolFlags.Variable) || symbol.flags & SymbolFlags.EnumMember) { + // Only variables (and not functions, classes, namespaces, enum objects, or enum members) + // are considered references when referenced using a simple identifier. + if (node.kind === SyntaxKind.Identifier && !(symbol.flags & SymbolFlags.Variable)) { error(expr, invalidReferenceMessage); return false; } - if (isConstantSymbol(symbol) || isReferenceToReadonlyProperty(node, symbol) || isReferenceThroughNamespaceImport(node)) { + if (isReferenceToReadonlyEntity(node, symbol) || isReferenceThroughNamespaceImport(node)) { error(expr, constantVariableMessage); return false; } From ea4e3afd98fec76bfa7ddc7c7d9f37e245dbaf55 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sun, 24 Jan 2016 13:44:22 -0800 Subject: [PATCH 066/160] Fix tests --- tests/cases/compiler/typeOfEnumAndVarRedeclarations.ts | 4 ++-- tests/cases/conformance/enums/enumBasics.ts | 8 ++++---- .../objectLiterals/objectLiteralGettersAndSetters.ts | 4 ++-- .../fourslash/quickInfoOnObjectLiteralWithOnlyGetter.ts | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/cases/compiler/typeOfEnumAndVarRedeclarations.ts b/tests/cases/compiler/typeOfEnumAndVarRedeclarations.ts index 996560385d8..2033ef743a4 100644 --- a/tests/cases/compiler/typeOfEnumAndVarRedeclarations.ts +++ b/tests/cases/compiler/typeOfEnumAndVarRedeclarations.ts @@ -5,6 +5,6 @@ enum E { b = 1 } var x = E; -var x: { a: E; b: E;[x: number]: string; }; // Shouldnt error +var x: { readonly a: E; readonly b: E; readonly [x: number]: string; }; // Shouldnt error var y = E; -var y: { a: E; b: E;[x: number]: string;[x: number]: string } // two errors: the types are not identical and duplicate signatures \ No newline at end of file +var y: { readonly a: E; readonly b: E; readonly [x: number]: string; readonly [x: number]: string } // two errors: the types are not identical and duplicate signatures \ No newline at end of file diff --git a/tests/cases/conformance/enums/enumBasics.ts b/tests/cases/conformance/enums/enumBasics.ts index 756e08e97af..1e134540713 100644 --- a/tests/cases/conformance/enums/enumBasics.ts +++ b/tests/cases/conformance/enums/enumBasics.ts @@ -11,10 +11,10 @@ var x: number = E1.A; // Enum object type is anonymous with properties of the enum type and numeric indexer var e = E1; var e: { - A: E1; - B: E1; - C: E1; - [n: number]: string; + readonly A: E1; + readonly B: E1; + readonly C: E1; + readonly [n: number]: string; }; var e: typeof E1; diff --git a/tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts b/tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts index 5a6bc87af36..af0622179ac 100644 --- a/tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts +++ b/tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts @@ -16,11 +16,11 @@ var callSig3: { num: (n: number) => string; }; // Get accessor only, type of the property is the annotated return type of the get accessor var getter1 = { get x(): string { return undefined; } }; -var getter1: { x: string; } +var getter1: { readonly x: string; } // Get accessor only, type of the property is the inferred return type of the get accessor var getter2 = { get x() { return ''; } }; -var getter2: { x: string; } +var getter2: { readonly x: string; } // Set accessor only, type of the property is the param type of the set accessor var setter1 = { set x(n: number) { } }; diff --git a/tests/cases/fourslash/quickInfoOnObjectLiteralWithOnlyGetter.ts b/tests/cases/fourslash/quickInfoOnObjectLiteralWithOnlyGetter.ts index 53f5e6988b7..a2e783d9ce0 100644 --- a/tests/cases/fourslash/quickInfoOnObjectLiteralWithOnlyGetter.ts +++ b/tests/cases/fourslash/quickInfoOnObjectLiteralWithOnlyGetter.ts @@ -9,7 +9,7 @@ ////var /*2*/x = point./*3*/x; goTo.marker('1'); -verify.quickInfoIs("function makePoint(x: number): {\n x: number;\n}", undefined); +verify.quickInfoIs("function makePoint(x: number): {\n readonly x: number;\n}", undefined); goTo.marker('2'); verify.quickInfoIs("var x: number", undefined); @@ -18,4 +18,4 @@ goTo.marker('3'); verify.memberListContains("x", "(property) x: number", undefined); goTo.marker('4'); -verify.quickInfoIs("var point: {\n x: number;\n}", undefined); +verify.quickInfoIs("var point: {\n readonly x: number;\n}", undefined); From c78ee723a09609b4ebd02bd471b8c4fed6347ab5 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sun, 24 Jan 2016 13:44:54 -0800 Subject: [PATCH 067/160] Accepting new baselines --- .../baselines/reference/assignToEnum.errors.txt | 8 ++++---- tests/baselines/reference/assignments.errors.txt | 4 ++-- .../constEnumPropertyAccess2.errors.txt | 4 ++-- .../decrementOperatorWithEnumType.errors.txt | 12 ++++++------ tests/baselines/reference/enumBasics.js | 8 ++++---- tests/baselines/reference/enumBasics.symbols | 14 +++++++------- tests/baselines/reference/enumBasics.types | 8 ++++---- .../incrementOperatorWithEnumType.errors.txt | 16 ++++++++-------- .../invalidUndefinedAssignments.errors.txt | 4 ++-- .../objectLiteralGettersAndSetters.errors.txt | 4 ++-- .../reference/objectLiteralGettersAndSetters.js | 4 ++-- .../typeOfEnumAndVarRedeclarations.errors.txt | 8 ++++---- .../reference/typeOfEnumAndVarRedeclarations.js | 4 ++-- .../reference/validNullAssignments.errors.txt | 4 ++-- 14 files changed, 51 insertions(+), 51 deletions(-) diff --git a/tests/baselines/reference/assignToEnum.errors.txt b/tests/baselines/reference/assignToEnum.errors.txt index 4846a96dbb7..d50daa3099f 100644 --- a/tests/baselines/reference/assignToEnum.errors.txt +++ b/tests/baselines/reference/assignToEnum.errors.txt @@ -1,7 +1,7 @@ tests/cases/compiler/assignToEnum.ts(2,1): error TS2364: Invalid left-hand side of assignment expression. tests/cases/compiler/assignToEnum.ts(3,1): error TS2364: Invalid left-hand side of assignment expression. -tests/cases/compiler/assignToEnum.ts(4,1): error TS2364: Invalid left-hand side of assignment expression. -tests/cases/compiler/assignToEnum.ts(5,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/compiler/assignToEnum.ts(4,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/assignToEnum.ts(5,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. ==== tests/cases/compiler/assignToEnum.ts (4 errors) ==== @@ -14,9 +14,9 @@ tests/cases/compiler/assignToEnum.ts(5,1): error TS2364: Invalid left-hand side !!! error TS2364: Invalid left-hand side of assignment expression. A.foo = 1; // invalid LHS ~~~~~ -!!! error TS2364: Invalid left-hand side of assignment expression. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. A.foo = A.bar; // invalid LHS ~~~~~ -!!! error TS2364: Invalid left-hand side of assignment expression. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. \ No newline at end of file diff --git a/tests/baselines/reference/assignments.errors.txt b/tests/baselines/reference/assignments.errors.txt index 9f89863f31f..05bc4ce1794 100644 --- a/tests/baselines/reference/assignments.errors.txt +++ b/tests/baselines/reference/assignments.errors.txt @@ -1,7 +1,7 @@ tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(11,1): error TS2304: Cannot find name 'M'. tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(14,1): error TS2364: Invalid left-hand side of assignment expression. tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(17,1): error TS2364: Invalid left-hand side of assignment expression. -tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(18,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(18,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(21,1): error TS2364: Invalid left-hand side of assignment expression. tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(31,1): error TS2304: Cannot find name 'I'. @@ -32,7 +32,7 @@ tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(31,1): er !!! error TS2364: Invalid left-hand side of assignment expression. E.A = null; // OK per spec, Error per implementation (509581) ~~~ -!!! error TS2364: Invalid left-hand side of assignment expression. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. function fn() { } fn = null; // Should be error diff --git a/tests/baselines/reference/constEnumPropertyAccess2.errors.txt b/tests/baselines/reference/constEnumPropertyAccess2.errors.txt index 19b273faffa..a943ee00962 100644 --- a/tests/baselines/reference/constEnumPropertyAccess2.errors.txt +++ b/tests/baselines/reference/constEnumPropertyAccess2.errors.txt @@ -1,7 +1,7 @@ tests/cases/conformance/constEnums/constEnumPropertyAccess2.ts(14,9): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment. tests/cases/conformance/constEnums/constEnumPropertyAccess2.ts(15,12): error TS2476: A const enum member can only be accessed using a string literal. tests/cases/conformance/constEnums/constEnumPropertyAccess2.ts(17,1): error TS2322: Type 'string' is not assignable to type 'G'. -tests/cases/conformance/constEnums/constEnumPropertyAccess2.ts(19,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/constEnums/constEnumPropertyAccess2.ts(19,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. ==== tests/cases/conformance/constEnums/constEnumPropertyAccess2.ts (4 errors) ==== @@ -31,5 +31,5 @@ tests/cases/conformance/constEnums/constEnumPropertyAccess2.ts(19,1): error TS23 function foo(x: G) { } G.B = 3; ~~~ -!!! error TS2364: Invalid left-hand side of assignment expression. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. \ No newline at end of file diff --git a/tests/baselines/reference/decrementOperatorWithEnumType.errors.txt b/tests/baselines/reference/decrementOperatorWithEnumType.errors.txt index 221163c097f..29e06bc6a4e 100644 --- a/tests/baselines/reference/decrementOperatorWithEnumType.errors.txt +++ b/tests/baselines/reference/decrementOperatorWithEnumType.errors.txt @@ -1,6 +1,6 @@ -tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumType.ts(6,25): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. -tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumType.ts(7,23): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. -tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumType.ts(10,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumType.ts(6,25): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumType.ts(7,23): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumType.ts(10,3): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumType.ts(12,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumType.ts(12,7): error TS2304: Cannot find name 'A'. @@ -13,15 +13,15 @@ tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOp // expression var ResultIsNumber1 = --ENUM1["A"]; ~~~~~~~~~~ -!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. var ResultIsNumber2 = ENUM1.A--; ~~~~~~~ -!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. // miss assignment operator --ENUM1["A"]; ~~~~~~~~~~ -!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. ENUM1[A]--; ~~~~~~~~ diff --git a/tests/baselines/reference/enumBasics.js b/tests/baselines/reference/enumBasics.js index 25aec5a72d8..4ac41c0f3d1 100644 --- a/tests/baselines/reference/enumBasics.js +++ b/tests/baselines/reference/enumBasics.js @@ -12,10 +12,10 @@ var x: number = E1.A; // Enum object type is anonymous with properties of the enum type and numeric indexer var e = E1; var e: { - A: E1; - B: E1; - C: E1; - [n: number]: string; + readonly A: E1; + readonly B: E1; + readonly C: E1; + readonly [n: number]: string; }; var e: typeof E1; diff --git a/tests/baselines/reference/enumBasics.symbols b/tests/baselines/reference/enumBasics.symbols index 23f2a400741..ce81a80ca5f 100644 --- a/tests/baselines/reference/enumBasics.symbols +++ b/tests/baselines/reference/enumBasics.symbols @@ -28,20 +28,20 @@ var e = E1; var e: { >e : Symbol(e, Decl(enumBasics.ts, 11, 3), Decl(enumBasics.ts, 12, 3), Decl(enumBasics.ts, 18, 3)) - A: E1; + readonly A: E1; >A : Symbol(A, Decl(enumBasics.ts, 12, 8)) >E1 : Symbol(E1, Decl(enumBasics.ts, 0, 0)) - B: E1; ->B : Symbol(B, Decl(enumBasics.ts, 13, 10)) + readonly B: E1; +>B : Symbol(B, Decl(enumBasics.ts, 13, 19)) >E1 : Symbol(E1, Decl(enumBasics.ts, 0, 0)) - C: E1; ->C : Symbol(C, Decl(enumBasics.ts, 14, 10)) + readonly C: E1; +>C : Symbol(C, Decl(enumBasics.ts, 14, 19)) >E1 : Symbol(E1, Decl(enumBasics.ts, 0, 0)) - [n: number]: string; ->n : Symbol(n, Decl(enumBasics.ts, 16, 5)) + readonly [n: number]: string; +>n : Symbol(n, Decl(enumBasics.ts, 16, 14)) }; var e: typeof E1; diff --git a/tests/baselines/reference/enumBasics.types b/tests/baselines/reference/enumBasics.types index 87f6f12b6b2..cecd8f51136 100644 --- a/tests/baselines/reference/enumBasics.types +++ b/tests/baselines/reference/enumBasics.types @@ -28,19 +28,19 @@ var e = E1; var e: { >e : typeof E1 - A: E1; + readonly A: E1; >A : E1 >E1 : E1 - B: E1; + readonly B: E1; >B : E1 >E1 : E1 - C: E1; + readonly C: E1; >C : E1 >E1 : E1 - [n: number]: string; + readonly [n: number]: string; >n : number }; diff --git a/tests/baselines/reference/incrementOperatorWithEnumType.errors.txt b/tests/baselines/reference/incrementOperatorWithEnumType.errors.txt index 8c556f89732..fc8b682b59e 100644 --- a/tests/baselines/reference/incrementOperatorWithEnumType.errors.txt +++ b/tests/baselines/reference/incrementOperatorWithEnumType.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumType.ts(6,25): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. -tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumType.ts(7,23): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. -tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumType.ts(10,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. -tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumType.ts(12,1): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumType.ts(6,25): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumType.ts(7,23): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumType.ts(10,3): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumType.ts(12,1): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. ==== tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumType.ts (4 errors) ==== @@ -12,16 +12,16 @@ tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOp // expression var ResultIsNumber1 = ++ENUM1["B"]; ~~~~~~~~~~ -!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. var ResultIsNumber2 = ENUM1.B++; ~~~~~~~ -!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. // miss assignment operator ++ENUM1["B"]; ~~~~~~~~~~ -!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. ENUM1.B++; ~~~~~~~ -!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. \ No newline at end of file +!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property. \ No newline at end of file diff --git a/tests/baselines/reference/invalidUndefinedAssignments.errors.txt b/tests/baselines/reference/invalidUndefinedAssignments.errors.txt index 4c32b1a6c8e..5eff2e7ff1a 100644 --- a/tests/baselines/reference/invalidUndefinedAssignments.errors.txt +++ b/tests/baselines/reference/invalidUndefinedAssignments.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts(4,1): error TS2364: Invalid left-hand side of assignment expression. -tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts(5,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts(5,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts(9,1): error TS2364: Invalid left-hand side of assignment expression. tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts(14,1): error TS2304: Cannot find name 'I'. tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts(17,1): error TS2364: Invalid left-hand side of assignment expression. @@ -15,7 +15,7 @@ tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.t !!! error TS2364: Invalid left-hand side of assignment expression. E.A = x; ~~~ -!!! error TS2364: Invalid left-hand side of assignment expression. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. class C { foo: string } var f: C; diff --git a/tests/baselines/reference/objectLiteralGettersAndSetters.errors.txt b/tests/baselines/reference/objectLiteralGettersAndSetters.errors.txt index 4e04b856d8c..1290859fbf9 100644 --- a/tests/baselines/reference/objectLiteralGettersAndSetters.errors.txt +++ b/tests/baselines/reference/objectLiteralGettersAndSetters.errors.txt @@ -79,13 +79,13 @@ tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetter var getter1 = { get x(): string { return undefined; } }; ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var getter1: { x: string; } + var getter1: { readonly x: string; } // Get accessor only, type of the property is the inferred return type of the get accessor var getter2 = { get x() { return ''; } }; ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var getter2: { x: string; } + var getter2: { readonly x: string; } // Set accessor only, type of the property is the param type of the set accessor var setter1 = { set x(n: number) { } }; diff --git a/tests/baselines/reference/objectLiteralGettersAndSetters.js b/tests/baselines/reference/objectLiteralGettersAndSetters.js index d226c2c5569..d3a9d643086 100644 --- a/tests/baselines/reference/objectLiteralGettersAndSetters.js +++ b/tests/baselines/reference/objectLiteralGettersAndSetters.js @@ -17,11 +17,11 @@ var callSig3: { num: (n: number) => string; }; // Get accessor only, type of the property is the annotated return type of the get accessor var getter1 = { get x(): string { return undefined; } }; -var getter1: { x: string; } +var getter1: { readonly x: string; } // Get accessor only, type of the property is the inferred return type of the get accessor var getter2 = { get x() { return ''; } }; -var getter2: { x: string; } +var getter2: { readonly x: string; } // Set accessor only, type of the property is the param type of the set accessor var setter1 = { set x(n: number) { } }; diff --git a/tests/baselines/reference/typeOfEnumAndVarRedeclarations.errors.txt b/tests/baselines/reference/typeOfEnumAndVarRedeclarations.errors.txt index d97d33b0103..d7410ec04cb 100644 --- a/tests/baselines/reference/typeOfEnumAndVarRedeclarations.errors.txt +++ b/tests/baselines/reference/typeOfEnumAndVarRedeclarations.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/typeOfEnumAndVarRedeclarations.ts(10,41): error TS2375: Duplicate number index signature. +tests/cases/compiler/typeOfEnumAndVarRedeclarations.ts(10,70): error TS2375: Duplicate number index signature. ==== tests/cases/compiler/typeOfEnumAndVarRedeclarations.ts (1 errors) ==== @@ -9,8 +9,8 @@ tests/cases/compiler/typeOfEnumAndVarRedeclarations.ts(10,41): error TS2375: Dup b = 1 } var x = E; - var x: { a: E; b: E;[x: number]: string; }; // Shouldnt error + var x: { readonly a: E; readonly b: E; readonly [x: number]: string; }; // Shouldnt error var y = E; - var y: { a: E; b: E;[x: number]: string;[x: number]: string } // two errors: the types are not identical and duplicate signatures - ~~~~~~~~~~~~~~~~~~~ + var y: { readonly a: E; readonly b: E; readonly [x: number]: string; readonly [x: number]: string } // two errors: the types are not identical and duplicate signatures + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2375: Duplicate number index signature. \ No newline at end of file diff --git a/tests/baselines/reference/typeOfEnumAndVarRedeclarations.js b/tests/baselines/reference/typeOfEnumAndVarRedeclarations.js index ce77eac85e6..391c9c1679a 100644 --- a/tests/baselines/reference/typeOfEnumAndVarRedeclarations.js +++ b/tests/baselines/reference/typeOfEnumAndVarRedeclarations.js @@ -6,9 +6,9 @@ enum E { b = 1 } var x = E; -var x: { a: E; b: E;[x: number]: string; }; // Shouldnt error +var x: { readonly a: E; readonly b: E; readonly [x: number]: string; }; // Shouldnt error var y = E; -var y: { a: E; b: E;[x: number]: string;[x: number]: string } // two errors: the types are not identical and duplicate signatures +var y: { readonly a: E; readonly b: E; readonly [x: number]: string; readonly [x: number]: string } // two errors: the types are not identical and duplicate signatures //// [typeOfEnumAndVarRedeclarations.js] var E; diff --git a/tests/baselines/reference/validNullAssignments.errors.txt b/tests/baselines/reference/validNullAssignments.errors.txt index 042a7172b52..057d6ce4791 100644 --- a/tests/baselines/reference/validNullAssignments.errors.txt +++ b/tests/baselines/reference/validNullAssignments.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/types/primitives/null/validNullAssignments.ts(10,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/types/primitives/null/validNullAssignments.ts(10,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. tests/cases/conformance/types/primitives/null/validNullAssignments.ts(15,1): error TS2364: Invalid left-hand side of assignment expression. tests/cases/conformance/types/primitives/null/validNullAssignments.ts(20,1): error TS2304: Cannot find name 'I'. tests/cases/conformance/types/primitives/null/validNullAssignments.ts(23,1): error TS2364: Invalid left-hand side of assignment expression. @@ -17,7 +17,7 @@ tests/cases/conformance/types/primitives/null/validNullAssignments.ts(30,1): err enum E { A } E.A = null; // error ~~~ -!!! error TS2364: Invalid left-hand side of assignment expression. +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. class C { foo: string } var f: C; From 756164210431692ad6ae62314aacb9871180c0b6 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sun, 24 Jan 2016 15:44:13 -0800 Subject: [PATCH 068/160] Adding const/readonly to core.d.ts and es6.d.ts --- src/lib/core.d.ts | 273 +++++++++++++++++++++++----------------------- src/lib/es6.d.ts | 98 +++++++++-------- 2 files changed, 186 insertions(+), 185 deletions(-) diff --git a/src/lib/core.d.ts b/src/lib/core.d.ts index cc7d916977c..31cf0ca3136 100644 --- a/src/lib/core.d.ts +++ b/src/lib/core.d.ts @@ -2,8 +2,8 @@ /// ECMAScript APIs ///////////////////////////// -declare var NaN: number; -declare var Infinity: number; +declare const NaN: number; +declare const Infinity: number; /** * Evaluates JavaScript code and executes it. @@ -113,7 +113,7 @@ interface ObjectConstructor { (value: any): any; /** A reference to the prototype for a class of objects. */ - prototype: Object; + readonly prototype: Object; /** * Returns the prototype of an object. @@ -204,7 +204,7 @@ interface ObjectConstructor { /** * Provides functionality common to all JavaScript objects. */ -declare var Object: ObjectConstructor; +declare const Object: ObjectConstructor; /** * Creates a new function. @@ -233,7 +233,7 @@ interface Function { bind(thisArg: any, ...argArray: any[]): any; prototype: any; - length: number; + readonly length: number; // Non-standard extensions arguments: any; @@ -247,10 +247,10 @@ interface FunctionConstructor { */ new (...args: string[]): Function; (...args: string[]): Function; - prototype: Function; + readonly prototype: Function; } -declare var Function: FunctionConstructor; +declare const Function: FunctionConstructor; interface IArguments { [index: number]: any; @@ -398,7 +398,7 @@ interface String { trim(): string; /** Returns the length of a String object. */ - length: number; + readonly length: number; // IE extensions /** @@ -411,20 +411,20 @@ interface String { /** Returns the primitive value of the specified object. */ valueOf(): string; - [index: number]: string; + readonly [index: number]: string; } interface StringConstructor { new (value?: any): String; (value?: any): string; - prototype: String; + readonly prototype: String; fromCharCode(...codes: number[]): string; } /** * Allows manipulation and formatting of text strings and determination and location of substrings within strings. */ -declare var String: StringConstructor; +declare const String: StringConstructor; interface Boolean { /** Returns the primitive value of the specified object. */ @@ -434,10 +434,10 @@ interface Boolean { interface BooleanConstructor { new (value?: any): Boolean; (value?: any): boolean; - prototype: Boolean; + readonly prototype: Boolean; } -declare var Boolean: BooleanConstructor; +declare const Boolean: BooleanConstructor; interface Number { /** @@ -471,57 +471,57 @@ interface Number { interface NumberConstructor { new (value?: any): Number; (value?: any): number; - prototype: Number; + readonly prototype: Number; /** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */ - MAX_VALUE: number; + readonly MAX_VALUE: number; /** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */ - MIN_VALUE: number; + readonly MIN_VALUE: number; /** * A value that is not a number. * In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function. */ - NaN: number; + readonly NaN: number; /** * A value that is less than the largest negative number that can be represented in JavaScript. * JavaScript displays NEGATIVE_INFINITY values as -infinity. */ - NEGATIVE_INFINITY: number; + readonly NEGATIVE_INFINITY: number; /** * A value greater than the largest number that can be represented in JavaScript. * JavaScript displays POSITIVE_INFINITY values as infinity. */ - POSITIVE_INFINITY: number; + readonly POSITIVE_INFINITY: number; } /** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */ -declare var Number: NumberConstructor; +declare const Number: NumberConstructor; interface TemplateStringsArray extends Array { - raw: string[]; + readonly raw: string[]; } interface Math { /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */ - E: number; + readonly E: number; /** The natural logarithm of 10. */ - LN10: number; + readonly LN10: number; /** The natural logarithm of 2. */ - LN2: number; + readonly LN2: number; /** The base-2 logarithm of e. */ - LOG2E: number; + readonly LOG2E: number; /** The base-10 logarithm of e. */ - LOG10E: number; + readonly LOG10E: number; /** Pi. This is the ratio of the circumference of a circle to its diameter. */ - PI: number; + readonly PI: number; /** The square root of 0.5, or, equivalently, one divided by the square root of 2. */ - SQRT1_2: number; + readonly SQRT1_2: number; /** The square root of 2. */ - SQRT2: number; + readonly SQRT2: number; /** * Returns the absolute value of a number (the value without regard to whether it is positive or negative). * For example, the absolute value of -5 is the same as the absolute value of 5. @@ -614,7 +614,7 @@ interface Math { tan(x: number): number; } /** An intrinsic object that provides basic mathematics functionality and constants. */ -declare var Math: Math; +declare const Math: Math; /** Enables basic storage and retrieval of dates and times. */ interface Date { @@ -776,7 +776,7 @@ interface DateConstructor { new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; (): string; - prototype: Date; + readonly prototype: Date; /** * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970. * @param s A date string @@ -796,7 +796,7 @@ interface DateConstructor { now(): number; } -declare var Date: DateConstructor; +declare const Date: DateConstructor; interface RegExpMatchArray extends Array { index?: number; @@ -822,16 +822,16 @@ interface RegExp { test(string: string): boolean; /** Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. */ - source: string; + readonly source: string; /** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */ - global: boolean; + readonly global: boolean; /** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */ - ignoreCase: boolean; + readonly ignoreCase: boolean; /** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */ - multiline: boolean; + readonly multiline: boolean; lastIndex: number; @@ -842,7 +842,7 @@ interface RegExp { interface RegExpConstructor { new (pattern: string, flags?: string): RegExp; (pattern: string, flags?: string): RegExp; - prototype: RegExp; + readonly prototype: RegExp; // Non-standard extensions $1: string; @@ -857,7 +857,7 @@ interface RegExpConstructor { lastMatch: string; } -declare var RegExp: RegExpConstructor; +declare const RegExp: RegExpConstructor; interface Error { name: string; @@ -867,10 +867,10 @@ interface Error { interface ErrorConstructor { new (message?: string): Error; (message?: string): Error; - prototype: Error; + readonly prototype: Error; } -declare var Error: ErrorConstructor; +declare const Error: ErrorConstructor; interface EvalError extends Error { } @@ -878,10 +878,10 @@ interface EvalError extends Error { interface EvalErrorConstructor { new (message?: string): EvalError; (message?: string): EvalError; - prototype: EvalError; + readonly prototype: EvalError; } -declare var EvalError: EvalErrorConstructor; +declare const EvalError: EvalErrorConstructor; interface RangeError extends Error { } @@ -889,10 +889,10 @@ interface RangeError extends Error { interface RangeErrorConstructor { new (message?: string): RangeError; (message?: string): RangeError; - prototype: RangeError; + readonly prototype: RangeError; } -declare var RangeError: RangeErrorConstructor; +declare const RangeError: RangeErrorConstructor; interface ReferenceError extends Error { } @@ -900,10 +900,10 @@ interface ReferenceError extends Error { interface ReferenceErrorConstructor { new (message?: string): ReferenceError; (message?: string): ReferenceError; - prototype: ReferenceError; + readonly prototype: ReferenceError; } -declare var ReferenceError: ReferenceErrorConstructor; +declare const ReferenceError: ReferenceErrorConstructor; interface SyntaxError extends Error { } @@ -911,10 +911,10 @@ interface SyntaxError extends Error { interface SyntaxErrorConstructor { new (message?: string): SyntaxError; (message?: string): SyntaxError; - prototype: SyntaxError; + readonly prototype: SyntaxError; } -declare var SyntaxError: SyntaxErrorConstructor; +declare const SyntaxError: SyntaxErrorConstructor; interface TypeError extends Error { } @@ -922,10 +922,10 @@ interface TypeError extends Error { interface TypeErrorConstructor { new (message?: string): TypeError; (message?: string): TypeError; - prototype: TypeError; + readonly prototype: TypeError; } -declare var TypeError: TypeErrorConstructor; +declare const TypeError: TypeErrorConstructor; interface URIError extends Error { } @@ -933,10 +933,10 @@ interface URIError extends Error { interface URIErrorConstructor { new (message?: string): URIError; (message?: string): URIError; - prototype: URIError; + readonly prototype: URIError; } -declare var URIError: URIErrorConstructor; +declare const URIError: URIErrorConstructor; interface JSON { /** @@ -981,7 +981,7 @@ interface JSON { /** * An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format. */ -declare var JSON: JSON; +declare const JSON: JSON; ///////////////////////////// @@ -1238,10 +1238,10 @@ interface ArrayConstructor { (arrayLength: number): T[]; (...items: T[]): T[]; isArray(arg: any): arg is Array; - prototype: Array; + readonly prototype: Array; } -declare var Array: ArrayConstructor; +declare const Array: ArrayConstructor; interface TypedPropertyDescriptor { enumerable?: boolean; @@ -1271,11 +1271,10 @@ interface PromiseLike { } interface ArrayLike { - length: number; - [n: number]: T; + readonly length: number; + readonly [n: number]: T; } - /** * Represents a raw buffer of binary data, which is used to store data for the * different typed arrays. ArrayBuffers cannot be read from or written to directly, @@ -1286,7 +1285,7 @@ interface ArrayBuffer { /** * Read-only. The length of the ArrayBuffer (in bytes). */ - byteLength: number; + readonly byteLength: number; /** * Returns a section of an ArrayBuffer. @@ -1295,11 +1294,11 @@ interface ArrayBuffer { } interface ArrayBufferConstructor { - prototype: ArrayBuffer; + readonly prototype: ArrayBuffer; new (byteLength: number): ArrayBuffer; isView(arg: any): arg is ArrayBufferView; } -declare var ArrayBuffer: ArrayBufferConstructor; +declare const ArrayBuffer: ArrayBufferConstructor; interface ArrayBufferView { /** @@ -1319,9 +1318,9 @@ interface ArrayBufferView { } interface DataView { - buffer: ArrayBuffer; - byteLength: number; - byteOffset: number; + readonly buffer: ArrayBuffer; + readonly byteLength: number; + readonly byteOffset: number; /** * Gets the Float32 value at the specified byte offset from the start of the view. There is * no alignment constraint; multi-byte values may be fetched from any offset. @@ -1449,7 +1448,7 @@ interface DataView { interface DataViewConstructor { new (buffer: ArrayBuffer, byteOffset?: number, byteLength?: number): DataView; } -declare var DataView: DataViewConstructor; +declare const DataView: DataViewConstructor; /** * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested @@ -1459,22 +1458,22 @@ interface Int8Array { /** * The size in bytes of each element in the array. */ - BYTES_PER_ELEMENT: number; + readonly BYTES_PER_ELEMENT: number; /** * The ArrayBuffer instance referenced by the array. */ - buffer: ArrayBuffer; + readonly buffer: ArrayBuffer; /** * The length in bytes of the array. */ - byteLength: number; + readonly byteLength: number; /** * The offset in bytes of the array. */ - byteOffset: number; + readonly byteOffset: number; /** * Returns the this object after copying a section of the array identified by start and end @@ -1573,7 +1572,7 @@ interface Int8Array { /** * The length of the array. */ - length: number; + readonly length: number; /** * Calls a defined callback function on each element of an array, and returns an array that @@ -1697,7 +1696,7 @@ interface Int8Array { [index: number]: number; } interface Int8ArrayConstructor { - prototype: Int8Array; + readonly prototype: Int8Array; new (length: number): Int8Array; new (array: ArrayLike): Int8Array; new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int8Array; @@ -1705,7 +1704,7 @@ interface Int8ArrayConstructor { /** * The size in bytes of each element in the array. */ - BYTES_PER_ELEMENT: number; + readonly BYTES_PER_ELEMENT: number; /** * Returns a new array from a set of elements. @@ -1722,7 +1721,7 @@ interface Int8ArrayConstructor { from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; } -declare var Int8Array: Int8ArrayConstructor; +declare const Int8Array: Int8ArrayConstructor; /** * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the @@ -1732,22 +1731,22 @@ interface Uint8Array { /** * The size in bytes of each element in the array. */ - BYTES_PER_ELEMENT: number; + readonly BYTES_PER_ELEMENT: number; /** * The ArrayBuffer instance referenced by the array. */ - buffer: ArrayBuffer; + readonly buffer: ArrayBuffer; /** * The length in bytes of the array. */ - byteLength: number; + readonly byteLength: number; /** * The offset in bytes of the array. */ - byteOffset: number; + readonly byteOffset: number; /** * Returns the this object after copying a section of the array identified by start and end @@ -1846,7 +1845,7 @@ interface Uint8Array { /** * The length of the array. */ - length: number; + readonly length: number; /** * Calls a defined callback function on each element of an array, and returns an array that @@ -1971,7 +1970,7 @@ interface Uint8Array { } interface Uint8ArrayConstructor { - prototype: Uint8Array; + readonly prototype: Uint8Array; new (length: number): Uint8Array; new (array: ArrayLike): Uint8Array; new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8Array; @@ -1979,7 +1978,7 @@ interface Uint8ArrayConstructor { /** * The size in bytes of each element in the array. */ - BYTES_PER_ELEMENT: number; + readonly BYTES_PER_ELEMENT: number; /** * Returns a new array from a set of elements. @@ -1996,7 +1995,7 @@ interface Uint8ArrayConstructor { from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; } -declare var Uint8Array: Uint8ArrayConstructor; +declare const Uint8Array: Uint8ArrayConstructor; /** * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0. @@ -2006,22 +2005,22 @@ interface Uint8ClampedArray { /** * The size in bytes of each element in the array. */ - BYTES_PER_ELEMENT: number; + readonly BYTES_PER_ELEMENT: number; /** * The ArrayBuffer instance referenced by the array. */ - buffer: ArrayBuffer; + readonly buffer: ArrayBuffer; /** * The length in bytes of the array. */ - byteLength: number; + readonly byteLength: number; /** * The offset in bytes of the array. */ - byteOffset: number; + readonly byteOffset: number; /** * Returns the this object after copying a section of the array identified by start and end @@ -2120,7 +2119,7 @@ interface Uint8ClampedArray { /** * The length of the array. */ - length: number; + readonly length: number; /** * Calls a defined callback function on each element of an array, and returns an array that @@ -2245,7 +2244,7 @@ interface Uint8ClampedArray { } interface Uint8ClampedArrayConstructor { - prototype: Uint8ClampedArray; + readonly prototype: Uint8ClampedArray; new (length: number): Uint8ClampedArray; new (array: ArrayLike): Uint8ClampedArray; new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray; @@ -2253,7 +2252,7 @@ interface Uint8ClampedArrayConstructor { /** * The size in bytes of each element in the array. */ - BYTES_PER_ELEMENT: number; + readonly BYTES_PER_ELEMENT: number; /** * Returns a new array from a set of elements. @@ -2269,7 +2268,7 @@ interface Uint8ClampedArrayConstructor { */ from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; } -declare var Uint8ClampedArray: Uint8ClampedArrayConstructor; +declare const Uint8ClampedArray: Uint8ClampedArrayConstructor; /** * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the @@ -2279,22 +2278,22 @@ interface Int16Array { /** * The size in bytes of each element in the array. */ - BYTES_PER_ELEMENT: number; + readonly BYTES_PER_ELEMENT: number; /** * The ArrayBuffer instance referenced by the array. */ - buffer: ArrayBuffer; + readonly buffer: ArrayBuffer; /** * The length in bytes of the array. */ - byteLength: number; + readonly byteLength: number; /** * The offset in bytes of the array. */ - byteOffset: number; + readonly byteOffset: number; /** * Returns the this object after copying a section of the array identified by start and end @@ -2393,7 +2392,7 @@ interface Int16Array { /** * The length of the array. */ - length: number; + readonly length: number; /** * Calls a defined callback function on each element of an array, and returns an array that @@ -2518,7 +2517,7 @@ interface Int16Array { } interface Int16ArrayConstructor { - prototype: Int16Array; + readonly prototype: Int16Array; new (length: number): Int16Array; new (array: ArrayLike): Int16Array; new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int16Array; @@ -2526,7 +2525,7 @@ interface Int16ArrayConstructor { /** * The size in bytes of each element in the array. */ - BYTES_PER_ELEMENT: number; + readonly BYTES_PER_ELEMENT: number; /** * Returns a new array from a set of elements. @@ -2543,7 +2542,7 @@ interface Int16ArrayConstructor { from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; } -declare var Int16Array: Int16ArrayConstructor; +declare const Int16Array: Int16ArrayConstructor; /** * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the @@ -2553,22 +2552,22 @@ interface Uint16Array { /** * The size in bytes of each element in the array. */ - BYTES_PER_ELEMENT: number; + readonly BYTES_PER_ELEMENT: number; /** * The ArrayBuffer instance referenced by the array. */ - buffer: ArrayBuffer; + readonly buffer: ArrayBuffer; /** * The length in bytes of the array. */ - byteLength: number; + readonly byteLength: number; /** * The offset in bytes of the array. */ - byteOffset: number; + readonly byteOffset: number; /** * Returns the this object after copying a section of the array identified by start and end @@ -2667,7 +2666,7 @@ interface Uint16Array { /** * The length of the array. */ - length: number; + readonly length: number; /** * Calls a defined callback function on each element of an array, and returns an array that @@ -2792,7 +2791,7 @@ interface Uint16Array { } interface Uint16ArrayConstructor { - prototype: Uint16Array; + readonly prototype: Uint16Array; new (length: number): Uint16Array; new (array: ArrayLike): Uint16Array; new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint16Array; @@ -2800,7 +2799,7 @@ interface Uint16ArrayConstructor { /** * The size in bytes of each element in the array. */ - BYTES_PER_ELEMENT: number; + readonly BYTES_PER_ELEMENT: number; /** * Returns a new array from a set of elements. @@ -2817,7 +2816,7 @@ interface Uint16ArrayConstructor { from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; } -declare var Uint16Array: Uint16ArrayConstructor; +declare const Uint16Array: Uint16ArrayConstructor; /** * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the * requested number of bytes could not be allocated an exception is raised. @@ -2826,22 +2825,22 @@ interface Int32Array { /** * The size in bytes of each element in the array. */ - BYTES_PER_ELEMENT: number; + readonly BYTES_PER_ELEMENT: number; /** * The ArrayBuffer instance referenced by the array. */ - buffer: ArrayBuffer; + readonly buffer: ArrayBuffer; /** * The length in bytes of the array. */ - byteLength: number; + readonly byteLength: number; /** * The offset in bytes of the array. */ - byteOffset: number; + readonly byteOffset: number; /** * Returns the this object after copying a section of the array identified by start and end @@ -2940,7 +2939,7 @@ interface Int32Array { /** * The length of the array. */ - length: number; + readonly length: number; /** * Calls a defined callback function on each element of an array, and returns an array that @@ -3065,7 +3064,7 @@ interface Int32Array { } interface Int32ArrayConstructor { - prototype: Int32Array; + readonly prototype: Int32Array; new (length: number): Int32Array; new (array: ArrayLike): Int32Array; new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int32Array; @@ -3073,7 +3072,7 @@ interface Int32ArrayConstructor { /** * The size in bytes of each element in the array. */ - BYTES_PER_ELEMENT: number; + readonly BYTES_PER_ELEMENT: number; /** * Returns a new array from a set of elements. @@ -3089,7 +3088,7 @@ interface Int32ArrayConstructor { */ from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; } -declare var Int32Array: Int32ArrayConstructor; +declare const Int32Array: Int32ArrayConstructor; /** * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the @@ -3099,22 +3098,22 @@ interface Uint32Array { /** * The size in bytes of each element in the array. */ - BYTES_PER_ELEMENT: number; + readonly BYTES_PER_ELEMENT: number; /** * The ArrayBuffer instance referenced by the array. */ - buffer: ArrayBuffer; + readonly buffer: ArrayBuffer; /** * The length in bytes of the array. */ - byteLength: number; + readonly byteLength: number; /** * The offset in bytes of the array. */ - byteOffset: number; + readonly byteOffset: number; /** * Returns the this object after copying a section of the array identified by start and end @@ -3213,7 +3212,7 @@ interface Uint32Array { /** * The length of the array. */ - length: number; + readonly length: number; /** * Calls a defined callback function on each element of an array, and returns an array that @@ -3338,7 +3337,7 @@ interface Uint32Array { } interface Uint32ArrayConstructor { - prototype: Uint32Array; + readonly prototype: Uint32Array; new (length: number): Uint32Array; new (array: ArrayLike): Uint32Array; new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint32Array; @@ -3346,7 +3345,7 @@ interface Uint32ArrayConstructor { /** * The size in bytes of each element in the array. */ - BYTES_PER_ELEMENT: number; + readonly BYTES_PER_ELEMENT: number; /** * Returns a new array from a set of elements. @@ -3362,7 +3361,7 @@ interface Uint32ArrayConstructor { */ from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; } -declare var Uint32Array: Uint32ArrayConstructor; +declare const Uint32Array: Uint32ArrayConstructor; /** * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number @@ -3372,22 +3371,22 @@ interface Float32Array { /** * The size in bytes of each element in the array. */ - BYTES_PER_ELEMENT: number; + readonly BYTES_PER_ELEMENT: number; /** * The ArrayBuffer instance referenced by the array. */ - buffer: ArrayBuffer; + readonly buffer: ArrayBuffer; /** * The length in bytes of the array. */ - byteLength: number; + readonly byteLength: number; /** * The offset in bytes of the array. */ - byteOffset: number; + readonly byteOffset: number; /** * Returns the this object after copying a section of the array identified by start and end @@ -3486,7 +3485,7 @@ interface Float32Array { /** * The length of the array. */ - length: number; + readonly length: number; /** * Calls a defined callback function on each element of an array, and returns an array that @@ -3611,7 +3610,7 @@ interface Float32Array { } interface Float32ArrayConstructor { - prototype: Float32Array; + readonly prototype: Float32Array; new (length: number): Float32Array; new (array: ArrayLike): Float32Array; new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float32Array; @@ -3619,7 +3618,7 @@ interface Float32ArrayConstructor { /** * The size in bytes of each element in the array. */ - BYTES_PER_ELEMENT: number; + readonly BYTES_PER_ELEMENT: number; /** * Returns a new array from a set of elements. @@ -3636,7 +3635,7 @@ interface Float32ArrayConstructor { from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; } -declare var Float32Array: Float32ArrayConstructor; +declare const Float32Array: Float32ArrayConstructor; /** * A typed array of 64-bit float values. The contents are initialized to 0. If the requested @@ -3646,22 +3645,22 @@ interface Float64Array { /** * The size in bytes of each element in the array. */ - BYTES_PER_ELEMENT: number; + readonly BYTES_PER_ELEMENT: number; /** * The ArrayBuffer instance referenced by the array. */ - buffer: ArrayBuffer; + readonly buffer: ArrayBuffer; /** * The length in bytes of the array. */ - byteLength: number; + readonly byteLength: number; /** * The offset in bytes of the array. */ - byteOffset: number; + readonly byteOffset: number; /** * Returns the this object after copying a section of the array identified by start and end @@ -3760,7 +3759,7 @@ interface Float64Array { /** * The length of the array. */ - length: number; + readonly length: number; /** * Calls a defined callback function on each element of an array, and returns an array that @@ -3885,7 +3884,7 @@ interface Float64Array { } interface Float64ArrayConstructor { - prototype: Float64Array; + readonly prototype: Float64Array; new (length: number): Float64Array; new (array: ArrayLike): Float64Array; new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float64Array; @@ -3893,7 +3892,7 @@ interface Float64ArrayConstructor { /** * The size in bytes of each element in the array. */ - BYTES_PER_ELEMENT: number; + readonly BYTES_PER_ELEMENT: number; /** * Returns a new array from a set of elements. @@ -3909,4 +3908,4 @@ interface Float64ArrayConstructor { */ from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; } -declare var Float64Array: Float64ArrayConstructor; +declare const Float64Array: Float64ArrayConstructor; diff --git a/src/lib/es6.d.ts b/src/lib/es6.d.ts index f5d6b06bc47..5d71fba2b0b 100644 --- a/src/lib/es6.d.ts +++ b/src/lib/es6.d.ts @@ -7,14 +7,14 @@ interface Symbol { /** Returns the primitive value of the specified object. */ valueOf(): Object; - [Symbol.toStringTag]: "Symbol"; + readonly [Symbol.toStringTag]: "Symbol"; } interface SymbolConstructor { /** * A reference to the prototype. */ - prototype: Symbol; + readonly prototype: Symbol; /** * Returns a new unique Symbol value. @@ -42,67 +42,67 @@ interface SymbolConstructor { * A method that determines if a constructor object recognizes an object as one of the * constructor’s instances. Called by the semantics of the instanceof operator. */ - hasInstance: symbol; + readonly hasInstance: symbol; /** * A Boolean value that if true indicates that an object should flatten to its array elements * by Array.prototype.concat. */ - isConcatSpreadable: symbol; + readonly isConcatSpreadable: symbol; /** * A method that returns the default iterator for an object. Called by the semantics of the * for-of statement. */ - iterator: symbol; + readonly iterator: symbol; /** * A regular expression method that matches the regular expression against a string. Called * by the String.prototype.match method. */ - match: symbol; + readonly match: symbol; /** * A regular expression method that replaces matched substrings of a string. Called by the * String.prototype.replace method. */ - replace: symbol; + readonly replace: symbol; /** * A regular expression method that returns the index within a string that matches the * regular expression. Called by the String.prototype.search method. */ - search: symbol; + readonly search: symbol; /** * A function valued property that is the constructor function that is used to create * derived objects. */ - species: symbol; + readonly species: symbol; /** * A regular expression method that splits a string at the indices that match the regular * expression. Called by the String.prototype.split method. */ - split: symbol; + readonly split: symbol; /** * A method that converts an object to a corresponding primitive value. * Called by the ToPrimitive abstract operation. */ - toPrimitive: symbol; + readonly toPrimitive: symbol; /** * A String value that is used in the creation of the default string description of an object. * Called by the built-in method Object.prototype.toString. */ - toStringTag: symbol; + readonly toStringTag: symbol; /** * An Object whose own property names are property names that are excluded from the 'with' * environment bindings of the associated objects. */ - unscopables: symbol; + readonly unscopables: symbol; } declare var Symbol: SymbolConstructor; @@ -200,7 +200,7 @@ interface Function { /** * Returns the name of the function. Function names are read-only and can not be changed. */ - name: string; + readonly name: string; /** * Determines whether the given value inherits from this function if this function was used @@ -218,7 +218,7 @@ interface NumberConstructor { * that is representable as a Number value, which is approximately: * 2.2204460492503130808472633361816 x 10‍−‍16. */ - EPSILON: number; + readonly EPSILON: number; /** * Returns true if passed value is finite. @@ -253,14 +253,14 @@ interface NumberConstructor { * a Number value. * The value of Number.MIN_SAFE_INTEGER is 9007199254740991 2^53 − 1. */ - MAX_SAFE_INTEGER: number; + readonly MAX_SAFE_INTEGER: number; /** * The value of the smallest integer n such that n and n − 1 are both exactly representable as * a Number value. * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)). */ - MIN_SAFE_INTEGER: number; + readonly MIN_SAFE_INTEGER: number; /** * Converts a string to a floating-point number. @@ -565,7 +565,7 @@ interface IterableIterator extends Iterator { } interface GeneratorFunction extends Function { - [Symbol.toStringTag]: "GeneratorFunction"; + readonly [Symbol.toStringTag]: "GeneratorFunction"; } interface GeneratorFunctionConstructor { @@ -575,7 +575,7 @@ interface GeneratorFunctionConstructor { */ new (...args: string[]): GeneratorFunction; (...args: string[]): GeneratorFunction; - prototype: GeneratorFunction; + readonly prototype: GeneratorFunction; } declare var GeneratorFunction: GeneratorFunctionConstructor; @@ -690,7 +690,7 @@ interface Math { */ cbrt(x: number): number; - [Symbol.toStringTag]: "Math"; + readonly [Symbol.toStringTag]: "Math"; } interface Date { @@ -776,19 +776,19 @@ interface RegExp { * * If no flags are set, the value is the empty string. */ - flags: string; + readonly flags: string; /** * Returns a Boolean value indicating the state of the sticky flag (y) used with a regular * expression. Default is false. Read-only. */ - sticky: boolean; + readonly sticky: boolean; /** * Returns a Boolean value indicating the state of the Unicode flag (u) used with a regular * expression. Default is false. Read-only. */ - unicode: boolean; + readonly unicode: boolean; } interface RegExpConstructor { @@ -804,33 +804,34 @@ interface Map { has(key: K): boolean; keys(): IterableIterator; set(key: K, value?: V): Map; - size: number; + readonly size: number; values(): IterableIterator; [Symbol.iterator]():IterableIterator<[K,V]>; - [Symbol.toStringTag]: "Map"; + readonly [Symbol.toStringTag]: "Map"; } interface MapConstructor { new (): Map; new (): Map; new (iterable: Iterable<[K, V]>): Map; - prototype: Map; + readonly prototype: Map; } declare var Map: MapConstructor; interface WeakMap { + clear(): void; delete(key: K): boolean; get(key: K): V; has(key: K): boolean; set(key: K, value?: V): WeakMap; - [Symbol.toStringTag]: "WeakMap"; + readonly [Symbol.toStringTag]: "WeakMap"; } interface WeakMapConstructor { new (): WeakMap; new (): WeakMap; new (iterable: Iterable<[K, V]>): WeakMap; - prototype: WeakMap; + readonly prototype: WeakMap; } declare var WeakMap: WeakMapConstructor; @@ -842,37 +843,38 @@ interface Set { forEach(callbackfn: (value: T, index: T, set: Set) => void, thisArg?: any): void; has(value: T): boolean; keys(): IterableIterator; - size: number; + readonly size: number; values(): IterableIterator; [Symbol.iterator]():IterableIterator; - [Symbol.toStringTag]: "Set"; + readonly [Symbol.toStringTag]: "Set"; } interface SetConstructor { new (): Set; new (): Set; new (iterable: Iterable): Set; - prototype: Set; + readonly prototype: Set; } declare var Set: SetConstructor; interface WeakSet { add(value: T): WeakSet; + clear(): void; delete(value: T): boolean; has(value: T): boolean; - [Symbol.toStringTag]: "WeakSet"; + readonly [Symbol.toStringTag]: "WeakSet"; } interface WeakSetConstructor { new (): WeakSet; new (): WeakSet; new (iterable: Iterable): WeakSet; - prototype: WeakSet; + readonly prototype: WeakSet; } declare var WeakSet: WeakSetConstructor; interface JSON { - [Symbol.toStringTag]: "JSON"; + readonly [Symbol.toStringTag]: "JSON"; } /** @@ -882,11 +884,11 @@ interface JSON { * buffer as needed. */ interface ArrayBuffer { - [Symbol.toStringTag]: "ArrayBuffer"; + readonly [Symbol.toStringTag]: "ArrayBuffer"; } interface DataView { - [Symbol.toStringTag]: "DataView"; + readonly [Symbol.toStringTag]: "DataView"; } /** @@ -907,7 +909,7 @@ interface Int8Array { */ values(): IterableIterator; [Symbol.iterator](): IterableIterator; - [Symbol.toStringTag]: "Int8Array"; + readonly [Symbol.toStringTag]: "Int8Array"; } interface Int8ArrayConstructor { @@ -940,7 +942,7 @@ interface Uint8Array { */ values(): IterableIterator; [Symbol.iterator](): IterableIterator; - [Symbol.toStringTag]: "UInt8Array"; + readonly [Symbol.toStringTag]: "UInt8Array"; } interface Uint8ArrayConstructor { @@ -976,7 +978,7 @@ interface Uint8ClampedArray { values(): IterableIterator; [Symbol.iterator](): IterableIterator; - [Symbol.toStringTag]: "Uint8ClampedArray"; + readonly [Symbol.toStringTag]: "Uint8ClampedArray"; } interface Uint8ClampedArrayConstructor { @@ -1014,7 +1016,7 @@ interface Int16Array { [Symbol.iterator](): IterableIterator; - [Symbol.toStringTag]: "Int16Array"; + readonly [Symbol.toStringTag]: "Int16Array"; } interface Int16ArrayConstructor { @@ -1047,7 +1049,7 @@ interface Uint16Array { */ values(): IterableIterator; [Symbol.iterator](): IterableIterator; - [Symbol.toStringTag]: "Uint16Array"; + readonly [Symbol.toStringTag]: "Uint16Array"; } interface Uint16ArrayConstructor { @@ -1080,7 +1082,7 @@ interface Int32Array { */ values(): IterableIterator; [Symbol.iterator](): IterableIterator; - [Symbol.toStringTag]: "Int32Array"; + readonly [Symbol.toStringTag]: "Int32Array"; } interface Int32ArrayConstructor { @@ -1113,7 +1115,7 @@ interface Uint32Array { */ values(): IterableIterator; [Symbol.iterator](): IterableIterator; - [Symbol.toStringTag]: "Uint32Array"; + readonly [Symbol.toStringTag]: "Uint32Array"; } interface Uint32ArrayConstructor { @@ -1146,7 +1148,7 @@ interface Float32Array { */ values(): IterableIterator; [Symbol.iterator](): IterableIterator; - [Symbol.toStringTag]: "Float32Array"; + readonly [Symbol.toStringTag]: "Float32Array"; } interface Float32ArrayConstructor { @@ -1179,7 +1181,7 @@ interface Float64Array { */ values(): IterableIterator; [Symbol.iterator](): IterableIterator; - [Symbol.toStringTag]: "Float64Array"; + readonly [Symbol.toStringTag]: "Float64Array"; } interface Float64ArrayConstructor { @@ -1256,14 +1258,14 @@ interface Promise { catch(onrejected?: (reason: any) => T | PromiseLike): Promise; catch(onrejected?: (reason: any) => void): Promise; - [Symbol.toStringTag]: "Promise"; + readonly [Symbol.toStringTag]: "Promise"; } interface PromiseConstructor { /** * A reference to the prototype. */ - prototype: Promise; + readonly prototype: Promise; /** * Creates a new Promise. @@ -1325,7 +1327,7 @@ interface PromiseConstructor { */ resolve(): Promise; - [Symbol.species]: Function; + readonly [Symbol.species]: Function; } declare var Promise: PromiseConstructor; From 0b1f0d867ef47d81311452b6f76f197097b16bb5 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sun, 24 Jan 2016 15:44:29 -0800 Subject: [PATCH 069/160] Accepting new baselines --- tests/baselines/reference/redefineArray.errors.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/baselines/reference/redefineArray.errors.txt b/tests/baselines/reference/redefineArray.errors.txt index b0062abff88..82ef91807c2 100644 --- a/tests/baselines/reference/redefineArray.errors.txt +++ b/tests/baselines/reference/redefineArray.errors.txt @@ -1,9 +1,7 @@ -tests/cases/compiler/redefineArray.ts(1,1): error TS2322: Type '(n: number, s: string) => number' is not assignable to type 'ArrayConstructor'. - Property 'isArray' is missing in type '(n: number, s: string) => number'. +tests/cases/compiler/redefineArray.ts(1,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. ==== tests/cases/compiler/redefineArray.ts (1 errors) ==== Array = function (n:number, s:string) {return n;}; ~~~~~ -!!! error TS2322: Type '(n: number, s: string) => number' is not assignable to type 'ArrayConstructor'. -!!! error TS2322: Property 'isArray' is missing in type '(n: number, s: string) => number'. \ No newline at end of file +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. \ No newline at end of file From 88676d680fd8a887b0877b9cb8babf49fd787640 Mon Sep 17 00:00:00 2001 From: york yao Date: Mon, 25 Jan 2016 07:50:22 +0800 Subject: [PATCH 070/160] a better way since languageVersion is a number --- src/compiler/emitter.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index dbde9c14153..f6e70738071 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -6108,7 +6108,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge // import x = require("foo") // import * as x from "foo" if (!isExportedImport) { - if (languageVersion !== ScriptTarget.ES6) { + if (languageVersion <= ScriptTarget.ES5) { write("var "); } else { @@ -6126,7 +6126,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge // import d, { x, y } from "foo" const isNakedImport = SyntaxKind.ImportDeclaration && !(node).importClause; if (!isNakedImport) { - if (languageVersion !== ScriptTarget.ES6) { + if (languageVersion <= ScriptTarget.ES5) { write("var "); } else { @@ -6158,7 +6158,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge } else if (namespaceDeclaration && isDefaultImport(node)) { // import d, * as x from "foo" - if (languageVersion !== ScriptTarget.ES6) { + if (languageVersion <= ScriptTarget.ES5) { write("var "); } else { From 72c3bb6930ca0aa7359079141ffa9976122f00f2 Mon Sep 17 00:00:00 2001 From: york yao Date: Mon, 25 Jan 2016 10:48:23 +0800 Subject: [PATCH 071/160] extract a helper method --- src/compiler/emitter.ts | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index f6e70738071..fac17cd633c 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -6096,6 +6096,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge } } + function emitVar() { + if (languageVersion <= ScriptTarget.ES5) { + write("var "); + } + else { + write("const "); + } + } + function emitExternalImportDeclaration(node: ImportDeclaration | ImportEqualsDeclaration) { if (contains(externalImports, node)) { const isExportedImport = node.kind === SyntaxKind.ImportEqualsDeclaration && (node.flags & NodeFlags.Export) !== 0; @@ -6108,12 +6117,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge // import x = require("foo") // import * as x from "foo" if (!isExportedImport) { - if (languageVersion <= ScriptTarget.ES5) { - write("var "); - } - else { - write("const "); - } + emitVar(); }; emitModuleMemberName(namespaceDeclaration); write(" = "); @@ -6126,12 +6130,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge // import d, { x, y } from "foo" const isNakedImport = SyntaxKind.ImportDeclaration && !(node).importClause; if (!isNakedImport) { - if (languageVersion <= ScriptTarget.ES5) { - write("var "); - } - else { - write("const "); - } + emitVar(); write(getGeneratedNameForNode(node)); write(" = "); } @@ -6158,12 +6157,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge } else if (namespaceDeclaration && isDefaultImport(node)) { // import d, * as x from "foo" - if (languageVersion <= ScriptTarget.ES5) { - write("var "); - } - else { - write("const "); - } + emitVar(); emitModuleMemberName(namespaceDeclaration); write(" = "); write(getGeneratedNameForNode(node)); From d06d66cf5d95785c84b99944c63f9f05fa21a8ef Mon Sep 17 00:00:00 2001 From: york yao Date: Mon, 25 Jan 2016 13:35:12 +0800 Subject: [PATCH 072/160] use a local string rather than a function --- src/compiler/emitter.ts | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index fac17cd633c..8fed6ee42f9 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -6096,19 +6096,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge } } - function emitVar() { - if (languageVersion <= ScriptTarget.ES5) { - write("var "); - } - else { - write("const "); - } - } - function emitExternalImportDeclaration(node: ImportDeclaration | ImportEqualsDeclaration) { if (contains(externalImports, node)) { const isExportedImport = node.kind === SyntaxKind.ImportEqualsDeclaration && (node.flags & NodeFlags.Export) !== 0; const namespaceDeclaration = getNamespaceDeclarationNode(node); + const varOrConst = (languageVersion <= ScriptTarget.ES5) ? "var " : "const "; if (modulekind !== ModuleKind.AMD) { emitLeadingComments(node); @@ -6117,7 +6109,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge // import x = require("foo") // import * as x from "foo" if (!isExportedImport) { - emitVar(); + write(varOrConst); }; emitModuleMemberName(namespaceDeclaration); write(" = "); @@ -6130,7 +6122,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge // import d, { x, y } from "foo" const isNakedImport = SyntaxKind.ImportDeclaration && !(node).importClause; if (!isNakedImport) { - emitVar(); + write(varOrConst); write(getGeneratedNameForNode(node)); write(" = "); } @@ -6157,7 +6149,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge } else if (namespaceDeclaration && isDefaultImport(node)) { // import d, * as x from "foo" - emitVar(); + write(varOrConst); emitModuleMemberName(namespaceDeclaration); write(" = "); write(getGeneratedNameForNode(node)); From 4d3f6e76b8bf4155c78fe849c917c61db40cf3a3 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Mon, 25 Jan 2016 10:32:34 -0800 Subject: [PATCH 073/160] Error for Promise redeclaration in module with async --- src/compiler/checker.ts | 74 ++++++++++++++++--- src/compiler/diagnosticMessages.json | 6 +- src/compiler/emitter.ts | 8 +- .../asyncAliasReturnType_es6.errors.txt | 10 --- .../reference/asyncAliasReturnType_es6.js | 2 +- .../asyncAliasReturnType_es6.symbols | 11 +++ .../reference/asyncAliasReturnType_es6.types | 11 +++ .../reference/asyncArrowFunction1_es6.js | 2 +- .../reference/asyncArrowFunction6_es6.js | 2 +- .../reference/asyncArrowFunction7_es6.js | 4 +- .../reference/asyncArrowFunction8_es6.js | 2 +- ...asyncArrowFunctionCapturesArguments_es6.js | 2 +- .../asyncArrowFunctionCapturesThis_es6.js | 2 +- .../asyncAwaitIsolatedModules_es6.js | 48 ++++++------ tests/baselines/reference/asyncAwait_es6.js | 48 ++++++------ .../asyncFunctionDeclaration11_es6.js | 2 +- .../asyncFunctionDeclaration13_es6.js | 2 +- .../asyncFunctionDeclaration14_es6.js | 2 +- .../asyncFunctionDeclaration15_es6.errors.txt | 17 +---- .../asyncFunctionDeclaration15_es6.js | 38 +++++----- .../asyncFunctionDeclaration1_es6.js | 2 +- .../asyncFunctionDeclaration6_es6.js | 2 +- .../asyncFunctionDeclaration7_es6.js | 4 +- .../asyncFunctionDeclaration9_es6.js | 2 +- .../reference/asyncFunctionsAcrossFiles.js | 8 +- .../reference/asyncImportedPromise_es6.js | 5 +- .../reference/asyncMethodWithSuper_es6.js | 4 +- tests/baselines/reference/asyncMultiFile.js | 4 +- .../reference/asyncQualifiedReturnType_es6.js | 2 +- .../reference/awaitBinaryExpression1_es6.js | 2 +- .../reference/awaitBinaryExpression2_es6.js | 2 +- .../reference/awaitBinaryExpression3_es6.js | 2 +- .../reference/awaitBinaryExpression4_es6.js | 2 +- .../reference/awaitBinaryExpression5_es6.js | 2 +- .../reference/awaitCallExpression1_es6.js | 2 +- .../reference/awaitCallExpression2_es6.js | 2 +- .../reference/awaitCallExpression3_es6.js | 2 +- .../reference/awaitCallExpression4_es6.js | 2 +- .../reference/awaitCallExpression5_es6.js | 2 +- .../reference/awaitCallExpression6_es6.js | 2 +- .../reference/awaitCallExpression7_es6.js | 2 +- .../reference/awaitCallExpression8_es6.js | 2 +- tests/baselines/reference/awaitUnion_es6.js | 2 +- .../reference/reachabilityChecks7.js | 12 +-- 44 files changed, 212 insertions(+), 154 deletions(-) delete mode 100644 tests/baselines/reference/asyncAliasReturnType_es6.errors.txt create mode 100644 tests/baselines/reference/asyncAliasReturnType_es6.symbols create mode 100644 tests/baselines/reference/asyncAliasReturnType_es6.types diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index ca41e509664..b3876b9732d 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -376,8 +376,8 @@ namespace ts { const moduleAugmentation = moduleName.parent; if (moduleAugmentation.symbol.valueDeclaration !== moduleAugmentation) { // this is a combined symbol for multiple augmentations within the same file. - // its symbol already has accumulated information for all declarations - // so we need to add it just once - do the work only for first declaration + // its symbol already has accumulated information for all declarations + // so we need to add it just once - do the work only for first declaration Debug.assert(moduleAugmentation.symbol.declarations.length > 1); return; } @@ -386,7 +386,7 @@ namespace ts { mergeSymbolTable(globals, moduleAugmentation.symbol.exports); } else { - // find a module that about to be augmented + // find a module that about to be augmented let mainModule = resolveExternalModuleNameWorker(moduleName, moduleName, Diagnostics.Invalid_module_name_in_augmentation_module_0_cannot_be_found); if (!mainModule) { return; @@ -810,7 +810,7 @@ namespace ts { } // No static member is present. - // Check if we're in an instance method and look for a relevant instance member. + // Check if we're in an instance method and look for a relevant instance member. if (location === container && !(location.flags & NodeFlags.Static)) { const instanceType = (getDeclaredTypeOfSymbol(classSymbol)).thisType; if (getPropertyOfType(instanceType, name)) { @@ -1161,7 +1161,7 @@ namespace ts { return getMergedSymbol(sourceFile.symbol); } if (moduleNotFoundError) { - // report errors only if it was requested + // report errors only if it was requested error(moduleReferenceLiteral, Diagnostics.File_0_is_not_a_module, sourceFile.fileName); } return undefined; @@ -2471,10 +2471,21 @@ namespace ts { function getDeclarationContainer(node: Node): Node { node = getRootDeclaration(node); + while (node) { + switch (node.kind) { + case SyntaxKind.VariableDeclaration: + case SyntaxKind.VariableDeclarationList: + case SyntaxKind.ImportSpecifier: + case SyntaxKind.NamedImports: + case SyntaxKind.NamespaceImport: + case SyntaxKind.ImportClause: + node = node.parent; + break; - // Parent chain: - // VaribleDeclaration -> VariableDeclarationList -> VariableStatement -> 'Declaration Container' - return node.kind === SyntaxKind.VariableDeclaration ? node.parent.parent.parent : node.parent; + default: + return node.parent; + } + } } function getTypeOfPrototypeProperty(prototype: Symbol): Type { @@ -11359,6 +11370,9 @@ namespace ts { checkTypeAssignableTo(iterableIteratorInstantiation, returnType, node.type); } } + else if (isAsyncFunctionLike(node)) { + checkAsyncFunctionReturnType(node); + } } } @@ -12283,6 +12297,21 @@ namespace ts { return unknownType; } + if (languageVersion >= ScriptTarget.ES6) { + const promisedType = getPromisedType(promiseType); + if (!promisedType) { + error(node, Diagnostics.Type_0_is_not_a_valid_async_function_return_type, typeToString(promiseType)); + return unknownType; + } + + const promiseInstantiation = createPromiseType(promisedType); + if (!checkTypeAssignableTo(promiseInstantiation, promiseType, node.type, Diagnostics.Type_0_is_not_a_valid_async_function_return_type)) { + return unknownType; + } + + return promisedType; + } + const promiseConstructor = getNodeLinks(node.type).resolvedSymbol; if (!promiseConstructor || !symbolIsValue(promiseConstructor)) { const typeName = promiseConstructor @@ -12457,6 +12486,7 @@ namespace ts { checkCollisionWithCapturedSuperVariable(node, node.name); checkCollisionWithCapturedThisVariable(node, node.name); checkCollisionWithRequireExportsInGeneratedCode(node, node.name); + checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name); } } @@ -12641,6 +12671,25 @@ namespace ts { } } + function checkCollisionWithGlobalPromiseInGeneratedCode(node: Node, name: Identifier): void { + if (!needCollisionCheckForIdentifier(node, name, "Promise")) { + return; + } + + // Uninstantiated modules shouldnt do this check + if (node.kind === SyntaxKind.ModuleDeclaration && getModuleInstanceState(node) !== ModuleInstanceState.Instantiated) { + return; + } + + // In case of variable declaration, node.parent is variable statement so look at the variable statement's parent + const parent = getDeclarationContainer(node); + if (parent.kind === SyntaxKind.SourceFile && isExternalOrCommonJsModule(parent) && parent.flags & NodeFlags.HasAsyncFunctions) { + // If the declaration happens to be in external module, report error that require and exports are reserved keywords + error(name, Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions, + declarationNameToString(name), declarationNameToString(name)); + } + } + function checkVarDeclaredNamesNotShadowed(node: VariableDeclaration | BindingElement) { // - ScriptBody : StatementList // It is a Syntax Error if any element of the LexicallyDeclaredNames of StatementList @@ -12819,6 +12868,7 @@ namespace ts { checkCollisionWithCapturedSuperVariable(node, node.name); checkCollisionWithCapturedThisVariable(node, node.name); checkCollisionWithRequireExportsInGeneratedCode(node, node.name); + checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name); } } @@ -13584,6 +13634,7 @@ namespace ts { checkTypeNameIsReserved(node.name, Diagnostics.Class_name_cannot_be_0); checkCollisionWithCapturedThisVariable(node, node.name); checkCollisionWithRequireExportsInGeneratedCode(node, node.name); + checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name); } checkTypeParameters(node.typeParameters); checkExportsOnMergedDeclarations(node); @@ -14090,6 +14141,7 @@ namespace ts { checkTypeNameIsReserved(node.name, Diagnostics.Enum_name_cannot_be_0); checkCollisionWithCapturedThisVariable(node, node.name); checkCollisionWithRequireExportsInGeneratedCode(node, node.name); + checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name); checkExportsOnMergedDeclarations(node); computeEnumMemberValues(node); @@ -14194,6 +14246,7 @@ namespace ts { checkCollisionWithCapturedThisVariable(node, node.name); checkCollisionWithRequireExportsInGeneratedCode(node, node.name); + checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name); checkExportsOnMergedDeclarations(node); const symbol = getSymbolOfNode(node); @@ -14224,10 +14277,10 @@ namespace ts { if (isAmbientExternalModule) { if (isExternalModuleAugmentation(node)) { // body of the augmentation should be checked for consistency only if augmentation was applied to its target (either global scope or module) - // otherwise we'll be swamped in cascading errors. + // otherwise we'll be swamped in cascading errors. // We can detect if augmentation was applied using following rules: // - augmentation for a global scope is always applied - // - augmentation for some external module is applied if symbol for augmentation is merged (it was combined with target module). + // - augmentation for some external module is applied if symbol for augmentation is merged (it was combined with target module). const checkBody = isGlobalAugmentation || (getSymbolOfNode(node).flags & SymbolFlags.Merged); if (checkBody) { // body of ambient external module is always a module block @@ -14386,6 +14439,7 @@ namespace ts { function checkImportBinding(node: ImportEqualsDeclaration | ImportClause | NamespaceImport | ImportSpecifier) { checkCollisionWithCapturedThisVariable(node, node.name); checkCollisionWithRequireExportsInGeneratedCode(node, node.name); + checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name); checkAliasSymbol(node); } diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 8fd40f7b421..b8defa6325b 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -794,7 +794,7 @@ "A decorator can only decorate a method implementation, not an overload.": { "category": "Error", "code": 1249 - }, + }, "'with' statements are not allowed in an async function block.": { "category": "Error", "code": 1300 @@ -1687,6 +1687,10 @@ "category": "Error", "code": 2528 }, + "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module containing async functions.": { + "category": "Error", + "code": 2529 + }, "JSX element attributes type '{0}' may not be a union type.": { "category": "Error", "code": 2600 diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 762b491155b..e85b76160c7 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -320,7 +320,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) { const awaiterHelper = ` var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new P(function (resolve, reject) { + return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator.throw(value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } @@ -4541,11 +4541,11 @@ const _super = (function (geti, seti) { write(", void 0, "); } - if (promiseConstructor) { - emitEntityNameAsExpression(promiseConstructor, /*useFallback*/ false); + if (languageVersion >= ScriptTarget.ES6 || !promiseConstructor) { + write("void 0"); } else { - write("Promise"); + emitEntityNameAsExpression(promiseConstructor, /*useFallback*/ false); } // Emit the call to __awaiter. diff --git a/tests/baselines/reference/asyncAliasReturnType_es6.errors.txt b/tests/baselines/reference/asyncAliasReturnType_es6.errors.txt deleted file mode 100644 index ec532d1380d..00000000000 --- a/tests/baselines/reference/asyncAliasReturnType_es6.errors.txt +++ /dev/null @@ -1,10 +0,0 @@ -tests/cases/conformance/async/es6/asyncAliasReturnType_es6.ts(3,16): error TS1055: Type 'PromiseAlias' is not a valid async function return type. - - -==== tests/cases/conformance/async/es6/asyncAliasReturnType_es6.ts (1 errors) ==== - type PromiseAlias = Promise; - - async function f(): PromiseAlias { - ~ -!!! error TS1055: Type 'PromiseAlias' is not a valid async function return type. - } \ No newline at end of file diff --git a/tests/baselines/reference/asyncAliasReturnType_es6.js b/tests/baselines/reference/asyncAliasReturnType_es6.js index 0af63b0bfa6..45fe3228f6e 100644 --- a/tests/baselines/reference/asyncAliasReturnType_es6.js +++ b/tests/baselines/reference/asyncAliasReturnType_es6.js @@ -6,6 +6,6 @@ async function f(): PromiseAlias { //// [asyncAliasReturnType_es6.js] function f() { - return __awaiter(this, void 0, PromiseAlias, function* () { + return __awaiter(this, void 0, void 0, function* () { }); } diff --git a/tests/baselines/reference/asyncAliasReturnType_es6.symbols b/tests/baselines/reference/asyncAliasReturnType_es6.symbols new file mode 100644 index 00000000000..4d6db6a1ef4 --- /dev/null +++ b/tests/baselines/reference/asyncAliasReturnType_es6.symbols @@ -0,0 +1,11 @@ +=== tests/cases/conformance/async/es6/asyncAliasReturnType_es6.ts === +type PromiseAlias = Promise; +>PromiseAlias : Symbol(PromiseAlias, Decl(asyncAliasReturnType_es6.ts, 0, 0)) +>T : Symbol(T, Decl(asyncAliasReturnType_es6.ts, 0, 18)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>T : Symbol(T, Decl(asyncAliasReturnType_es6.ts, 0, 18)) + +async function f(): PromiseAlias { +>f : Symbol(f, Decl(asyncAliasReturnType_es6.ts, 0, 34)) +>PromiseAlias : Symbol(PromiseAlias, Decl(asyncAliasReturnType_es6.ts, 0, 0)) +} diff --git a/tests/baselines/reference/asyncAliasReturnType_es6.types b/tests/baselines/reference/asyncAliasReturnType_es6.types new file mode 100644 index 00000000000..8426d2a3542 --- /dev/null +++ b/tests/baselines/reference/asyncAliasReturnType_es6.types @@ -0,0 +1,11 @@ +=== tests/cases/conformance/async/es6/asyncAliasReturnType_es6.ts === +type PromiseAlias = Promise; +>PromiseAlias : Promise +>T : T +>Promise : Promise +>T : T + +async function f(): PromiseAlias { +>f : () => Promise +>PromiseAlias : Promise +} diff --git a/tests/baselines/reference/asyncArrowFunction1_es6.js b/tests/baselines/reference/asyncArrowFunction1_es6.js index 4f03acc5ced..0026cd91a7e 100644 --- a/tests/baselines/reference/asyncArrowFunction1_es6.js +++ b/tests/baselines/reference/asyncArrowFunction1_es6.js @@ -4,5 +4,5 @@ var foo = async (): Promise => { }; //// [asyncArrowFunction1_es6.js] -var foo = () => __awaiter(this, void 0, Promise, function* () { +var foo = () => __awaiter(this, void 0, void 0, function* () { }); diff --git a/tests/baselines/reference/asyncArrowFunction6_es6.js b/tests/baselines/reference/asyncArrowFunction6_es6.js index 54b8aa1f6b1..a01e53f5b11 100644 --- a/tests/baselines/reference/asyncArrowFunction6_es6.js +++ b/tests/baselines/reference/asyncArrowFunction6_es6.js @@ -4,5 +4,5 @@ var foo = async (a = await): Promise => { } //// [asyncArrowFunction6_es6.js] -var foo = (a = yield ) => __awaiter(this, void 0, Promise, function* () { +var foo = (a = yield ) => __awaiter(this, void 0, void 0, function* () { }); diff --git a/tests/baselines/reference/asyncArrowFunction7_es6.js b/tests/baselines/reference/asyncArrowFunction7_es6.js index ac68a8fd2f8..fab705c0b76 100644 --- a/tests/baselines/reference/asyncArrowFunction7_es6.js +++ b/tests/baselines/reference/asyncArrowFunction7_es6.js @@ -7,8 +7,8 @@ var bar = async (): Promise => { } //// [asyncArrowFunction7_es6.js] -var bar = () => __awaiter(this, void 0, Promise, function* () { +var bar = () => __awaiter(this, void 0, void 0, function* () { // 'await' here is an identifier, and not an await expression. - var foo = (a = yield ) => __awaiter(this, void 0, Promise, function* () { + var foo = (a = yield ) => __awaiter(this, void 0, void 0, function* () { }); }); diff --git a/tests/baselines/reference/asyncArrowFunction8_es6.js b/tests/baselines/reference/asyncArrowFunction8_es6.js index 9cee5ee1525..0c33cfcfa2d 100644 --- a/tests/baselines/reference/asyncArrowFunction8_es6.js +++ b/tests/baselines/reference/asyncArrowFunction8_es6.js @@ -5,6 +5,6 @@ var foo = async (): Promise => { } //// [asyncArrowFunction8_es6.js] -var foo = () => __awaiter(this, void 0, Promise, function* () { +var foo = () => __awaiter(this, void 0, void 0, function* () { var v = { [yield ]: foo }; }); diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.js b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.js index fdaa365836d..ca79eed6c8e 100644 --- a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.js +++ b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.js @@ -11,6 +11,6 @@ class C { class C { method() { function other() { } - var fn = () => __awaiter(this, arguments, Promise, function* () { return yield other.apply(this, arguments); }); + var fn = () => __awaiter(this, arguments, void 0, function* () { return yield other.apply(this, arguments); }); } } diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.js b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.js index 0f09e366ef3..de7eb23ed78 100644 --- a/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.js +++ b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.js @@ -9,6 +9,6 @@ class C { //// [asyncArrowFunctionCapturesThis_es6.js] class C { method() { - var fn = () => __awaiter(this, void 0, Promise, function* () { return yield this; }); + var fn = () => __awaiter(this, void 0, void 0, function* () { return yield this; }); } } diff --git a/tests/baselines/reference/asyncAwaitIsolatedModules_es6.js b/tests/baselines/reference/asyncAwaitIsolatedModules_es6.js index 213ecfd53a6..4022fde7f54 100644 --- a/tests/baselines/reference/asyncAwaitIsolatedModules_es6.js +++ b/tests/baselines/reference/asyncAwaitIsolatedModules_es6.js @@ -41,7 +41,7 @@ module M { //// [asyncAwaitIsolatedModules_es6.js] var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new P(function (resolve, reject) { + return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator.throw(value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } @@ -49,65 +49,65 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; function f0() { - return __awaiter(this, void 0, Promise, function* () { }); + return __awaiter(this, void 0, void 0, function* () { }); } function f1() { - return __awaiter(this, void 0, Promise, function* () { }); + return __awaiter(this, void 0, void 0, function* () { }); } function f3() { - return __awaiter(this, void 0, MyPromise, function* () { }); + return __awaiter(this, void 0, void 0, function* () { }); } let f4 = function () { - return __awaiter(this, void 0, Promise, function* () { }); + return __awaiter(this, void 0, void 0, function* () { }); }; let f5 = function () { - return __awaiter(this, void 0, Promise, function* () { }); + return __awaiter(this, void 0, void 0, function* () { }); }; let f6 = function () { - return __awaiter(this, void 0, MyPromise, function* () { }); + return __awaiter(this, void 0, void 0, function* () { }); }; -let f7 = () => __awaiter(this, void 0, Promise, function* () { }); -let f8 = () => __awaiter(this, void 0, Promise, function* () { }); -let f9 = () => __awaiter(this, void 0, MyPromise, function* () { }); -let f10 = () => __awaiter(this, void 0, Promise, function* () { return p; }); -let f11 = () => __awaiter(this, void 0, Promise, function* () { return mp; }); -let f12 = () => __awaiter(this, void 0, Promise, function* () { return mp; }); -let f13 = () => __awaiter(this, void 0, MyPromise, function* () { return p; }); +let f7 = () => __awaiter(this, void 0, void 0, function* () { }); +let f8 = () => __awaiter(this, void 0, void 0, function* () { }); +let f9 = () => __awaiter(this, void 0, void 0, function* () { }); +let f10 = () => __awaiter(this, void 0, void 0, function* () { return p; }); +let f11 = () => __awaiter(this, void 0, void 0, function* () { return mp; }); +let f12 = () => __awaiter(this, void 0, void 0, function* () { return mp; }); +let f13 = () => __awaiter(this, void 0, void 0, function* () { return p; }); let o = { m1() { - return __awaiter(this, void 0, Promise, function* () { }); + return __awaiter(this, void 0, void 0, function* () { }); }, m2() { - return __awaiter(this, void 0, Promise, function* () { }); + return __awaiter(this, void 0, void 0, function* () { }); }, m3() { - return __awaiter(this, void 0, MyPromise, function* () { }); + return __awaiter(this, void 0, void 0, function* () { }); } }; class C { m1() { - return __awaiter(this, void 0, Promise, function* () { }); + return __awaiter(this, void 0, void 0, function* () { }); } m2() { - return __awaiter(this, void 0, Promise, function* () { }); + return __awaiter(this, void 0, void 0, function* () { }); } m3() { - return __awaiter(this, void 0, MyPromise, function* () { }); + return __awaiter(this, void 0, void 0, function* () { }); } static m4() { - return __awaiter(this, void 0, Promise, function* () { }); + return __awaiter(this, void 0, void 0, function* () { }); } static m5() { - return __awaiter(this, void 0, Promise, function* () { }); + return __awaiter(this, void 0, void 0, function* () { }); } static m6() { - return __awaiter(this, void 0, MyPromise, function* () { }); + return __awaiter(this, void 0, void 0, function* () { }); } } var M; (function (M) { function f1() { - return __awaiter(this, void 0, Promise, function* () { }); + return __awaiter(this, void 0, void 0, function* () { }); } M.f1 = f1; })(M || (M = {})); diff --git a/tests/baselines/reference/asyncAwait_es6.js b/tests/baselines/reference/asyncAwait_es6.js index 14dfc7fc9aa..be2eb90e3e4 100644 --- a/tests/baselines/reference/asyncAwait_es6.js +++ b/tests/baselines/reference/asyncAwait_es6.js @@ -41,7 +41,7 @@ module M { //// [asyncAwait_es6.js] var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new P(function (resolve, reject) { + return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator.throw(value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } @@ -49,65 +49,65 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; function f0() { - return __awaiter(this, void 0, Promise, function* () { }); + return __awaiter(this, void 0, void 0, function* () { }); } function f1() { - return __awaiter(this, void 0, Promise, function* () { }); + return __awaiter(this, void 0, void 0, function* () { }); } function f3() { - return __awaiter(this, void 0, MyPromise, function* () { }); + return __awaiter(this, void 0, void 0, function* () { }); } let f4 = function () { - return __awaiter(this, void 0, Promise, function* () { }); + return __awaiter(this, void 0, void 0, function* () { }); }; let f5 = function () { - return __awaiter(this, void 0, Promise, function* () { }); + return __awaiter(this, void 0, void 0, function* () { }); }; let f6 = function () { - return __awaiter(this, void 0, MyPromise, function* () { }); + return __awaiter(this, void 0, void 0, function* () { }); }; -let f7 = () => __awaiter(this, void 0, Promise, function* () { }); -let f8 = () => __awaiter(this, void 0, Promise, function* () { }); -let f9 = () => __awaiter(this, void 0, MyPromise, function* () { }); -let f10 = () => __awaiter(this, void 0, Promise, function* () { return p; }); -let f11 = () => __awaiter(this, void 0, Promise, function* () { return mp; }); -let f12 = () => __awaiter(this, void 0, Promise, function* () { return mp; }); -let f13 = () => __awaiter(this, void 0, MyPromise, function* () { return p; }); +let f7 = () => __awaiter(this, void 0, void 0, function* () { }); +let f8 = () => __awaiter(this, void 0, void 0, function* () { }); +let f9 = () => __awaiter(this, void 0, void 0, function* () { }); +let f10 = () => __awaiter(this, void 0, void 0, function* () { return p; }); +let f11 = () => __awaiter(this, void 0, void 0, function* () { return mp; }); +let f12 = () => __awaiter(this, void 0, void 0, function* () { return mp; }); +let f13 = () => __awaiter(this, void 0, void 0, function* () { return p; }); let o = { m1() { - return __awaiter(this, void 0, Promise, function* () { }); + return __awaiter(this, void 0, void 0, function* () { }); }, m2() { - return __awaiter(this, void 0, Promise, function* () { }); + return __awaiter(this, void 0, void 0, function* () { }); }, m3() { - return __awaiter(this, void 0, MyPromise, function* () { }); + return __awaiter(this, void 0, void 0, function* () { }); } }; class C { m1() { - return __awaiter(this, void 0, Promise, function* () { }); + return __awaiter(this, void 0, void 0, function* () { }); } m2() { - return __awaiter(this, void 0, Promise, function* () { }); + return __awaiter(this, void 0, void 0, function* () { }); } m3() { - return __awaiter(this, void 0, MyPromise, function* () { }); + return __awaiter(this, void 0, void 0, function* () { }); } static m4() { - return __awaiter(this, void 0, Promise, function* () { }); + return __awaiter(this, void 0, void 0, function* () { }); } static m5() { - return __awaiter(this, void 0, Promise, function* () { }); + return __awaiter(this, void 0, void 0, function* () { }); } static m6() { - return __awaiter(this, void 0, MyPromise, function* () { }); + return __awaiter(this, void 0, void 0, function* () { }); } } var M; (function (M) { function f1() { - return __awaiter(this, void 0, Promise, function* () { }); + return __awaiter(this, void 0, void 0, function* () { }); } M.f1 = f1; })(M || (M = {})); diff --git a/tests/baselines/reference/asyncFunctionDeclaration11_es6.js b/tests/baselines/reference/asyncFunctionDeclaration11_es6.js index a44343cef78..6fe8921434c 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration11_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration11_es6.js @@ -4,6 +4,6 @@ async function await(): Promise { //// [asyncFunctionDeclaration11_es6.js] function await() { - return __awaiter(this, void 0, Promise, function* () { + return __awaiter(this, void 0, void 0, function* () { }); } diff --git a/tests/baselines/reference/asyncFunctionDeclaration13_es6.js b/tests/baselines/reference/asyncFunctionDeclaration13_es6.js index 4257c8691c2..6fab6c39947 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration13_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration13_es6.js @@ -7,7 +7,7 @@ async function foo(): Promise { //// [asyncFunctionDeclaration13_es6.js] function foo() { - return __awaiter(this, void 0, Promise, function* () { + return __awaiter(this, void 0, void 0, function* () { // Legal to use 'await' in a type context. var v; }); diff --git a/tests/baselines/reference/asyncFunctionDeclaration14_es6.js b/tests/baselines/reference/asyncFunctionDeclaration14_es6.js index f32d106f92e..f584f917842 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration14_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration14_es6.js @@ -5,7 +5,7 @@ async function foo(): Promise { //// [asyncFunctionDeclaration14_es6.js] function foo() { - return __awaiter(this, void 0, Promise, function* () { + return __awaiter(this, void 0, void 0, function* () { return; }); } diff --git a/tests/baselines/reference/asyncFunctionDeclaration15_es6.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration15_es6.errors.txt index bc1ef24127a..d014f9eecf3 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration15_es6.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration15_es6.errors.txt @@ -1,17 +1,12 @@ tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(6,16): error TS1055: Type '{}' is not a valid async function return type. tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(7,16): error TS1055: Type 'any' is not a valid async function return type. tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(8,16): error TS1055: Type 'number' is not a valid async function return type. -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(9,16): error TS1055: Type 'PromiseLike' is not a valid async function return type. -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(10,16): error TS1055: Type 'typeof Thenable' is not a valid async function return type. - Type 'Thenable' is not assignable to type 'PromiseLike'. - Types of property 'then' are incompatible. - Type '() => void' is not assignable to type '{ (onfulfilled?: (value: any) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): PromiseLike; (onfulfilled?: (value: any) => TResult | PromiseLike, onrejected?: (reason: any) => void): PromiseLike; }'. - Type 'void' is not assignable to type 'PromiseLike'. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(10,16): error TS1055: Type 'Thenable' is not a valid async function return type. tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(17,16): error TS1059: Return expression in async function does not have a valid callable 'then' member. tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(23,25): error TS1058: Operand for 'await' does not have a valid callable 'then' member. -==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts (7 errors) ==== +==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts (6 errors) ==== declare class Thenable { then(): void; } declare let a: any; declare let obj: { then: string; }; @@ -27,15 +22,9 @@ tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration1 ~~~ !!! error TS1055: Type 'number' is not a valid async function return type. async function fn5(): PromiseLike { } // error - ~~~ -!!! error TS1055: Type 'PromiseLike' is not a valid async function return type. async function fn6(): Thenable { } // error ~~~ -!!! error TS1055: Type 'typeof Thenable' is not a valid async function return type. -!!! error TS1055: Type 'Thenable' is not assignable to type 'PromiseLike'. -!!! error TS1055: Types of property 'then' are incompatible. -!!! error TS1055: Type '() => void' is not assignable to type '{ (onfulfilled?: (value: any) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): PromiseLike; (onfulfilled?: (value: any) => TResult | PromiseLike, onrejected?: (reason: any) => void): PromiseLike; }'. -!!! error TS1055: Type 'void' is not assignable to type 'PromiseLike'. +!!! error TS1055: Type 'Thenable' is not a valid async function return type. async function fn7() { return; } // valid: Promise async function fn8() { return 1; } // valid: Promise async function fn9() { return null; } // valid: Promise diff --git a/tests/baselines/reference/asyncFunctionDeclaration15_es6.js b/tests/baselines/reference/asyncFunctionDeclaration15_es6.js index c72062e24b2..174a95d6f66 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration15_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration15_es6.js @@ -26,59 +26,59 @@ async function fn19() { await thenable; } // error //// [asyncFunctionDeclaration15_es6.js] function fn1() { - return __awaiter(this, void 0, Promise, function* () { }); + return __awaiter(this, void 0, void 0, function* () { }); } // valid: Promise function fn2() { - return __awaiter(this, void 0, Promise, function* () { }); + return __awaiter(this, void 0, void 0, function* () { }); } // error function fn3() { - return __awaiter(this, void 0, Promise, function* () { }); + return __awaiter(this, void 0, void 0, function* () { }); } // error function fn4() { - return __awaiter(this, void 0, Promise, function* () { }); + return __awaiter(this, void 0, void 0, function* () { }); } // error function fn5() { - return __awaiter(this, void 0, PromiseLike, function* () { }); + return __awaiter(this, void 0, void 0, function* () { }); } // error function fn6() { - return __awaiter(this, void 0, Thenable, function* () { }); + return __awaiter(this, void 0, void 0, function* () { }); } // error function fn7() { - return __awaiter(this, void 0, Promise, function* () { return; }); + return __awaiter(this, void 0, void 0, function* () { return; }); } // valid: Promise function fn8() { - return __awaiter(this, void 0, Promise, function* () { return 1; }); + return __awaiter(this, void 0, void 0, function* () { return 1; }); } // valid: Promise function fn9() { - return __awaiter(this, void 0, Promise, function* () { return null; }); + return __awaiter(this, void 0, void 0, function* () { return null; }); } // valid: Promise function fn10() { - return __awaiter(this, void 0, Promise, function* () { return undefined; }); + return __awaiter(this, void 0, void 0, function* () { return undefined; }); } // valid: Promise function fn11() { - return __awaiter(this, void 0, Promise, function* () { return a; }); + return __awaiter(this, void 0, void 0, function* () { return a; }); } // valid: Promise function fn12() { - return __awaiter(this, void 0, Promise, function* () { return obj; }); + return __awaiter(this, void 0, void 0, function* () { return obj; }); } // valid: Promise<{ then: string; }> function fn13() { - return __awaiter(this, void 0, Promise, function* () { return thenable; }); + return __awaiter(this, void 0, void 0, function* () { return thenable; }); } // error function fn14() { - return __awaiter(this, void 0, Promise, function* () { yield 1; }); + return __awaiter(this, void 0, void 0, function* () { yield 1; }); } // valid: Promise function fn15() { - return __awaiter(this, void 0, Promise, function* () { yield null; }); + return __awaiter(this, void 0, void 0, function* () { yield null; }); } // valid: Promise function fn16() { - return __awaiter(this, void 0, Promise, function* () { yield undefined; }); + return __awaiter(this, void 0, void 0, function* () { yield undefined; }); } // valid: Promise function fn17() { - return __awaiter(this, void 0, Promise, function* () { yield a; }); + return __awaiter(this, void 0, void 0, function* () { yield a; }); } // valid: Promise function fn18() { - return __awaiter(this, void 0, Promise, function* () { yield obj; }); + return __awaiter(this, void 0, void 0, function* () { yield obj; }); } // valid: Promise function fn19() { - return __awaiter(this, void 0, Promise, function* () { yield thenable; }); + return __awaiter(this, void 0, void 0, function* () { yield thenable; }); } // error diff --git a/tests/baselines/reference/asyncFunctionDeclaration1_es6.js b/tests/baselines/reference/asyncFunctionDeclaration1_es6.js index 263e27fa35e..e92d55dc0e2 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration1_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration1_es6.js @@ -4,6 +4,6 @@ async function foo(): Promise { //// [asyncFunctionDeclaration1_es6.js] function foo() { - return __awaiter(this, void 0, Promise, function* () { + return __awaiter(this, void 0, void 0, function* () { }); } diff --git a/tests/baselines/reference/asyncFunctionDeclaration6_es6.js b/tests/baselines/reference/asyncFunctionDeclaration6_es6.js index 8c37968ab4c..a70316989b3 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration6_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration6_es6.js @@ -4,6 +4,6 @@ async function foo(a = await): Promise { //// [asyncFunctionDeclaration6_es6.js] function foo(a = yield ) { - return __awaiter(this, void 0, Promise, function* () { + return __awaiter(this, void 0, void 0, function* () { }); } diff --git a/tests/baselines/reference/asyncFunctionDeclaration7_es6.js b/tests/baselines/reference/asyncFunctionDeclaration7_es6.js index ef66df4e413..0d360fa866c 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration7_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration7_es6.js @@ -7,10 +7,10 @@ async function bar(): Promise { //// [asyncFunctionDeclaration7_es6.js] function bar() { - return __awaiter(this, void 0, Promise, function* () { + return __awaiter(this, void 0, void 0, function* () { // 'await' here is an identifier, and not a yield expression. function foo(a = yield ) { - return __awaiter(this, void 0, Promise, function* () { + return __awaiter(this, void 0, void 0, function* () { }); } }); diff --git a/tests/baselines/reference/asyncFunctionDeclaration9_es6.js b/tests/baselines/reference/asyncFunctionDeclaration9_es6.js index 9723a69f2a2..c57c0eb395a 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration9_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration9_es6.js @@ -5,7 +5,7 @@ async function foo(): Promise { //// [asyncFunctionDeclaration9_es6.js] function foo() { - return __awaiter(this, void 0, Promise, function* () { + return __awaiter(this, void 0, void 0, function* () { var v = { [yield ]: foo }; }); } diff --git a/tests/baselines/reference/asyncFunctionsAcrossFiles.js b/tests/baselines/reference/asyncFunctionsAcrossFiles.js index 7e8a58205e2..94ccff2358c 100644 --- a/tests/baselines/reference/asyncFunctionsAcrossFiles.js +++ b/tests/baselines/reference/asyncFunctionsAcrossFiles.js @@ -17,7 +17,7 @@ export const b = { //// [b.js] var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new P(function (resolve, reject) { + return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator.throw(value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } @@ -26,13 +26,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; import { a } from './a'; export const b = { - f: () => __awaiter(this, void 0, Promise, function* () { + f: () => __awaiter(this, void 0, void 0, function* () { yield a.f(); }) }; //// [a.js] var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new P(function (resolve, reject) { + return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator.throw(value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } @@ -41,7 +41,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; import { b } from './b'; export const a = { - f: () => __awaiter(this, void 0, Promise, function* () { + f: () => __awaiter(this, void 0, void 0, function* () { yield b.f(); }) }; diff --git a/tests/baselines/reference/asyncImportedPromise_es6.js b/tests/baselines/reference/asyncImportedPromise_es6.js index dd64c797931..56a41b0283f 100644 --- a/tests/baselines/reference/asyncImportedPromise_es6.js +++ b/tests/baselines/reference/asyncImportedPromise_es6.js @@ -17,16 +17,15 @@ exports.Task = Task; //// [test.js] "use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new P(function (resolve, reject) { + return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator.throw(value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments)).next()); }); }; -var task_1 = require("./task"); class Test { example() { - return __awaiter(this, void 0, task_1.Task, function* () { return; }); + return __awaiter(this, void 0, void 0, function* () { return; }); } } diff --git a/tests/baselines/reference/asyncMethodWithSuper_es6.js b/tests/baselines/reference/asyncMethodWithSuper_es6.js index 74d4de79881..eacb0a882b2 100644 --- a/tests/baselines/reference/asyncMethodWithSuper_es6.js +++ b/tests/baselines/reference/asyncMethodWithSuper_es6.js @@ -59,7 +59,7 @@ class B extends A { // async method with only call/get on 'super' does not require a binding simple() { const _super = name => super[name]; - return __awaiter(this, void 0, Promise, function* () { + return __awaiter(this, void 0, void 0, function* () { // call with property access _super("x").call(this); // call with element access @@ -76,7 +76,7 @@ class B extends A { const cache = Object.create(null); return name => cache[name] || (cache[name] = { get value() { return geti(name); }, set value(v) { seti(name, v); } }); })(name => super[name], (name, value) => super[name] = value); - return __awaiter(this, void 0, Promise, function* () { + return __awaiter(this, void 0, void 0, function* () { const f = () => { }; // call with property access _super("x").value.call(this); diff --git a/tests/baselines/reference/asyncMultiFile.js b/tests/baselines/reference/asyncMultiFile.js index 6229c29f02c..cbf3445ecc9 100644 --- a/tests/baselines/reference/asyncMultiFile.js +++ b/tests/baselines/reference/asyncMultiFile.js @@ -7,7 +7,7 @@ function g() { } //// [a.js] var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new P(function (resolve, reject) { + return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator.throw(value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } @@ -15,7 +15,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; function f() { - return __awaiter(this, void 0, Promise, function* () { }); + return __awaiter(this, void 0, void 0, function* () { }); } //// [b.js] function g() { } diff --git a/tests/baselines/reference/asyncQualifiedReturnType_es6.js b/tests/baselines/reference/asyncQualifiedReturnType_es6.js index 1da37946254..4d5aa87bbff 100644 --- a/tests/baselines/reference/asyncQualifiedReturnType_es6.js +++ b/tests/baselines/reference/asyncQualifiedReturnType_es6.js @@ -15,6 +15,6 @@ var X; X.MyPromise = MyPromise; })(X || (X = {})); function f() { - return __awaiter(this, void 0, X.MyPromise, function* () { + return __awaiter(this, void 0, void 0, function* () { }); } diff --git a/tests/baselines/reference/awaitBinaryExpression1_es6.js b/tests/baselines/reference/awaitBinaryExpression1_es6.js index 8deb771f5ab..a19e94353d5 100644 --- a/tests/baselines/reference/awaitBinaryExpression1_es6.js +++ b/tests/baselines/reference/awaitBinaryExpression1_es6.js @@ -9,7 +9,7 @@ async function func(): Promise { //// [awaitBinaryExpression1_es6.js] function func() { - return __awaiter(this, void 0, Promise, function* () { + return __awaiter(this, void 0, void 0, function* () { "before"; var b = (yield p) || a; "after"; diff --git a/tests/baselines/reference/awaitBinaryExpression2_es6.js b/tests/baselines/reference/awaitBinaryExpression2_es6.js index 506af50a0ef..7fb1a70446b 100644 --- a/tests/baselines/reference/awaitBinaryExpression2_es6.js +++ b/tests/baselines/reference/awaitBinaryExpression2_es6.js @@ -9,7 +9,7 @@ async function func(): Promise { //// [awaitBinaryExpression2_es6.js] function func() { - return __awaiter(this, void 0, Promise, function* () { + return __awaiter(this, void 0, void 0, function* () { "before"; var b = (yield p) && a; "after"; diff --git a/tests/baselines/reference/awaitBinaryExpression3_es6.js b/tests/baselines/reference/awaitBinaryExpression3_es6.js index 4b298d7b947..f845ce12421 100644 --- a/tests/baselines/reference/awaitBinaryExpression3_es6.js +++ b/tests/baselines/reference/awaitBinaryExpression3_es6.js @@ -9,7 +9,7 @@ async function func(): Promise { //// [awaitBinaryExpression3_es6.js] function func() { - return __awaiter(this, void 0, Promise, function* () { + return __awaiter(this, void 0, void 0, function* () { "before"; var b = (yield p) + a; "after"; diff --git a/tests/baselines/reference/awaitBinaryExpression4_es6.js b/tests/baselines/reference/awaitBinaryExpression4_es6.js index 4d313588984..b6e14c82487 100644 --- a/tests/baselines/reference/awaitBinaryExpression4_es6.js +++ b/tests/baselines/reference/awaitBinaryExpression4_es6.js @@ -9,7 +9,7 @@ async function func(): Promise { //// [awaitBinaryExpression4_es6.js] function func() { - return __awaiter(this, void 0, Promise, function* () { + return __awaiter(this, void 0, void 0, function* () { "before"; var b = yield p, a; "after"; diff --git a/tests/baselines/reference/awaitBinaryExpression5_es6.js b/tests/baselines/reference/awaitBinaryExpression5_es6.js index 01d6c50f6f0..65a5bbfee77 100644 --- a/tests/baselines/reference/awaitBinaryExpression5_es6.js +++ b/tests/baselines/reference/awaitBinaryExpression5_es6.js @@ -10,7 +10,7 @@ async function func(): Promise { //// [awaitBinaryExpression5_es6.js] function func() { - return __awaiter(this, void 0, Promise, function* () { + return __awaiter(this, void 0, void 0, function* () { "before"; var o; o.a = yield p; diff --git a/tests/baselines/reference/awaitCallExpression1_es6.js b/tests/baselines/reference/awaitCallExpression1_es6.js index f9dad87a8b6..aeeb598e3bf 100644 --- a/tests/baselines/reference/awaitCallExpression1_es6.js +++ b/tests/baselines/reference/awaitCallExpression1_es6.js @@ -13,7 +13,7 @@ async function func(): Promise { //// [awaitCallExpression1_es6.js] function func() { - return __awaiter(this, void 0, Promise, function* () { + return __awaiter(this, void 0, void 0, function* () { "before"; var b = fn(a, a, a); "after"; diff --git a/tests/baselines/reference/awaitCallExpression2_es6.js b/tests/baselines/reference/awaitCallExpression2_es6.js index 87d99cd0793..b41735275a8 100644 --- a/tests/baselines/reference/awaitCallExpression2_es6.js +++ b/tests/baselines/reference/awaitCallExpression2_es6.js @@ -13,7 +13,7 @@ async function func(): Promise { //// [awaitCallExpression2_es6.js] function func() { - return __awaiter(this, void 0, Promise, function* () { + return __awaiter(this, void 0, void 0, function* () { "before"; var b = fn(yield p, a, a); "after"; diff --git a/tests/baselines/reference/awaitCallExpression3_es6.js b/tests/baselines/reference/awaitCallExpression3_es6.js index f397d83c3a1..74dee3e7e42 100644 --- a/tests/baselines/reference/awaitCallExpression3_es6.js +++ b/tests/baselines/reference/awaitCallExpression3_es6.js @@ -13,7 +13,7 @@ async function func(): Promise { //// [awaitCallExpression3_es6.js] function func() { - return __awaiter(this, void 0, Promise, function* () { + return __awaiter(this, void 0, void 0, function* () { "before"; var b = fn(a, yield p, a); "after"; diff --git a/tests/baselines/reference/awaitCallExpression4_es6.js b/tests/baselines/reference/awaitCallExpression4_es6.js index d8824d7e7a0..682a1776ac5 100644 --- a/tests/baselines/reference/awaitCallExpression4_es6.js +++ b/tests/baselines/reference/awaitCallExpression4_es6.js @@ -13,7 +13,7 @@ async function func(): Promise { //// [awaitCallExpression4_es6.js] function func() { - return __awaiter(this, void 0, Promise, function* () { + return __awaiter(this, void 0, void 0, function* () { "before"; var b = (yield pfn)(a, a, a); "after"; diff --git a/tests/baselines/reference/awaitCallExpression5_es6.js b/tests/baselines/reference/awaitCallExpression5_es6.js index f39a633765d..30889b35011 100644 --- a/tests/baselines/reference/awaitCallExpression5_es6.js +++ b/tests/baselines/reference/awaitCallExpression5_es6.js @@ -13,7 +13,7 @@ async function func(): Promise { //// [awaitCallExpression5_es6.js] function func() { - return __awaiter(this, void 0, Promise, function* () { + return __awaiter(this, void 0, void 0, function* () { "before"; var b = o.fn(a, a, a); "after"; diff --git a/tests/baselines/reference/awaitCallExpression6_es6.js b/tests/baselines/reference/awaitCallExpression6_es6.js index de8477fa938..55d86119d64 100644 --- a/tests/baselines/reference/awaitCallExpression6_es6.js +++ b/tests/baselines/reference/awaitCallExpression6_es6.js @@ -13,7 +13,7 @@ async function func(): Promise { //// [awaitCallExpression6_es6.js] function func() { - return __awaiter(this, void 0, Promise, function* () { + return __awaiter(this, void 0, void 0, function* () { "before"; var b = o.fn(yield p, a, a); "after"; diff --git a/tests/baselines/reference/awaitCallExpression7_es6.js b/tests/baselines/reference/awaitCallExpression7_es6.js index 24edc3b9393..df805266ff3 100644 --- a/tests/baselines/reference/awaitCallExpression7_es6.js +++ b/tests/baselines/reference/awaitCallExpression7_es6.js @@ -13,7 +13,7 @@ async function func(): Promise { //// [awaitCallExpression7_es6.js] function func() { - return __awaiter(this, void 0, Promise, function* () { + return __awaiter(this, void 0, void 0, function* () { "before"; var b = o.fn(a, yield p, a); "after"; diff --git a/tests/baselines/reference/awaitCallExpression8_es6.js b/tests/baselines/reference/awaitCallExpression8_es6.js index 8bee6112a7a..8d7bb4b83ce 100644 --- a/tests/baselines/reference/awaitCallExpression8_es6.js +++ b/tests/baselines/reference/awaitCallExpression8_es6.js @@ -13,7 +13,7 @@ async function func(): Promise { //// [awaitCallExpression8_es6.js] function func() { - return __awaiter(this, void 0, Promise, function* () { + return __awaiter(this, void 0, void 0, function* () { "before"; var b = (yield po).fn(a, a, a); "after"; diff --git a/tests/baselines/reference/awaitUnion_es6.js b/tests/baselines/reference/awaitUnion_es6.js index 80c68f811ef..9603454b969 100644 --- a/tests/baselines/reference/awaitUnion_es6.js +++ b/tests/baselines/reference/awaitUnion_es6.js @@ -14,7 +14,7 @@ async function f() { //// [awaitUnion_es6.js] function f() { - return __awaiter(this, void 0, Promise, function* () { + return __awaiter(this, void 0, void 0, function* () { let await_a = yield a; let await_b = yield b; let await_c = yield c; diff --git a/tests/baselines/reference/reachabilityChecks7.js b/tests/baselines/reference/reachabilityChecks7.js index 75338742700..0a6b5b0dac7 100644 --- a/tests/baselines/reference/reachabilityChecks7.js +++ b/tests/baselines/reference/reachabilityChecks7.js @@ -32,7 +32,7 @@ let x1 = () => { use("Test"); } //// [reachabilityChecks7.js] var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new P(function (resolve, reject) { + return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator.throw(value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } @@ -41,26 +41,26 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; // async function without return type annotation - error function f1() { - return __awaiter(this, void 0, Promise, function* () { + return __awaiter(this, void 0, void 0, function* () { }); } let x = function () { - return __awaiter(this, void 0, Promise, function* () { + return __awaiter(this, void 0, void 0, function* () { }); }; // async function with which promised type is void - return can be omitted function f2() { - return __awaiter(this, void 0, Promise, function* () { + return __awaiter(this, void 0, void 0, function* () { }); } function f3(x) { - return __awaiter(this, void 0, Promise, function* () { + return __awaiter(this, void 0, void 0, function* () { if (x) return 10; }); } function f4() { - return __awaiter(this, void 0, Promise, function* () { + return __awaiter(this, void 0, void 0, function* () { }); } function voidFunc() { From 77d174a3143eb65a289420f4850938cf9a7ff2c7 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Mon, 25 Jan 2016 11:46:23 -0800 Subject: [PATCH 074/160] Adding tests --- tests/cases/compiler/readonlyMembers.ts | 67 +++++++++++++++++++ .../importsImplicitlyReadonly.ts | 21 ++++++ 2 files changed, 88 insertions(+) create mode 100644 tests/cases/compiler/readonlyMembers.ts create mode 100644 tests/cases/conformance/externalModules/importsImplicitlyReadonly.ts diff --git a/tests/cases/compiler/readonlyMembers.ts b/tests/cases/compiler/readonlyMembers.ts new file mode 100644 index 00000000000..f24b3657727 --- /dev/null +++ b/tests/cases/compiler/readonlyMembers.ts @@ -0,0 +1,67 @@ +// @target: es5 + +interface X { + readonly a: number; + readonly b?: number; +} +var x: X = { a: 0 }; +x.a = 1; // Error +x.b = 1; // Error + +class C { + readonly a: number; + readonly b = 1; + get c() { return 1 } + constructor() { + this.a = 1; // Ok + this.b = 1; // Ok + this.c = 1; // Error + const f = () => { + this.a = 1; // Error + this.b = 1; // Error + this.c = 1; // Error + } + } + foo() { + this.a = 1; // Error + this.b = 1; // Error + this.c = 1; // Error + } +} + +var o = { + get a() { return 1 }, + get b() { return 1 }, + set b(value) { } +}; +o.a = 1; // Error +o.b = 1; + +var p: { readonly a: number, b: number } = { a: 1, b: 1 }; +p.a = 1; // Error +p.b = 1; +var q: { a: number, b: number } = p; +q.a = 1; +q.b = 1; + +enum E { + A, B, C +} +E.A = 1; // Error + +namespace N { + export const a = 1; + export let b = 1; + export var c = 1; +} +N.a = 1; // Error +N.b = 1; +N.c = 1; + +let xx: { readonly [x: string]: string }; +let s = xx["foo"]; +xx["foo"] = "abc"; // Error + +let yy: { readonly [x: number]: string, [x: string]: string }; +yy[1] = "abc"; // Error +yy["foo"] = "abc"; \ No newline at end of file diff --git a/tests/cases/conformance/externalModules/importsImplicitlyReadonly.ts b/tests/cases/conformance/externalModules/importsImplicitlyReadonly.ts new file mode 100644 index 00000000000..f527606e576 --- /dev/null +++ b/tests/cases/conformance/externalModules/importsImplicitlyReadonly.ts @@ -0,0 +1,21 @@ +// @module: commonjs + +// @filename: a.ts +export var x = 1; +var y = 1; +export { y }; + +// @filename: b.ts +import { x, y } from "./a"; +import * as a1 from "./a"; +import a2 = require("./a"); +const a3 = a1; + +x = 1; // Error +y = 1; // Error +a1.x = 1; // Error +a1.y = 1; // Error +a2.x = 1; +a2.y = 1; +a3.x = 1; +a3.y = 1; \ No newline at end of file From da107fe4cbce3407664950c0f9636b6a9b9218f6 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Mon, 25 Jan 2016 11:46:32 -0800 Subject: [PATCH 075/160] Accepting new baselines --- .../importsImplicitlyReadonly.errors.txt | 34 +++++ .../reference/importsImplicitlyReadonly.js | 42 ++++++ .../reference/readonlyMembers.errors.txt | 114 +++++++++++++++ tests/baselines/reference/readonlyMembers.js | 132 ++++++++++++++++++ 4 files changed, 322 insertions(+) create mode 100644 tests/baselines/reference/importsImplicitlyReadonly.errors.txt create mode 100644 tests/baselines/reference/importsImplicitlyReadonly.js create mode 100644 tests/baselines/reference/readonlyMembers.errors.txt create mode 100644 tests/baselines/reference/readonlyMembers.js diff --git a/tests/baselines/reference/importsImplicitlyReadonly.errors.txt b/tests/baselines/reference/importsImplicitlyReadonly.errors.txt new file mode 100644 index 00000000000..cc6e1918020 --- /dev/null +++ b/tests/baselines/reference/importsImplicitlyReadonly.errors.txt @@ -0,0 +1,34 @@ +tests/cases/conformance/externalModules/b.ts(6,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/externalModules/b.ts(7,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/externalModules/b.ts(8,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/conformance/externalModules/b.ts(9,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. + + +==== tests/cases/conformance/externalModules/b.ts (4 errors) ==== + import { x, y } from "./a"; + import * as a1 from "./a"; + import a2 = require("./a"); + const a3 = a1; + + x = 1; // Error + ~ +!!! error TS2364: Invalid left-hand side of assignment expression. + y = 1; // Error + ~ +!!! error TS2364: Invalid left-hand side of assignment expression. + a1.x = 1; // Error + ~~~~ +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. + a1.y = 1; // Error + ~~~~ +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. + a2.x = 1; + a2.y = 1; + a3.x = 1; + a3.y = 1; +==== tests/cases/conformance/externalModules/a.ts (0 errors) ==== + + export var x = 1; + var y = 1; + export { y }; + \ No newline at end of file diff --git a/tests/baselines/reference/importsImplicitlyReadonly.js b/tests/baselines/reference/importsImplicitlyReadonly.js new file mode 100644 index 00000000000..4630de598cc --- /dev/null +++ b/tests/baselines/reference/importsImplicitlyReadonly.js @@ -0,0 +1,42 @@ +//// [tests/cases/conformance/externalModules/importsImplicitlyReadonly.ts] //// + +//// [a.ts] + +export var x = 1; +var y = 1; +export { y }; + +//// [b.ts] +import { x, y } from "./a"; +import * as a1 from "./a"; +import a2 = require("./a"); +const a3 = a1; + +x = 1; // Error +y = 1; // Error +a1.x = 1; // Error +a1.y = 1; // Error +a2.x = 1; +a2.y = 1; +a3.x = 1; +a3.y = 1; + +//// [a.js] +"use strict"; +exports.x = 1; +var y = 1; +exports.y = y; +//// [b.js] +"use strict"; +var a_1 = require("./a"); +var a1 = require("./a"); +var a2 = require("./a"); +var a3 = a1; +a_1.x = 1; // Error +a_1.y = 1; // Error +a1.x = 1; // Error +a1.y = 1; // Error +a2.x = 1; +a2.y = 1; +a3.x = 1; +a3.y = 1; diff --git a/tests/baselines/reference/readonlyMembers.errors.txt b/tests/baselines/reference/readonlyMembers.errors.txt new file mode 100644 index 00000000000..7bc10aa3746 --- /dev/null +++ b/tests/baselines/reference/readonlyMembers.errors.txt @@ -0,0 +1,114 @@ +tests/cases/compiler/readonlyMembers.ts(7,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/readonlyMembers.ts(8,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/readonlyMembers.ts(17,9): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/readonlyMembers.ts(19,13): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/readonlyMembers.ts(20,13): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/readonlyMembers.ts(21,13): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/readonlyMembers.ts(25,9): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/readonlyMembers.ts(26,9): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/readonlyMembers.ts(27,9): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/readonlyMembers.ts(36,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/readonlyMembers.ts(40,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/readonlyMembers.ts(49,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/readonlyMembers.ts(56,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/readonlyMembers.ts(62,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. +tests/cases/compiler/readonlyMembers.ts(65,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. + + +==== tests/cases/compiler/readonlyMembers.ts (15 errors) ==== + + interface X { + readonly a: number; + readonly b?: number; + } + var x: X = { a: 0 }; + x.a = 1; // Error + ~~~ +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. + x.b = 1; // Error + ~~~ +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. + + class C { + readonly a: number; + readonly b = 1; + get c() { return 1 } + constructor() { + this.a = 1; // Ok + this.b = 1; // Ok + this.c = 1; // Error + ~~~~~~ +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. + const f = () => { + this.a = 1; // Error + ~~~~~~ +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. + this.b = 1; // Error + ~~~~~~ +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. + this.c = 1; // Error + ~~~~~~ +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. + } + } + foo() { + this.a = 1; // Error + ~~~~~~ +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. + this.b = 1; // Error + ~~~~~~ +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. + this.c = 1; // Error + ~~~~~~ +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. + } + } + + var o = { + get a() { return 1 }, + get b() { return 1 }, + set b(value) { } + }; + o.a = 1; // Error + ~~~ +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. + o.b = 1; + + var p: { readonly a: number, b: number } = { a: 1, b: 1 }; + p.a = 1; // Error + ~~~ +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. + p.b = 1; + var q: { a: number, b: number } = p; + q.a = 1; + q.b = 1; + + enum E { + A, B, C + } + E.A = 1; // Error + ~~~ +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. + + namespace N { + export const a = 1; + export let b = 1; + export var c = 1; + } + N.a = 1; // Error + ~~~ +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. + N.b = 1; + N.c = 1; + + let xx: { readonly [x: string]: string }; + let s = xx["foo"]; + xx["foo"] = "abc"; // Error + ~~~~~~~~~ +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. + + let yy: { readonly [x: number]: string, [x: string]: string }; + yy[1] = "abc"; // Error + ~~~~~ +!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property. + yy["foo"] = "abc"; \ No newline at end of file diff --git a/tests/baselines/reference/readonlyMembers.js b/tests/baselines/reference/readonlyMembers.js new file mode 100644 index 00000000000..899c52d8626 --- /dev/null +++ b/tests/baselines/reference/readonlyMembers.js @@ -0,0 +1,132 @@ +//// [readonlyMembers.ts] + +interface X { + readonly a: number; + readonly b?: number; +} +var x: X = { a: 0 }; +x.a = 1; // Error +x.b = 1; // Error + +class C { + readonly a: number; + readonly b = 1; + get c() { return 1 } + constructor() { + this.a = 1; // Ok + this.b = 1; // Ok + this.c = 1; // Error + const f = () => { + this.a = 1; // Error + this.b = 1; // Error + this.c = 1; // Error + } + } + foo() { + this.a = 1; // Error + this.b = 1; // Error + this.c = 1; // Error + } +} + +var o = { + get a() { return 1 }, + get b() { return 1 }, + set b(value) { } +}; +o.a = 1; // Error +o.b = 1; + +var p: { readonly a: number, b: number } = { a: 1, b: 1 }; +p.a = 1; // Error +p.b = 1; +var q: { a: number, b: number } = p; +q.a = 1; +q.b = 1; + +enum E { + A, B, C +} +E.A = 1; // Error + +namespace N { + export const a = 1; + export let b = 1; + export var c = 1; +} +N.a = 1; // Error +N.b = 1; +N.c = 1; + +let xx: { readonly [x: string]: string }; +let s = xx["foo"]; +xx["foo"] = "abc"; // Error + +let yy: { readonly [x: number]: string, [x: string]: string }; +yy[1] = "abc"; // Error +yy["foo"] = "abc"; + +//// [readonlyMembers.js] +var x = { a: 0 }; +x.a = 1; // Error +x.b = 1; // Error +var C = (function () { + function C() { + var _this = this; + this.b = 1; + this.a = 1; // Ok + this.b = 1; // Ok + this.c = 1; // Error + var f = function () { + _this.a = 1; // Error + _this.b = 1; // Error + _this.c = 1; // Error + }; + } + Object.defineProperty(C.prototype, "c", { + get: function () { return 1; }, + enumerable: true, + configurable: true + }); + C.prototype.foo = function () { + this.a = 1; // Error + this.b = 1; // Error + this.c = 1; // Error + }; + return C; +}()); +var o = { + get a() { return 1; }, + get b() { return 1; }, + set b(value) { } +}; +o.a = 1; // Error +o.b = 1; +var p = { a: 1, b: 1 }; +p.a = 1; // Error +p.b = 1; +var q = p; +q.a = 1; +q.b = 1; +var E; +(function (E) { + E[E["A"] = 0] = "A"; + E[E["B"] = 1] = "B"; + E[E["C"] = 2] = "C"; +})(E || (E = {})); +E.A = 1; // Error +var N; +(function (N) { + N.a = 1; + N.b = 1; + N.c = 1; +})(N || (N = {})); +N.a = 1; // Error +N.b = 1; +N.c = 1; +var xx; +var s = xx["foo"]; +xx["foo"] = "abc"; // Error +var yy; +yy[1] = "abc"; // Error +yy["foo"] = "abc"; From 8a8ed0a8714c837fafd392ba9b23d2830dba69fb Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Mon, 25 Jan 2016 11:49:26 -0800 Subject: [PATCH 076/160] update implementation based on the results of design meeting --- src/compiler/commandLineParser.ts | 4 - src/compiler/diagnosticMessages.json | 98 ++- src/compiler/program.ts | 619 ++++++++---------- src/compiler/types.ts | 5 +- src/harness/compilerRunner.ts | 8 + src/harness/harness.ts | 13 +- src/harness/harnessLanguageService.ts | 3 +- src/services/services.ts | 3 + .../pathMappingBasedModuleResolution1.js | 30 - .../pathMappingBasedModuleResolution1.symbols | 25 - .../pathMappingBasedModuleResolution1.types | 28 - .../pathMappingBasedModuleResolution10.js | 38 -- ...pathMappingBasedModuleResolution10.symbols | 29 - .../pathMappingBasedModuleResolution10.types | 32 - .../pathMappingBasedModuleResolution10_1.js | 38 -- ...thMappingBasedModuleResolution10_1.symbols | 29 - ...pathMappingBasedModuleResolution10_1.types | 32 - .../pathMappingBasedModuleResolution10_2.js | 38 -- ...thMappingBasedModuleResolution10_2.symbols | 29 - ...pathMappingBasedModuleResolution10_2.types | 32 - .../pathMappingBasedModuleResolution11.js | 38 -- ...pathMappingBasedModuleResolution11.symbols | 29 - .../pathMappingBasedModuleResolution11.types | 32 - .../pathMappingBasedModuleResolution1_1.js | 30 - ...athMappingBasedModuleResolution1_1.symbols | 25 - ...gBasedModuleResolution1_classic.errors.txt | 7 + ...thMappingBasedModuleResolution1_classic.js | 9 + ...gBasedModuleResolution1_classic.trace.json | 1 + ...pingBasedModuleResolution1_node.errors.txt | 7 + .../pathMappingBasedModuleResolution1_node.js | 7 + ...pingBasedModuleResolution1_node.trace.json | 1 + .../pathMappingBasedModuleResolution2.js | 26 - .../pathMappingBasedModuleResolution2.symbols | 22 - .../pathMappingBasedModuleResolution2.types | 25 - .../pathMappingBasedModuleResolution2_1.js | 26 - ...BasedModuleResolution2_classic.errors.txt} | 0 ...hMappingBasedModuleResolution2_classic.js} | 0 ...gBasedModuleResolution2_classic.trace.json | 1 + ...pingBasedModuleResolution2_node.errors.txt | 8 + ...pathMappingBasedModuleResolution2_node.js} | 0 ...pingBasedModuleResolution2_node.trace.json | 1 + .../pathMappingBasedModuleResolution3.js | 26 - .../pathMappingBasedModuleResolution3.symbols | 22 - .../pathMappingBasedModuleResolution3.types | 25 - .../pathMappingBasedModuleResolution3_1.js | 26 - ...athMappingBasedModuleResolution3_1.symbols | 22 - .../pathMappingBasedModuleResolution3_1.types | 25 - ...thMappingBasedModuleResolution3_classic.js | 42 ++ ...pingBasedModuleResolution3_classic.symbols | 39 ++ ...gBasedModuleResolution3_classic.trace.json | 27 + ...appingBasedModuleResolution3_classic.types | 44 ++ .../pathMappingBasedModuleResolution3_node.js | 34 + ...MappingBasedModuleResolution3_node.symbols | 39 ++ ...pingBasedModuleResolution3_node.trace.json | 49 ++ ...thMappingBasedModuleResolution3_node.types | 43 ++ .../pathMappingBasedModuleResolution4.js | 30 - .../pathMappingBasedModuleResolution4.symbols | 22 - .../pathMappingBasedModuleResolution4.types | 25 - .../pathMappingBasedModuleResolution4_1.js | 30 - ...athMappingBasedModuleResolution4_1.symbols | 22 - .../pathMappingBasedModuleResolution4_1.types | 25 - ...thMappingBasedModuleResolution4_classic.js | 38 ++ ...ingBasedModuleResolution4_classic.symbols} | 20 +- ...gBasedModuleResolution4_classic.trace.json | 27 + ...ppingBasedModuleResolution4_classic.types} | 21 +- .../pathMappingBasedModuleResolution4_node.js | 30 + ...MappingBasedModuleResolution4_node.symbols | 36 + ...pingBasedModuleResolution4_node.trace.json | 49 ++ ...hMappingBasedModuleResolution4_node.types} | 17 +- ...thMappingBasedModuleResolution5.errors.txt | 6 - ...hMappingBasedModuleResolution5_classic.js} | 2 +- ...ingBasedModuleResolution5_classic.symbols} | 2 +- ...gBasedModuleResolution5_classic.trace.json | 51 ++ ...ppingBasedModuleResolution5_classic.types} | 2 +- .../pathMappingBasedModuleResolution5_node.js | 46 ++ ...appingBasedModuleResolution5_node.symbols} | 12 +- ...pingBasedModuleResolution5_node.trace.json | 84 +++ ...hMappingBasedModuleResolution5_node.types} | 11 +- ...thMappingBasedModuleResolution6_classic.js | 23 + ...pingBasedModuleResolution6_classic.symbols | 22 + ...gBasedModuleResolution6_classic.trace.json | 32 + ...appingBasedModuleResolution6_classic.types | 24 + .../pathMappingBasedModuleResolution6_node.js | 21 + ...MappingBasedModuleResolution6_node.symbols | 22 + ...pingBasedModuleResolution6_node.trace.json | 48 ++ ...thMappingBasedModuleResolution6_node.types | 24 + .../pathMappingBasedModuleResolution7.js | 44 -- .../pathMappingBasedModuleResolution7.symbols | 44 -- .../pathMappingBasedModuleResolution7.types | 53 -- .../pathMappingBasedModuleResolution7_1.js | 44 -- ...athMappingBasedModuleResolution7_1.symbols | 44 -- .../pathMappingBasedModuleResolution7_1.types | 53 -- ...thMappingBasedModuleResolution7_classic.js | 45 ++ ...pingBasedModuleResolution7_classic.symbols | 57 ++ ...gBasedModuleResolution7_classic.trace.json | 77 +++ ...appingBasedModuleResolution7_classic.types | 63 ++ .../pathMappingBasedModuleResolution7_node.js | 44 ++ ...MappingBasedModuleResolution7_node.symbols | 57 ++ ...pingBasedModuleResolution7_node.trace.json | 123 ++++ ...thMappingBasedModuleResolution7_node.types | 63 ++ .../pathMappingBasedModuleResolution8.js | 44 -- .../pathMappingBasedModuleResolution8.symbols | 44 -- .../pathMappingBasedModuleResolution8.types | 53 -- .../pathMappingBasedModuleResolution8_1.js | 55 -- .../pathMappingBasedModuleResolution9.js | 52 -- .../pathMappingBasedModuleResolution9.symbols | 48 -- .../pathMappingBasedModuleResolution9.types | 57 -- .../pathMappingBasedModuleResolution9_1.js | 63 -- ...athMappingBasedModuleResolution9_1.symbols | 61 -- .../pathMappingBasedModuleResolution9_1.types | 73 --- .../pathMappingBasedModuleResolution9_2.js | 63 -- ...athMappingBasedModuleResolution9_2.symbols | 61 -- .../pathMappingBasedModuleResolution9_2.types | 73 --- .../staticInstanceResolution5.errors.txt | 14 +- .../reference/staticInstanceResolution5.js | 13 + .../pathMappingBasedModuleResolution1.ts | 18 - .../pathMappingBasedModuleResolution10.ts | 34 - .../pathMappingBasedModuleResolution10_1.ts | 35 - .../pathMappingBasedModuleResolution10_2.ts | 36 - .../pathMappingBasedModuleResolution11.ts | 34 - .../pathMappingBasedModuleResolution1_1.ts | 18 - ...thMappingBasedModuleResolution1_classic.ts | 19 + .../pathMappingBasedModuleResolution1_node.ts | 18 + .../pathMappingBasedModuleResolution2.ts | 22 - .../pathMappingBasedModuleResolution2_1.ts | 22 - ...hMappingBasedModuleResolution2_classic.ts} | 1 + ...pathMappingBasedModuleResolution2_node.ts} | 29 +- .../pathMappingBasedModuleResolution3.ts | 23 - .../pathMappingBasedModuleResolution3_1.ts | 23 - ...thMappingBasedModuleResolution3_classic.ts | 22 + .../pathMappingBasedModuleResolution3_node.ts | 22 + .../pathMappingBasedModuleResolution4.ts | 23 - .../pathMappingBasedModuleResolution4_1.ts | 23 - ...thMappingBasedModuleResolution4_classic.ts | 28 + .../pathMappingBasedModuleResolution4_node.ts | 28 + ...hMappingBasedModuleResolution5_classic.ts} | 15 +- ...pathMappingBasedModuleResolution5_node.ts} | 23 +- ...thMappingBasedModuleResolution6_classic.ts | 23 + .../pathMappingBasedModuleResolution6_node.ts | 23 + .../pathMappingBasedModuleResolution7.ts | 38 -- ...thMappingBasedModuleResolution7_classic.ts | 49 ++ .../pathMappingBasedModuleResolution7_node.ts | 49 ++ .../pathMappingBasedModuleResolution8.ts | 39 -- .../pathMappingBasedModuleResolution8_1.ts | 45 -- .../pathMappingBasedModuleResolution9.ts | 42 -- .../pathMappingBasedModuleResolution9_1.ts | 48 -- .../pathMappingBasedModuleResolution9_2.ts | 48 -- .../cases/unittests/cachingInServerLSHost.ts | 6 +- tests/cases/unittests/moduleResolution.ts | 475 +++++++++++--- 149 files changed, 2613 insertions(+), 3088 deletions(-) delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution1.js delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution1.symbols delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution1.types delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution10.js delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution10.symbols delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution10.types delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution10_1.js delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution10_1.symbols delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution10_1.types delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution10_2.js delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution10_2.symbols delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution10_2.types delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution11.js delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution11.symbols delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution11.types delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution1_1.js delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution1_1.symbols create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution1_classic.errors.txt create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution1_classic.js create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution1_classic.trace.json create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution1_node.errors.txt create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution1_node.js create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution1_node.trace.json delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution2.js delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution2.symbols delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution2.types delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution2_1.js rename tests/baselines/reference/{pathMappingBasedModuleResolution6.errors.txt => pathMappingBasedModuleResolution2_classic.errors.txt} (100%) rename tests/baselines/reference/{pathMappingBasedModuleResolution6.js => pathMappingBasedModuleResolution2_classic.js} (100%) create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution2_classic.trace.json create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution2_node.errors.txt rename tests/baselines/reference/{pathMappingBasedModuleResolution5.js => pathMappingBasedModuleResolution2_node.js} (100%) create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution2_node.trace.json delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution3.js delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution3.symbols delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution3.types delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution3_1.js delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution3_1.symbols delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution3_1.types create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution3_classic.js create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution3_classic.symbols create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution3_classic.trace.json create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution3_classic.types create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution3_node.js create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution3_node.symbols create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution3_node.trace.json create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution3_node.types delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution4.js delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution4.symbols delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution4.types delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution4_1.js delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution4_1.symbols delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution4_1.types create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution4_classic.js rename tests/baselines/reference/{pathMappingBasedModuleResolution2_1.symbols => pathMappingBasedModuleResolution4_classic.symbols} (50%) create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution4_classic.trace.json rename tests/baselines/reference/{pathMappingBasedModuleResolution1_1.types => pathMappingBasedModuleResolution4_classic.types} (60%) create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution4_node.js create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution4_node.symbols create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution4_node.trace.json rename tests/baselines/reference/{pathMappingBasedModuleResolution2_1.types => pathMappingBasedModuleResolution4_node.types} (59%) delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution5.errors.txt rename tests/baselines/reference/{pathMappingBasedModuleResolution7_2.js => pathMappingBasedModuleResolution5_classic.js} (91%) rename tests/baselines/reference/{pathMappingBasedModuleResolution7_2.symbols => pathMappingBasedModuleResolution5_classic.symbols} (95%) create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution5_classic.trace.json rename tests/baselines/reference/{pathMappingBasedModuleResolution7_2.types => pathMappingBasedModuleResolution5_classic.types} (93%) create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution5_node.js rename tests/baselines/reference/{pathMappingBasedModuleResolution8_1.symbols => pathMappingBasedModuleResolution5_node.symbols} (85%) create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution5_node.trace.json rename tests/baselines/reference/{pathMappingBasedModuleResolution8_1.types => pathMappingBasedModuleResolution5_node.types} (83%) create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution6_classic.js create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution6_classic.symbols create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution6_classic.trace.json create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution6_classic.types create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution6_node.js create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution6_node.symbols create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution6_node.trace.json create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution6_node.types delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution7.js delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution7.symbols delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution7.types delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution7_1.js delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution7_1.symbols delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution7_1.types create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution7_classic.js create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution7_classic.symbols create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution7_classic.trace.json create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution7_classic.types create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution7_node.js create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution7_node.symbols create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution7_node.trace.json create mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution7_node.types delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution8.js delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution8.symbols delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution8.types delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution8_1.js delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution9.js delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution9.symbols delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution9.types delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution9_1.js delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution9_1.symbols delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution9_1.types delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution9_2.js delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution9_2.symbols delete mode 100644 tests/baselines/reference/pathMappingBasedModuleResolution9_2.types delete mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution1.ts delete mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution10.ts delete mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution10_1.ts delete mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution10_2.ts delete mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution11.ts delete mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution1_1.ts create mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution1_classic.ts create mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution1_node.ts delete mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution2.ts delete mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution2_1.ts rename tests/cases/compiler/{pathMappingBasedModuleResolution6.ts => pathMappingBasedModuleResolution2_classic.ts} (85%) rename tests/cases/compiler/{pathMappingBasedModuleResolution5.ts => pathMappingBasedModuleResolution2_node.ts} (54%) delete mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution3.ts delete mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution3_1.ts create mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution3_classic.ts create mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution3_node.ts delete mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution4.ts delete mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution4_1.ts create mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution4_classic.ts create mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution4_node.ts rename tests/cases/compiler/{pathMappingBasedModuleResolution7_2.ts => pathMappingBasedModuleResolution5_classic.ts} (70%) rename tests/cases/compiler/{pathMappingBasedModuleResolution7_1.ts => pathMappingBasedModuleResolution5_node.ts} (57%) create mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution6_classic.ts create mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution6_node.ts delete mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution7.ts create mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution7_classic.ts create mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution7_node.ts delete mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution8.ts delete mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution8_1.ts delete mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution9.ts delete mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution9_1.ts delete mode 100644 tests/cases/compiler/pathMappingBasedModuleResolution9_2.ts diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 195122c5f2b..99a1c52913c 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -256,8 +256,6 @@ namespace ts { type: { "node": ModuleResolutionKind.NodeJs, "classic": ModuleResolutionKind.Classic, - // name is lowercased so we can still use hasProperty(userValue.toLower()) to check if user has entered the right value - "baseurl": ModuleResolutionKind.BaseUrl, }, description: Diagnostics.Specifies_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6, error: Diagnostics.Argument_for_moduleResolution_option_must_be_node_classic_or_baseUrl, @@ -529,8 +527,6 @@ namespace ts { const { options: optionsFromJsonConfigFile, errors } = convertCompilerOptionsFromJson(json["compilerOptions"], basePath, configFileName); const options = extend(existingOptions, optionsFromJsonConfigFile); - // set basePath as inferredBaseUrl so baseUrl module resolution strategy can still work even if user have not specified baseUrl explicity - options.inferredBaseUrl = basePath; return { options, diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 1b58d960c50..3bb5fb31750 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -2159,7 +2159,7 @@ "category": "Error", "code": 5059 }, - "Option '{0}' can only be used when option 'moduleResolution' is 'baseUrl'.": { + "Option 'paths' cannot be used without specifying '--baseUrl' option.": { "category": "Error", "code": 5060 }, @@ -2171,14 +2171,6 @@ "category": "Error", "code": 5062 }, - "'moduleResolution' kind 'baseUrl' cannot be used without specifying '--baseUrl' option.": { - "category": "Error", - "code": 5063 - }, - "Module resolution kind cannot be determined automatically. Please specify module resolution explicitly via 'moduleResolution' option.": { - "category": "Error", - "code": 5064 - }, "Concatenate and emit output to single file.": { "category": "Message", "code": 6001 @@ -2479,101 +2471,93 @@ "category": "Message", "code": 6090 }, - "Resolving rooted module name '{0}' - use it as a candidate location.": { + "'paths' option is specified, looking for a pattern to match module name '{0}'.": { "category": "Message", "code": 6091 }, - "Resolving relative module name '{0}'.": { + "Module name '{0}', matched pattern '{1}'.": { "category": "Message", "code": 6092 }, - "Resolving non-relative module name '{0}'.": { + "Trying substitution '{0}', candidate module location: '{1}'.": { "category": "Message", "code": 6093 }, - "Converting relative module name '{0}' to absolute using '{1}' as a base directory => '{2}'.": { + "Resolving module name '{0}' relative to base url '{1}' - '{2}'.": { "category": "Message", "code": 6094 }, - "'rootDirs' option is specified, searching for a longest matching prefix...": { + "Loading module as file / folder, candidate module location '{0}'.": { "category": "Message", "code": 6095 }, - "Found longest matching rootDir '{0}', 'converted relative path '{1}', to non-relative path '{2}'": { + "File '{0}' does not exist.": { "category": "Message", "code": 6096 }, - "'rootDirs' option is not specified, using '{0}' as candidate location.": { + "File '{0}' exist - use it as a module resolution result.": { "category": "Message", "code": 6097 }, - "'paths' option is specified, looking for a pattern to match module name '{0}'.": { + "Loading module '{0}' from 'node_modules' folder.": { "category": "Message", "code": 6098 }, - "Module name '{0}', matched pattern '{1}'.": { + "Found 'package.json' at '{0}'.": { "category": "Message", "code": 6099 }, - "Trying substitution '{0}', candidate module location: '{1}'.": { + "'package.json' does not have 'typings' field.": { "category": "Message", "code": 6100 }, - "Resolving module name '{0}' relative to base url '{1}' - '{2}'.": { + "'package.json' has 'typings' field '{0}' that references '{1}'.": { "category": "Message", "code": 6101 }, - "Loading module '{0}' as file / folder, candidate module location '{1}'.": { + "Module name '{0}' contains '!' character.": { "category": "Message", "code": 6102 }, - "File '{0}' does not exist.": { + "Allow javascript files to be compiled.": { "category": "Message", "code": 6103 }, - "File '{0}' exist - use it as a module resolution result.": { - "category": "Message", - "code": 6104 - }, - "Loading module '{0}' from 'node_modules' folder.": { - "category": "Message", - "code": 6105 - }, - "Found 'package.json' at '{0}'.": { - "category": "Message", - "code": 6106 - }, - "'package.json' does not have 'typings' field.": { - "category": "Message", - "code": 6107 - }, - "'package.json' has 'typings' field '{0}' that references '{1}'.": { - "category": "Message", - "code": 6108 - }, - "Module name '{0}' contains '!' character.": { - "category": "Message", - "code": 6109 - }, - "Allow javascript files to be compiled.": { - "category": "Message", - "code": 6110 - }, - "Base url: '{0}'.": { - "category": "Message", - "code": 6111 - }, "Option '{0}' should have array of strings as a value.": { "category": "Error", - "code": 6112 + "code": 6104 }, "Checking if '{0}' is the longest matching prefix for '{1}' - '{2}'.": { "category": "Message", - "code": 6113 + "code": 6105 }, "Expected type of 'typings' field in 'package.json' to be 'string', got '{0}'.": { "category": "Message", - "code": 6114 + "code": 6106 + }, + "'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'": { + "category": "Message", + "code": 6107 + }, + "'rootDirs' option is set, using it to resolve relative module name '{0}'": { + "category": "Message", + "code": 6108 + }, + "Longest matching prefix for '{0}' is '{1}'": { + "category": "Message", + "code": 6109 + }, + "Loading '{0}' from the root dir '{1}', candidate location '{2}'": { + "category": "Message", + "code": 6110 + }, + "Trying other entries in 'rootDirs'": { + "category": "Message", + "code": 6111 + }, + "Module resolution using 'rootDirs' has failed": { + "category": "Message", + "code": 6112 }, "Variable '{0}' implicitly has an '{1}' type.": { "category": "Error", diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 065304dc078..910525aa8d2 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -45,6 +45,51 @@ namespace ts { return compilerOptions.traceModuleResolution && host.trace !== undefined; } + function startsWith(str: string, prefix: string): boolean { + return str.lastIndexOf(prefix, 0) === 0; + } + + function endsWith(str: string, suffix: string): boolean { + const expectedPos = str.length - suffix.length; + return str.indexOf(suffix, expectedPos) === expectedPos; + } + + function hasZeroOrOneAsteriskCharacter(str: string): boolean { + let seenAsterisk = false; + for (let i = 0; i < str.length; i++) { + if (str.charCodeAt(i) === CharacterCodes.asterisk) { + if (!seenAsterisk) { + seenAsterisk = true; + } + else { + // have already seen asterisk + return false; + } + } + } + return true; + } + + function createResolvedModule(resolvedFileName: string, isExternalLibraryImport: boolean, failedLookupLocations: string[]): ResolvedModuleWithFailedLookupLocations { + return { resolvedModule: resolvedFileName ? { resolvedFileName, isExternalLibraryImport } : undefined, failedLookupLocations }; + } + + function moduleHasNonRelativeName(moduleName: string): boolean { + if (isRootedDiskPath(moduleName)) { + return false; + } + + const i = moduleName.lastIndexOf("./", 1); + const startsWithDotSlashOrDotDotSlash = i === 0 || (i === 1 && moduleName.charCodeAt(0) === CharacterCodes.dot); + return !startsWithDotSlashOrDotDotSlash; + } + + interface ModuleResolutionState { + host: ModuleResolutionHost; + compilerOptions: CompilerOptions; + traceEnabled: boolean; + } + export function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations { const traceEnabled = isTraceEnabled(compilerOptions, host); if (traceEnabled) { @@ -53,16 +98,7 @@ namespace ts { let moduleResolution = compilerOptions.moduleResolution; if (moduleResolution === undefined) { - if (compilerOptions.module === ModuleKind.CommonJS) { - moduleResolution = ModuleResolutionKind.NodeJs; - } - else if (compilerOptions.baseUrl !== undefined || compilerOptions.paths || compilerOptions.rootDirs) { - moduleResolution = ModuleResolutionKind.BaseUrl; - } - else { - moduleResolution = ModuleResolutionKind.Classic; - } - + moduleResolution = compilerOptions.module === ModuleKind.CommonJS ? ModuleResolutionKind.NodeJs : ModuleResolutionKind.Classic; if (traceEnabled) { trace(host, Diagnostics.Module_resolution_kind_is_not_specified_using_0, ModuleResolutionKind[moduleResolution]); } @@ -81,9 +117,6 @@ namespace ts { case ModuleResolutionKind.Classic: result = classicNameResolver(moduleName, containingFile, compilerOptions, host); break; - case ModuleResolutionKind.BaseUrl: - result = baseUrlModuleNameResolver(moduleName, containingFile, compilerOptions, host); - break; } if (traceEnabled) { @@ -98,192 +131,184 @@ namespace ts { return result; } - // Path mapping based module resolution strategy uses base url to resolve non-absolute file names. This resolution strategy can be enabled - // by setting 'moduleResolution' option to 'baseUrl' and as it implied by the name it uses base url to resolve module names. - // Base url can be specified: - // - explicitly via command line option 'baseUrl'. If this value is relative it will be computed relative to current directory. - // - explicitly in 'tsconfig.json' via 'baseUrl' compiler option. If this value is relative it will be computed relative to the location - // of 'tsconfig.json'. - // - if value is not provided explicitly but project uses tsconfig.json then 'baseUrl' will be set of folder that contains 'tsconfig.json' - // If baseUrl is the only provided option then non-relative module names will be resolved relative to baseUrl. Relative module names - // will still be resolved relative to the folder that contains file with import. - // User can specify additional options in tsconfig.json to tweak module resolution. - // - 'paths' option allows to tune how non-relative module names will be resolved based on the content of the module name. - // Structure of 'paths' compiler options - // 'paths': { - // pattern-1: list of substitutions 1, - // pattern-2: list of substitutions 2, - // ... - // pattern-n: list of substitutions-n - // } - // Pattern here is a string that can contain zero or one '*' character. During module resolution module name will be matched against - // all patterns in the list. Matching for patterns that don't contain '*' means that module name must be equal to pattern respecting the case. - // If pattern contains '*' then to match pattern "*" module name must start with the and end with . - // denotes part of the module name between and . - // If module name can be matches with multiple patterns then pattern with the longest prefix will be picked. - // After selecting pattern we'll use list of substitutions to get candidate locations of the module and the try to load module from the candidate location. - // Substitiution is a string that can contain zero or one '*'. To get candidate location from substitution we'll pick every substitution in the list - // and replace '*' with string. If candidate location is not rooted it will be converted to absolute using baseUrl. - // For example: - // baseUrl: /a/b/c - // "paths": { - // // match all module names - // "*": [ - // "*", // use matched name as is, - // // will be looked as /a/b/c/ - // - // "folder1/*" // substitution will convert matched name to 'folder1/', - // // since it is not rooted then final candidate location will be /a/b/c/folder1/ - // ], - // // match module names that start with 'components/' - // "components/*": [ "/root/components/*" ] // substitution will convert /components/folder1/ to '/root/components/folder1/', - // // it is rooted so it will be final candidate location - // } - // 'paths' allows to remap locations of non-relative module names. Relative module names usually are resolved relative to the folder - // that contains import. However sometimes it might be useful to apply mappings to relative module names as well. - // Since the there might be different relative file names that refer to the same file we need to convert relative module name to non-relative - // so we can just apply path mapping to it. This conversion can be performed using 'rootDirs' compiler option - this options stores list of root directories - // for the project (if root directory is not absolute it will be converted to absolute using baseUrl as a base path). - // First - we convert relative module name to absolute using location of file that contains import. - // Then we try to find what element is rootDirs is the longest prefix for this absolute file name (respecting case): - // = - // Once it is done - value of is a be non-relative name for initially relative module name. - // Note that if element in rootDirs should always end with '/' so it will be appended automatically if value in configuration does not have it. - // For example: - // baseUrl: /a/b/c - // "paths": { - // "*": [ "*", "generated/*" ] // try to resolve module name as '/a/b/c/' then look it in '/a/b/c/generated/' - // } - // "rootDirs": [ - // "./src", // root dir is project baseUrl/src - // "./generated" // root dir is baseUrl/generated - // "/e/f" // root dir is /e/f - // ] - // @file: /a/b/c/src/form1.ts - // import {x} from "./form.content.ts" - // @file: /a/b/c/generated/form.content.ts - // export var x = ... - // first './form.content.ts' needs to be converted to non-relative name. - // 1. convert it to absolute name '/a/b/c/src/form.content.ts' -> - // find longest prefix in rootDirs that match this path, it will be './src' (after expansion '/a/b/c/src/') -> - // suffix is form.content.ts - // 2. apply path mappings to 'form1.content.ts' -> - // '*' pattern will be matched -> - // '*' substitution yields '/a/b/c/form1.content.ts' - file does not exists - // 'generated/*' substitution yields '/a/b/c/generated/form1.content' - file exists - OK - export function baseUrlModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations { - const baseUrl = compilerOptions.baseUrl !== undefined ? compilerOptions.baseUrl : compilerOptions.inferredBaseUrl; - Debug.assert(baseUrl !== undefined); + /* + * Every module resolution kind can has its specific understanding how to load module from a specific path on disk + * I.e. for path '/a/b/c': + * - Node loader will first to try to check if '/a/b/c' points to a file with some supported extension and if this fails + * it will try to load module from directory: directory '/a/b/c' should exist and it should have either 'package.json' with + * 'typings' entry or file 'index' with some supported extension + * - Classic loader will only try to interpret '/a/b/c' as file. + */ + type ResolutionKindSpecificLoader = (candidate: string, extensions: string[], failedLookupLocations: string[], onlyRecordFalures: boolean, state: ModuleResolutionState) => string; - const supportedExtensions = getSupportedExtensions(compilerOptions); - // NOTE: traceEnabled check is delibirately no inside the 'trace' at evert callside to avoid runtime impact of calling vararg function - const traceEnabled = isTraceEnabled(compilerOptions, host); + /** + * Any module resolution kind can be augmented with optional settings: 'baseUrl', 'paths' and 'rootDirs' - they are used to + * mitigate differences between design time structure of the project and its runtime counterpart so the same import name + * can be resolved successfully by TypeScript compiler and runtime module loader. + * If these settings are set then loading procedure will try to use them to resolve module name and it can of failure it will + * fallback to standard resolution routine. + * + * - baseUrl - this setting controls how non-relative module names are resolved. If this setting is specified then non-relative + * names will be resolved relative to baseUrl: i.e. if baseUrl is '/a/b' then canditate location to resolve module name 'c/d' will + * be '/a/b/c/d' + * - paths - this setting can only be used when baseUrl is specified. allows to tune how non-relative module names + * will be resolved based on the content of the module name. + * Structure of 'paths' compiler options + * 'paths': { + * pattern-1: [...substitutions], + * pattern-2: [...substitutions], + * ... + * pattern-n: [...substitutions] + * } + * Pattern here is a string that can contain zero or one '*' character. During module resolution module name will be matched against + * all patterns in the list. Matching for patterns that don't contain '*' means that module name must be equal to pattern respecting the case. + * If pattern contains '*' then to match pattern "*" module name must start with the and end with . + * denotes part of the module name between and . + * If module name can be matches with multiple patterns then pattern with the longest prefix will be picked. + * After selecting pattern we'll use list of substitutions to get candidate locations of the module and the try to load module + * from the candidate location. + * Substitiution is a string that can contain zero or one '*'. To get candidate location from substitution we'll pick every + * substitution in the list and replace '*' with string. If candidate location is not rooted it + * will be converted to absolute using baseUrl. + * For example: + * baseUrl: /a/b/c + * "paths": { + * // match all module names + * "*": [ + * "*", // use matched name as is, + * // will be looked as /a/b/c/ + * + * "folder1/*" // substitution will convert matched name to 'folder1/', + * // since it is not rooted then final candidate location will be /a/b/c/folder1/ + * ], + * // match module names that start with 'components/' + * "components/*": [ "/root/components/*" ] // substitution will convert /components/folder1/ to '/root/components/folder1/', + * // it is rooted so it will be final candidate location + * } + * + * 'rootDirs' allows the project to be spreaded across multiple locations and resolve modules with relative names as if + * they were in the same location. For example lets say there are two files + * '/local/src/content/file1.ts' + * '/shared/components/contracts/src/content/protocols/file2.ts' + * After bundling content of '/shared/components/contracts/src' will be merged with '/local/src' so + * if file1 has the following import 'import {x} from "./protocols/file2"' it will be resolved successfully in runtime. + * 'rootDirs' provides the way to tell compiler that in order to get the whole project it should behave as if content of all + * root dirs were merged together. + * I.e. for the example above 'rootDirs' will have two entries: [ '/local/src', '/shared/components/contracts/src' ]. + * Compiler wil first convert './protocols/file2' into absolute path relative to the location of containing file: + * '/local/src/content/protocols/file2' and try to load it - failure. + * Then it will search 'rootDirs' looking for a longest matching prefix of this absolute path and if such prefix is found - absolute path will + * be converted to a path relative to found rootDir entry './content/protocols/file2' (*). As a last step compiler will check all remainining + * entries in 'rootDirs', use them to build absolute path out of (*) and try to resolve module from this location. + */ + function tryLoadModuleUsingOptionalResolutionSettings(moduleName: string, containingDirectory: string, loader: ResolutionKindSpecificLoader, + failedLookupLocations: string[], supportedExtensions: string[], state: ModuleResolutionState): string { - if (traceEnabled) { - trace(host, Diagnostics.Base_url_Colon_0, baseUrl); - } - - if (isRootedDiskPath(moduleName)) { - if (traceEnabled) { - trace(host, Diagnostics.Resolving_rooted_module_name_0_use_it_as_a_candidate_location, moduleName); - } - - const failedLookupLocations: string[] = []; - const resolvedFileName = loadModuleFromFile(supportedExtensions, moduleName, failedLookupLocations, !directoryProbablyExists(getDirectoryPath(moduleName), host), host, traceEnabled); - return { - resolvedModule: resolvedFileName ? { resolvedFileName } : undefined, - failedLookupLocations - }; - } - - if (nameStartsWithDotSlashOrDotDotSlash(moduleName)) { - // relative name - if (traceEnabled) { - trace(host, Diagnostics.Resolving_relative_module_name_0, moduleName); - } - return baseUrlResolveRelativeModuleName(moduleName, containingFile, baseUrl, supportedExtensions, compilerOptions, host, traceEnabled); + if (moduleHasNonRelativeName(moduleName)) { + return tryLoadModuleUsingBaseUrl(moduleName, loader, failedLookupLocations, supportedExtensions, state); } else { - // non-relative name - if (traceEnabled) { - trace(host, Diagnostics.Resolving_non_relative_module_name_0, moduleName); - } - return baseUrlResolveNonRelativeModuleName(moduleName, baseUrl, supportedExtensions, compilerOptions, host, traceEnabled); + return tryLoadModuleUsingRootDirs(moduleName, containingDirectory, loader, failedLookupLocations, supportedExtensions, state); } } - function baseUrlResolveRelativeModuleName(moduleName: string, containingFile: string, baseUrl: string, supportedExtensions: string[], compilerOptions: CompilerOptions, host: ModuleResolutionHost, traceEnabled: boolean): ResolvedModuleWithFailedLookupLocations { - const failedLookupLocations: string[] = []; + function tryLoadModuleUsingRootDirs(moduleName: string, containingDirectory: string, loader: ResolutionKindSpecificLoader, + failedLookupLocations: string[], supportedExtensions: string[], state: ModuleResolutionState): string { + + if (!state.compilerOptions.rootDirs) { + return undefined; + } + + if (state.traceEnabled) { + trace(state.host, Diagnostics.rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0, moduleName); + } - // we always pass absolute path to containing file so candidate location is also absolute - const containingDirectory = getDirectoryPath(containingFile); const candidate = normalizePath(combinePaths(containingDirectory, moduleName)); - if (traceEnabled) { - trace(host, Diagnostics.Converting_relative_module_name_0_to_absolute_using_1_as_a_base_directory_2, moduleName, containingDirectory, candidate); - } + let matchedRootDir: string; + let matchedNormalizedPrefix: string; + for (const rootDir of state.compilerOptions.rootDirs) { + // rootDirs are expected to be absolute + // in case of tsconfig.json this will happen automatically - compiler will expand relative names + // using locaton of tsconfig.json as base location + let normalizedRoot = normalizePath(rootDir); + if (!endsWith(normalizedRoot, directorySeparator)) { + normalizedRoot += directorySeparator; + } + const isLongestMatchingPrefix = + startsWith(candidate, normalizedRoot) && + (matchedNormalizedPrefix === undefined || matchedNormalizedPrefix.length < normalizedRoot.length); - if (compilerOptions.rootDirs) { - if (traceEnabled) { - trace(host, Diagnostics.rootDirs_option_is_specified_searching_for_a_longest_matching_prefix); + if (state.traceEnabled) { + trace(state.host, Diagnostics.Checking_if_0_is_the_longest_matching_prefix_for_1_2, normalizedRoot, candidate, isLongestMatchingPrefix); } - let matchedPrefix: string; - for (const rootDir of compilerOptions.rootDirs) { - // rootDirs are expected to be absolute - let normalizedRoot = normalizePath(rootDir); - if (!endsWith(normalizedRoot, directorySeparator)) { - normalizedRoot += directorySeparator; - } - const isLongestMatchingPrefix = - startsWith(candidate, normalizedRoot) && - (matchedPrefix === undefined || matchedPrefix.length < normalizedRoot.length); - - if (traceEnabled) { - trace(host, Diagnostics.Checking_if_0_is_the_longest_matching_prefix_for_1_2, normalizedRoot, candidate, isLongestMatchingPrefix); - } - - if (isLongestMatchingPrefix) { - matchedPrefix = normalizedRoot; - } - } - - if (matchedPrefix) { - const suffix = candidate.substr(matchedPrefix.length); - if (traceEnabled) { - trace(host, Diagnostics.Found_longest_matching_rootDir_0_converted_relative_path_1_to_non_relative_path_2, matchedPrefix, moduleName, suffix); - } - - return baseUrlResolveNonRelativeModuleName(suffix, baseUrl, supportedExtensions, compilerOptions, host, traceEnabled); - } - - // rootDirs does not contain prefix for candidate - fallthrough to load file from candidate location. - } - else { - if (traceEnabled) { - trace(host, Diagnostics.rootDirs_option_is_not_specified_using_0_as_candidate_location, candidate); + if (isLongestMatchingPrefix) { + matchedNormalizedPrefix = normalizedRoot; + matchedRootDir = rootDir; } } + if (matchedNormalizedPrefix) { + if (state.traceEnabled) { + trace(state.host, Diagnostics.Longest_matching_prefix_for_0_is_1, candidate, matchedNormalizedPrefix); + } + const suffix = candidate.substr(matchedNormalizedPrefix.length); - const resolvedFileName = loadModuleFromFile(supportedExtensions, candidate, failedLookupLocations, !directoryProbablyExists(getDirectoryPath(candidate), host), host, traceEnabled); - return { - resolvedModule: resolvedFileName ? { resolvedFileName } : undefined, - failedLookupLocations - }; + // first - try to load from a initial location + if (state.traceEnabled) { + trace(state.host, Diagnostics.Loading_0_from_the_root_dir_1_candidate_location_2, suffix, matchedNormalizedPrefix, candidate); + } + const resolvedFileName = loader(candidate, supportedExtensions, failedLookupLocations, !directoryProbablyExists(containingDirectory, state.host), state); + if (resolvedFileName) { + return resolvedFileName; + } + + if (state.traceEnabled) { + trace(state.host, Diagnostics.Trying_other_entries_in_rootDirs); + } + // then try to resolve using remaining entries in rootDirs + for (const rootDir of state.compilerOptions.rootDirs) { + if (rootDir === matchedRootDir) { + // skip the initially matched entry + continue; + } + const candidate = combinePaths(normalizePath(rootDir), suffix); + if (state.traceEnabled) { + trace(state.host, Diagnostics.Loading_0_from_the_root_dir_1_candidate_location_2, suffix, rootDir, candidate); + } + const baseDirectory = getDirectoryPath(candidate); + const resolvedFileName = loader(candidate, supportedExtensions, failedLookupLocations, !directoryProbablyExists(baseDirectory, state.host), state); + if (resolvedFileName) { + return resolvedFileName; + } + } + if (state.traceEnabled) { + trace(state.host, Diagnostics.Module_resolution_using_rootDirs_has_failed); + } + } + return undefined; } - function baseUrlResolveNonRelativeModuleName(moduleName: string, baseUrl: string, supportedExtensions: string[], compilerOptions: CompilerOptions, host: ModuleResolutionHost, traceEnabled: boolean): ResolvedModuleWithFailedLookupLocations { + function tryLoadModuleUsingBaseUrl(moduleName: string, loader: ResolutionKindSpecificLoader, failedLookupLocations: string[], + supportedExtensions: string[], state: ModuleResolutionState): string { + + if (!state.compilerOptions.baseUrl) { + return undefined; + } + if (state.traceEnabled) { + trace(state.host, Diagnostics.baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1, state.compilerOptions.baseUrl, moduleName); + } + let longestMatchPrefixLength = -1; let matchedPattern: string; let matchedStar: string; - const failedLookupLocations: string[] = []; - if (compilerOptions.paths) { - if (traceEnabled) { - trace(host, Diagnostics.paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0, moduleName); + if (state.compilerOptions.paths) { + if (state.traceEnabled) { + trace(state.host, Diagnostics.paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0, moduleName); } - for (const key in compilerOptions.paths) { + for (const key in state.compilerOptions.paths) { const pattern: string = key; const indexOfStar = pattern.indexOf("*"); if (indexOfStar !== -1) { @@ -311,79 +336,72 @@ namespace ts { } if (matchedPattern) { - if (traceEnabled) { - trace(host, Diagnostics.Module_name_0_matched_pattern_1, moduleName, matchedPattern); + if (state.traceEnabled) { + trace(state.host, Diagnostics.Module_name_0_matched_pattern_1, moduleName, matchedPattern); } - - for (const subst of compilerOptions.paths[matchedPattern]) { + for (const subst of state.compilerOptions.paths[matchedPattern]) { const path = matchedStar ? subst.replace("\*", matchedStar) : subst; - const candidate = normalizePath(combinePaths(baseUrl, path)); - - if (traceEnabled) { - trace(host, Diagnostics.Trying_substitution_0_candidate_module_location_Colon_1, subst, path); + const candidate = normalizePath(combinePaths(state.compilerOptions.baseUrl, path)); + if (state.traceEnabled) { + trace(state.host, Diagnostics.Trying_substitution_0_candidate_module_location_Colon_1, subst, path); } - - const resolvedFileName = loadModuleFromFile(supportedExtensions, candidate, failedLookupLocations, !directoryProbablyExists(getDirectoryPath(candidate), host), host, traceEnabled); + const resolvedFileName = loader(candidate, supportedExtensions, failedLookupLocations, !directoryProbablyExists(getDirectoryPath(candidate), state.host), state); if (resolvedFileName) { - return { resolvedModule: { resolvedFileName }, failedLookupLocations }; + return resolvedFileName; } } - - return { resolvedModule: undefined, failedLookupLocations }; + return undefined; } else { - const candidate = normalizePath(combinePaths(baseUrl, moduleName)); + const candidate = normalizePath(combinePaths(state.compilerOptions.baseUrl, moduleName)); - if (traceEnabled) { - trace(host, Diagnostics.Resolving_module_name_0_relative_to_base_url_1_2, moduleName, baseUrl, candidate); + if (state.traceEnabled) { + trace(state.host, Diagnostics.Resolving_module_name_0_relative_to_base_url_1_2, moduleName, state.compilerOptions.baseUrl, candidate); } - const resolvedFileName = loadModuleFromFile(supportedExtensions, candidate, failedLookupLocations, !directoryProbablyExists(getDirectoryPath(candidate), host), host, traceEnabled); - return { - resolvedModule: resolvedFileName ? { resolvedFileName } : undefined, - failedLookupLocations - }; + return loader(candidate, supportedExtensions, failedLookupLocations, !directoryProbablyExists(getDirectoryPath(candidate), state.host), state); } } - function startsWith(str: string, prefix: string): boolean { - return str.lastIndexOf(prefix, 0) === 0; - } - - function endsWith(str: string, suffix: string): boolean { - const expectedPos = str.length - suffix.length; - return str.indexOf(suffix, expectedPos) === expectedPos; - } - export function nodeModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations { const containingDirectory = getDirectoryPath(containingFile); const supportedExtensions = getSupportedExtensions(compilerOptions); const traceEnabled = isTraceEnabled(compilerOptions, host); - if (isRootedDiskPath(moduleName) || nameStartsWithDotSlashOrDotDotSlash(moduleName)) { - const failedLookupLocations: string[] = []; - const candidate = normalizePath(combinePaths(containingDirectory, moduleName)); - if (traceEnabled) { - trace(host, Diagnostics.Loading_module_0_as_file_Slash_folder_candidate_module_location_1, moduleName, candidate); - } + const failedLookupLocations: string[] = []; + const state = {compilerOptions, host, traceEnabled}; + let resolvedFileName = tryLoadModuleUsingOptionalResolutionSettings(moduleName, containingDirectory, nodeLoadModuleByRelativeName, + failedLookupLocations, supportedExtensions, state); - let resolvedFileName = loadModuleFromFile(supportedExtensions, candidate, failedLookupLocations, /*onlyRecordFailures*/ false, host, traceEnabled); - if (resolvedFileName) { - return { resolvedModule: { resolvedFileName }, failedLookupLocations }; - } - - resolvedFileName = loadNodeModuleFromDirectory(supportedExtensions, candidate, failedLookupLocations, /*onlyRecordFailures*/ false, host, traceEnabled); - return resolvedFileName - ? { resolvedModule: { resolvedFileName }, failedLookupLocations } - : { resolvedModule: undefined, failedLookupLocations }; + if (resolvedFileName) { + return createResolvedModule(resolvedFileName, /*isExternalLibraryImport*/false, failedLookupLocations); } - else { + + let isExternalLibraryImport = false; + if (moduleHasNonRelativeName(moduleName)) { if (traceEnabled) { trace(host, Diagnostics.Loading_module_0_from_node_modules_folder, moduleName); } - - return loadModuleFromNodeModules(moduleName, containingDirectory, host, traceEnabled); + resolvedFileName = loadModuleFromNodeModules(moduleName, containingDirectory, failedLookupLocations, state); + isExternalLibraryImport = resolvedFileName !== undefined; } + else { + const candidate = normalizePath(combinePaths(containingDirectory, moduleName)); + resolvedFileName = nodeLoadModuleByRelativeName(candidate, supportedExtensions, failedLookupLocations, /*onlyRecordFailures*/ false, state); + } + return createResolvedModule(resolvedFileName, isExternalLibraryImport, failedLookupLocations); + } + + function nodeLoadModuleByRelativeName(candidate: string, supportedExtensions: string[], failedLookupLocations: string[], + onlyRecordFailures: boolean, state: ModuleResolutionState): string { + + if (state.traceEnabled) { + trace(state.host, Diagnostics.Loading_module_as_file_Slash_folder_candidate_module_location_0, candidate); + } + + const resolvedFileName = loadModuleFromFile(candidate, supportedExtensions, failedLookupLocations, onlyRecordFailures, state); + + return resolvedFileName || loadNodeModuleFromDirectory(supportedExtensions, candidate, failedLookupLocations, onlyRecordFailures, state); } /* @internal */ @@ -396,20 +414,20 @@ namespace ts { * @param {boolean} onlyRecordFailures - if true then function won't try to actually load files but instead record all attempts as failures. This flag is necessary * in cases when we know upfront that all load attempts will fail (because containing folder does not exists) however we still need to record all failed lookup locations. */ - function loadModuleFromFile(extensions: string[], candidate: string, failedLookupLocation: string[], onlyRecordFailures: boolean, host: ModuleResolutionHost, traceEnabled: boolean): string { + function loadModuleFromFile(candidate: string, extensions: string[], failedLookupLocation: string[], onlyRecordFailures: boolean, state: ModuleResolutionState): string { return forEach(extensions, tryLoad); function tryLoad(ext: string): string { const fileName = fileExtensionIs(candidate, ext) ? candidate : candidate + ext; - if (!onlyRecordFailures && host.fileExists(fileName)) { - if (traceEnabled) { - trace(host, Diagnostics.File_0_exist_use_it_as_a_module_resolution_result, fileName); + if (!onlyRecordFailures && state.host.fileExists(fileName)) { + if (state.traceEnabled) { + trace(state.host, Diagnostics.File_0_exist_use_it_as_a_module_resolution_result, fileName); } return fileName; } else { - if (traceEnabled) { - trace(host, Diagnostics.File_0_does_not_exist, fileName); + if (state.traceEnabled) { + trace(state.host, Diagnostics.File_0_does_not_exist, fileName); } failedLookupLocation.push(fileName); return undefined; @@ -417,18 +435,18 @@ namespace ts { } } - function loadNodeModuleFromDirectory(extensions: string[], candidate: string, failedLookupLocation: string[], onlyRecordFailures: boolean, host: ModuleResolutionHost, traceEnabled: boolean): string { + function loadNodeModuleFromDirectory(extensions: string[], candidate: string, failedLookupLocation: string[], onlyRecordFailures: boolean, state: ModuleResolutionState): string { const packageJsonPath = combinePaths(candidate, "package.json"); - const directoryExists = !onlyRecordFailures && directoryProbablyExists(candidate, host); - if (directoryExists && host.fileExists(packageJsonPath)) { - if (traceEnabled) { - trace(host, Diagnostics.Found_package_json_at_0, packageJsonPath); + const directoryExists = !onlyRecordFailures && directoryProbablyExists(candidate, state.host); + if (directoryExists && state.host.fileExists(packageJsonPath)) { + if (state.traceEnabled) { + trace(state.host, Diagnostics.Found_package_json_at_0, packageJsonPath); } let jsonContent: { typings?: string }; try { - const jsonText = host.readFile(packageJsonPath); + const jsonText = state.host.readFile(packageJsonPath); jsonContent = jsonText ? <{ typings?: string }>JSON.parse(jsonText) : { typings: undefined }; } catch (e) { @@ -439,52 +457,51 @@ namespace ts { if (jsonContent.typings) { if (typeof jsonContent.typings === "string") { const typingsFile = normalizePath(combinePaths(candidate, jsonContent.typings)); - if (traceEnabled) { - trace(host, Diagnostics.package_json_has_typings_field_0_that_references_1, jsonContent.typings, typingsFile); + if (state.traceEnabled) { + trace(state.host, Diagnostics.package_json_has_typings_field_0_that_references_1, jsonContent.typings, typingsFile); } - const result = loadModuleFromFile(extensions, typingsFile, failedLookupLocation, !directoryProbablyExists(getDirectoryPath(typingsFile), host), host, traceEnabled); + const result = loadModuleFromFile(typingsFile, extensions, failedLookupLocation, !directoryProbablyExists(getDirectoryPath(typingsFile), state.host), state); if (result) { return result; } } - else if (traceEnabled) { - trace(host, Diagnostics.Expected_type_of_typings_field_in_package_json_to_be_string_got_0, typeof jsonContent.typings); + else if (state.traceEnabled) { + trace(state.host, Diagnostics.Expected_type_of_typings_field_in_package_json_to_be_string_got_0, typeof jsonContent.typings); } } else { - if (traceEnabled) { - trace(host, Diagnostics.package_json_does_not_have_typings_field); + if (state.traceEnabled) { + trace(state.host, Diagnostics.package_json_does_not_have_typings_field); } } } else { - if (traceEnabled) { - trace(host, Diagnostics.File_0_does_not_exist, packageJsonPath); + if (state.traceEnabled) { + trace(state.host, Diagnostics.File_0_does_not_exist, packageJsonPath); } // record package json as one of failed lookup locations - in the future if this file will appear it will invalidate resolution results failedLookupLocation.push(packageJsonPath); } - return loadModuleFromFile(extensions, combinePaths(candidate, "index"), failedLookupLocation, !directoryExists, host, traceEnabled); + return loadModuleFromFile(combinePaths(candidate, "index"), extensions, failedLookupLocation, !directoryExists, state); } - function loadModuleFromNodeModules(moduleName: string, directory: string, host: ModuleResolutionHost, traceEnabled: boolean): ResolvedModuleWithFailedLookupLocations { - const failedLookupLocations: string[] = []; + function loadModuleFromNodeModules(moduleName: string, directory: string, failedLookupLocations: string[], state: ModuleResolutionState): string { directory = normalizeSlashes(directory); while (true) { const baseName = getBaseFileName(directory); if (baseName !== "node_modules") { const nodeModulesFolder = combinePaths(directory, "node_modules"); - const nodeModulesFolderExists = directoryProbablyExists(nodeModulesFolder, host); + const nodeModulesFolderExists = directoryProbablyExists(nodeModulesFolder, state.host); const candidate = normalizePath(combinePaths(nodeModulesFolder, moduleName)); // Load only typescript files irrespective of allowJs option if loading from node modules - let result = loadModuleFromFile(supportedTypeScriptExtensions, candidate, failedLookupLocations, !nodeModulesFolderExists, host, traceEnabled); + let result = loadModuleFromFile(candidate, supportedTypeScriptExtensions, failedLookupLocations, !nodeModulesFolderExists, state); if (result) { - return { resolvedModule: { resolvedFileName: result, isExternalLibraryImport: true }, failedLookupLocations }; + return result; } - result = loadNodeModuleFromDirectory(supportedTypeScriptExtensions, candidate, failedLookupLocations, !nodeModulesFolderExists, host, traceEnabled); + result = loadNodeModuleFromDirectory(supportedTypeScriptExtensions, candidate, failedLookupLocations, !nodeModulesFolderExists, state); if (result) { - return { resolvedModule: { resolvedFileName: result, isExternalLibraryImport: true }, failedLookupLocations }; + return result; } } @@ -495,34 +512,20 @@ namespace ts { directory = parentPath; } - - return { resolvedModule: undefined, failedLookupLocations }; - } - - function nameStartsWithDotSlashOrDotDotSlash(name: string) { - const i = name.lastIndexOf("./", 1); - return i === 0 || (i === 1 && name.charCodeAt(0) === CharacterCodes.dot); - } - - function hasZeroOrOneAsteriskCharacter(str: string): boolean { - let seenAsterisk = false; - for (let i = 0; i < str.length; i++) { - if (str.charCodeAt(i) === CharacterCodes.asterisk) { - if (!seenAsterisk) { - seenAsterisk = true; - } - else { - // have already seen asterisk - return false; - } - } - } - return true; + return undefined; } export function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations { - const traceEnabled = isTraceEnabled(compilerOptions, host); + const state = { compilerOptions, host, traceEnabled }; + const failedLookupLocations: string[] = []; + const supportedExtensions = getSupportedExtensions(compilerOptions); + let containingDirectory = getDirectoryPath(containingFile); + + const resolvedFileName = tryLoadModuleUsingOptionalResolutionSettings(moduleName, containingDirectory, loadModuleFromFile, failedLookupLocations, supportedExtensions, state); + if (resolvedFileName) { + return createResolvedModule(resolvedFileName, /*isExternalLibraryImport*/false, failedLookupLocations); + } // module names that contain '!' are used to reference resources and are not resolved to actual files on disk if (moduleName.indexOf("!") != -1) { @@ -532,46 +535,19 @@ namespace ts { return { resolvedModule: undefined, failedLookupLocations: [] }; } - let searchPath = getDirectoryPath(containingFile); - let searchName: string; - - const failedLookupLocations: string[] = []; - let referencedSourceFile: string; - const supportedExtensions = getSupportedExtensions(compilerOptions); while (true) { - searchName = normalizePath(combinePaths(searchPath, moduleName)); - referencedSourceFile = forEach(supportedExtensions, extension => { - if (extension === ".tsx" && !compilerOptions.jsx) { - // resolve .tsx files only if jsx support is enabled - // 'logical not' handles both undefined and None cases - return undefined; - } - - const candidate = searchName + extension; - if (host.fileExists(candidate)) { - if (traceEnabled) { - trace(host, Diagnostics.File_0_exist_use_it_as_a_module_resolution_result, candidate); - } - return candidate; - } - else { - if (traceEnabled) { - trace(host, Diagnostics.File_0_does_not_exist, candidate); - } - failedLookupLocations.push(candidate); - } - }); - + const searchName = normalizePath(combinePaths(containingDirectory, moduleName)); + const directoryName = getDirectoryPath(searchName); + referencedSourceFile = loadModuleFromFile(searchName, supportedExtensions, failedLookupLocations, !directoryProbablyExists(directoryName, host), state); if (referencedSourceFile) { break; } - - const parentPath = getDirectoryPath(searchPath); - if (parentPath === searchPath) { + const parentPath = getDirectoryPath(containingDirectory); + if (parentPath === containingDirectory) { break; } - searchPath = parentPath; + containingDirectory = parentPath; } return referencedSourceFile @@ -1628,29 +1604,8 @@ namespace ts { } } - if (options.moduleResolution === ModuleResolutionKind.BaseUrl) { - if (options.baseUrl === undefined && options.inferredBaseUrl === undefined) { - programDiagnostics.add(createCompilerDiagnostic(Diagnostics.moduleResolution_kind_baseUrl_cannot_be_used_without_specifying_baseUrl_option)); - } - } - else if (options.moduleResolution === undefined) { - // if module resolution kind is not specified it is an error to have baseUrl\paths\rootDirs and module === CommonJs - // since the former one implies moduleResolutionKind to be BaseUrl and the latter one - Node - if (options.module === ModuleKind.CommonJS && (options.baseUrl || options.paths || options.rootDirs)) { - programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Module_resolution_kind_cannot_be_determined_automatically_Please_specify_module_resolution_explicitly_via_moduleResolution_option)); - } - } - else { - // here it is known that moduleResolution is not baseurl and is not undefined - if (options.baseUrl !== undefined) { - programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_can_only_be_used_when_option_moduleResolution_is_baseUrl, "baseUrl")); - } - if (options.paths) { - programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_can_only_be_used_when_option_moduleResolution_is_baseUrl, "paths")); - } - if (options.rootDirs) { - programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_can_only_be_used_when_option_moduleResolution_is_baseUrl, "rootDirs")); - } + if (options.paths && options.baseUrl === undefined) { + programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_paths_cannot_be_used_without_specifying_baseUrl_option)); } if (options.paths) { diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 15913bb71f0..cc94cbd9ce2 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -2376,8 +2376,7 @@ namespace ts { export enum ModuleResolutionKind { Classic = 1, - NodeJs = 2, - BaseUrl = 3 + NodeJs = 2 } export type RootPaths = string[]; @@ -2442,8 +2441,6 @@ namespace ts { // Skip checking lib.d.ts to help speed up tests. /* @internal */ skipDefaultLibCheck?: boolean; - // inferred baseUrl - currently this will be set in 'parseJsonConfigFileContent' to 'baseDir' - /* @internal */ inferredBaseUrl?: string; [option: string]: string | number | boolean | TsConfigOnlyOptions; } diff --git a/src/harness/compilerRunner.ts b/src/harness/compilerRunner.ts index 36aa6238f0e..8b199559412 100644 --- a/src/harness/compilerRunner.ts +++ b/src/harness/compilerRunner.ts @@ -139,6 +139,14 @@ class CompilerBaselineRunner extends RunnerBase { } }); + it (`Correct module resolution tracing for ${fileName}`, () => { + if (options.traceModuleResolution) { + Harness.Baseline.runBaseline("Correct sourcemap content for " + fileName, justName.replace(/\.tsx?$/, ".trace.json"), () => { + return JSON.stringify(result.traceResults || [], undefined, 4); + }); + } + }); + // Source maps? it("Correct sourcemap content for " + fileName, () => { if (options.sourceMap || options.inlineSourceMap) { diff --git a/src/harness/harness.ts b/src/harness/harness.ts index 31987030c2e..2b0c95c0a61 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -985,9 +985,6 @@ namespace Harness { if (harnessSettings) { setCompilerOptionsFromHarnessSetting(harnessSettings, options); } - if (options.inferredBaseUrl) { - options.inferredBaseUrl = ts.getNormalizedAbsolutePath(options.inferredBaseUrl, currentDirectory); - } if (options.rootDirs) { options.rootDirs = ts.map(options.rootDirs, d => ts.getNormalizedAbsolutePath(d, currentDirectory)); } @@ -1025,13 +1022,19 @@ namespace Harness { useCaseSensitiveFileNames, currentDirectory, options.newLine); + + let traceResults: string[]; + if (options.traceModuleResolution) { + traceResults = []; + compilerHost.trace = text => traceResults.push(text); + } const program = ts.createProgram(programFileNames, options, compilerHost); const emitResult = program.emit(); const errors = ts.getPreEmitDiagnostics(program); - const result = new CompilerResult(fileOutputs, errors, program, Harness.IO.getCurrentDirectory(), emitResult.sourceMaps); + const result = new CompilerResult(fileOutputs, errors, program, Harness.IO.getCurrentDirectory(), emitResult.sourceMaps, traceResults); return { result, options }; } @@ -1312,7 +1315,7 @@ namespace Harness { /** @param fileResults an array of strings for the fileName and an ITextWriter with its code */ constructor(fileResults: GeneratedFile[], errors: ts.Diagnostic[], public program: ts.Program, - public currentDirectoryForProgram: string, private sourceMapData: ts.SourceMapData[]) { + public currentDirectoryForProgram: string, private sourceMapData: ts.SourceMapData[], public traceResults: string[]) { for (const emittedFile of fileResults) { if (isDTS(emittedFile.fileName)) { diff --git a/src/harness/harnessLanguageService.ts b/src/harness/harnessLanguageService.ts index a0cac439729..6ab9cd896c1 100644 --- a/src/harness/harnessLanguageService.ts +++ b/src/harness/harnessLanguageService.ts @@ -547,7 +547,8 @@ namespace Harness.LanguageService { } directoryExists(path: string): boolean { - return false; + // for tests assume that directory exists + return true; } getExecutingFilePath(): string { diff --git a/src/services/services.ts b/src/services/services.ts index 28f7f848835..cb57d415c66 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -2777,6 +2777,9 @@ namespace ts { return directoryProbablyExists(directoryName, host); } }; + if (host.trace) { + compilerHost.trace = message => host.trace(message); + } if (host.resolveModuleNames) { compilerHost.resolveModuleNames = (moduleNames, containingFile) => host.resolveModuleNames(moduleNames, containingFile); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution1.js b/tests/baselines/reference/pathMappingBasedModuleResolution1.js deleted file mode 100644 index ef296c5d1a1..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution1.js +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/compiler/pathMappingBasedModuleResolution1.ts] //// - -//// [file1.ts] - -// user defined base url - -import {x} from "folder2/file2" - -declare function use(a: any): void; - -use(x.toExponential()); - -//// [file2.ts] -export {x} from "./file3" - -//// [file3.ts] -export var x = 1; - -//// [file3.js] -"use strict"; -exports.x = 1; -//// [file2.js] -"use strict"; -var file3_1 = require("./file3"); -exports.x = file3_1.x; -//// [file1.js] -// user defined base url -"use strict"; -var file2_1 = require("folder2/file2"); -use(file2_1.x.toExponential()); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution1.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution1.symbols deleted file mode 100644 index 377cd6a86dc..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution1.symbols +++ /dev/null @@ -1,25 +0,0 @@ -=== tests/cases/compiler/root/folder1/file1.ts === - -// user defined base url - -import {x} from "folder2/file2" ->x : Symbol(x, Decl(file1.ts, 3, 8)) - -declare function use(a: any): void; ->use : Symbol(use, Decl(file1.ts, 3, 31)) ->a : Symbol(a, Decl(file1.ts, 5, 21)) - -use(x.toExponential()); ->use : Symbol(use, Decl(file1.ts, 3, 31)) ->x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) ->x : Symbol(x, Decl(file1.ts, 3, 8)) ->toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) - -=== tests/cases/compiler/root/folder2/file2.ts === -export {x} from "./file3" ->x : Symbol(x, Decl(file2.ts, 0, 8)) - -=== tests/cases/compiler/root/folder2/file3.ts === -export var x = 1; ->x : Symbol(x, Decl(file3.ts, 0, 10)) - diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution1.types b/tests/baselines/reference/pathMappingBasedModuleResolution1.types deleted file mode 100644 index 68fc42a28f2..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution1.types +++ /dev/null @@ -1,28 +0,0 @@ -=== tests/cases/compiler/root/folder1/file1.ts === - -// user defined base url - -import {x} from "folder2/file2" ->x : number - -declare function use(a: any): void; ->use : (a: any) => void ->a : any - -use(x.toExponential()); ->use(x.toExponential()) : void ->use : (a: any) => void ->x.toExponential() : string ->x.toExponential : (fractionDigits?: number) => string ->x : number ->toExponential : (fractionDigits?: number) => string - -=== tests/cases/compiler/root/folder2/file2.ts === -export {x} from "./file3" ->x : number - -=== tests/cases/compiler/root/folder2/file3.ts === -export var x = 1; ->x : number ->1 : number - diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution10.js b/tests/baselines/reference/pathMappingBasedModuleResolution10.js deleted file mode 100644 index 167a4d4e365..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution10.js +++ /dev/null @@ -1,38 +0,0 @@ -//// [tests/cases/compiler/pathMappingBasedModuleResolution10.ts] //// - -//// [file1.ts] -import {x} from "./file2" // should be resolved to 'generated/folder1/file2.ts' - -export var z = x.toExponential(); - -//// [file2.ts] -export {x} from "folder1/file3" // should be resolved to 'folder1/file3.ts' - -//// [file3.ts] -export var x = 1; - -//// [file3.ts] -import {z as y} from "../folder1/file1" // should be resolved to 'folder1/file1.ts' -let z = y.toLowerCase(); - - -//// [file3.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - exports.x = 1; -}); -//// [file2.js] -define(["require", "exports", "folder1/file3"], function (require, exports, file3_1) { - "use strict"; - exports.x = file3_1.x; // should be resolved to 'folder1/file3.ts' -}); -//// [file1.js] -define(["require", "exports", "./file2"], function (require, exports, file2_1) { - "use strict"; - exports.z = file2_1.x.toExponential(); -}); -//// [file3.js] -define(["require", "exports", "../folder1/file1"], function (require, exports, file1_1) { - "use strict"; - var z = file1_1.z.toLowerCase(); -}); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution10.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution10.symbols deleted file mode 100644 index e01d12fc7e3..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution10.symbols +++ /dev/null @@ -1,29 +0,0 @@ -=== tests/cases/compiler/root/folder1/file1.ts === -import {x} from "./file2" // should be resolved to 'generated/folder1/file2.ts' ->x : Symbol(x, Decl(file1.ts, 0, 8)) - -export var z = x.toExponential(); ->z : Symbol(z, Decl(file1.ts, 2, 10)) ->x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) ->x : Symbol(x, Decl(file1.ts, 0, 8)) ->toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) - -=== tests/cases/compiler/root/generated/folder1/file2.ts === -export {x} from "folder1/file3" // should be resolved to 'folder1/file3.ts' ->x : Symbol(x, Decl(file2.ts, 0, 8)) - -=== tests/cases/compiler/root/folder1/file3.ts === -export var x = 1; ->x : Symbol(x, Decl(file3.ts, 0, 10)) - -=== tests/cases/compiler/root/generated/folder2/file3.ts === -import {z as y} from "../folder1/file1" // should be resolved to 'folder1/file1.ts' ->z : Symbol(y, Decl(file3.ts, 0, 8)) ->y : Symbol(y, Decl(file3.ts, 0, 8)) - -let z = y.toLowerCase(); ->z : Symbol(z, Decl(file3.ts, 1, 3)) ->y.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) ->y : Symbol(y, Decl(file3.ts, 0, 8)) ->toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) - diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution10.types b/tests/baselines/reference/pathMappingBasedModuleResolution10.types deleted file mode 100644 index ac3caa8b532..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution10.types +++ /dev/null @@ -1,32 +0,0 @@ -=== tests/cases/compiler/root/folder1/file1.ts === -import {x} from "./file2" // should be resolved to 'generated/folder1/file2.ts' ->x : number - -export var z = x.toExponential(); ->z : string ->x.toExponential() : string ->x.toExponential : (fractionDigits?: number) => string ->x : number ->toExponential : (fractionDigits?: number) => string - -=== tests/cases/compiler/root/generated/folder1/file2.ts === -export {x} from "folder1/file3" // should be resolved to 'folder1/file3.ts' ->x : number - -=== tests/cases/compiler/root/folder1/file3.ts === -export var x = 1; ->x : number ->1 : number - -=== tests/cases/compiler/root/generated/folder2/file3.ts === -import {z as y} from "../folder1/file1" // should be resolved to 'folder1/file1.ts' ->z : string ->y : string - -let z = y.toLowerCase(); ->z : string ->y.toLowerCase() : string ->y.toLowerCase : () => string ->y : string ->toLowerCase : () => string - diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution10_1.js b/tests/baselines/reference/pathMappingBasedModuleResolution10_1.js deleted file mode 100644 index b9dc60f053a..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution10_1.js +++ /dev/null @@ -1,38 +0,0 @@ -//// [tests/cases/compiler/pathMappingBasedModuleResolution10_1.ts] //// - -//// [file2.ts] -export {x} from "folder1/file3" // should be resolved to 'folder1/file3.ts' - -//// [file3.ts] -export var x = 1; - -//// [file3.ts] -import {z as y} from "../folder1/file1" // should be resolved to 'folder1/file1.ts' -let z = y.toLowerCase(); - -//// [file1.ts] -import {x} from "./file2" // should be resolved to 'generated/folder1/file2.ts' - -export var z = x.toExponential(); - - -//// [file3.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - exports.x = 1; -}); -//// [file2.js] -define(["require", "exports", "folder1/file3"], function (require, exports, file3_1) { - "use strict"; - exports.x = file3_1.x; // should be resolved to 'folder1/file3.ts' -}); -//// [file1.js] -define(["require", "exports", "./file2"], function (require, exports, file2_1) { - "use strict"; - exports.z = file2_1.x.toExponential(); -}); -//// [file3.js] -define(["require", "exports", "../folder1/file1"], function (require, exports, file1_1) { - "use strict"; - var z = file1_1.z.toLowerCase(); -}); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution10_1.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution10_1.symbols deleted file mode 100644 index dbc1fc792d4..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution10_1.symbols +++ /dev/null @@ -1,29 +0,0 @@ -=== c:/root/generated/folder1/file2.ts === -export {x} from "folder1/file3" // should be resolved to 'folder1/file3.ts' ->x : Symbol(x, Decl(file2.ts, 0, 8)) - -=== c:/root/folder1/file3.ts === -export var x = 1; ->x : Symbol(x, Decl(file3.ts, 0, 10)) - -=== c:/root/generated/folder2/file3.ts === -import {z as y} from "../folder1/file1" // should be resolved to 'folder1/file1.ts' ->z : Symbol(y, Decl(file3.ts, 0, 8)) ->y : Symbol(y, Decl(file3.ts, 0, 8)) - -let z = y.toLowerCase(); ->z : Symbol(z, Decl(file3.ts, 1, 3)) ->y.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) ->y : Symbol(y, Decl(file3.ts, 0, 8)) ->toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) - -=== c:/root/folder1/file1.ts === -import {x} from "./file2" // should be resolved to 'generated/folder1/file2.ts' ->x : Symbol(x, Decl(file1.ts, 0, 8)) - -export var z = x.toExponential(); ->z : Symbol(z, Decl(file1.ts, 2, 10)) ->x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) ->x : Symbol(x, Decl(file1.ts, 0, 8)) ->toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) - diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution10_1.types b/tests/baselines/reference/pathMappingBasedModuleResolution10_1.types deleted file mode 100644 index bf617b2b1a3..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution10_1.types +++ /dev/null @@ -1,32 +0,0 @@ -=== c:/root/generated/folder1/file2.ts === -export {x} from "folder1/file3" // should be resolved to 'folder1/file3.ts' ->x : number - -=== c:/root/folder1/file3.ts === -export var x = 1; ->x : number ->1 : number - -=== c:/root/generated/folder2/file3.ts === -import {z as y} from "../folder1/file1" // should be resolved to 'folder1/file1.ts' ->z : string ->y : string - -let z = y.toLowerCase(); ->z : string ->y.toLowerCase() : string ->y.toLowerCase : () => string ->y : string ->toLowerCase : () => string - -=== c:/root/folder1/file1.ts === -import {x} from "./file2" // should be resolved to 'generated/folder1/file2.ts' ->x : number - -export var z = x.toExponential(); ->z : string ->x.toExponential() : string ->x.toExponential : (fractionDigits?: number) => string ->x : number ->toExponential : (fractionDigits?: number) => string - diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution10_2.js b/tests/baselines/reference/pathMappingBasedModuleResolution10_2.js deleted file mode 100644 index e4a83c186a1..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution10_2.js +++ /dev/null @@ -1,38 +0,0 @@ -//// [tests/cases/compiler/pathMappingBasedModuleResolution10_2.ts] //// - -//// [file2.ts] -export {x} from "folder1/file3" // should be resolved to 'folder1/file3.ts' - -//// [file3.ts] -export var x = 1; - -//// [file3.ts] -import {z as y} from "../folder1/file1" // should be resolved to 'folder1/file1.ts' -let z = y.toLowerCase(); - -//// [file1.ts] -import {x} from "./file2" // should be resolved to 'generated/folder1/file2.ts' - -export var z = x.toExponential(); - - -//// [file3.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - exports.x = 1; -}); -//// [file2.js] -define(["require", "exports", "folder1/file3"], function (require, exports, file3_1) { - "use strict"; - exports.x = file3_1.x; // should be resolved to 'folder1/file3.ts' -}); -//// [file1.js] -define(["require", "exports", "./file2"], function (require, exports, file2_1) { - "use strict"; - exports.z = file2_1.x.toExponential(); -}); -//// [file3.js] -define(["require", "exports", "../folder1/file1"], function (require, exports, file1_1) { - "use strict"; - var z = file1_1.z.toLowerCase(); -}); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution10_2.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution10_2.symbols deleted file mode 100644 index 64a308338c9..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution10_2.symbols +++ /dev/null @@ -1,29 +0,0 @@ -=== c:/root/src/generated/folder1/file2.ts === -export {x} from "folder1/file3" // should be resolved to 'folder1/file3.ts' ->x : Symbol(x, Decl(file2.ts, 0, 8)) - -=== c:/root/src/folder1/file3.ts === -export var x = 1; ->x : Symbol(x, Decl(file3.ts, 0, 10)) - -=== c:/root/src/generated/folder2/file3.ts === -import {z as y} from "../folder1/file1" // should be resolved to 'folder1/file1.ts' ->z : Symbol(y, Decl(file3.ts, 0, 8)) ->y : Symbol(y, Decl(file3.ts, 0, 8)) - -let z = y.toLowerCase(); ->z : Symbol(z, Decl(file3.ts, 1, 3)) ->y.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) ->y : Symbol(y, Decl(file3.ts, 0, 8)) ->toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) - -=== c:/root/src/folder1/file1.ts === -import {x} from "./file2" // should be resolved to 'generated/folder1/file2.ts' ->x : Symbol(x, Decl(file1.ts, 0, 8)) - -export var z = x.toExponential(); ->z : Symbol(z, Decl(file1.ts, 2, 10)) ->x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) ->x : Symbol(x, Decl(file1.ts, 0, 8)) ->toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) - diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution10_2.types b/tests/baselines/reference/pathMappingBasedModuleResolution10_2.types deleted file mode 100644 index 0fc9270c667..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution10_2.types +++ /dev/null @@ -1,32 +0,0 @@ -=== c:/root/src/generated/folder1/file2.ts === -export {x} from "folder1/file3" // should be resolved to 'folder1/file3.ts' ->x : number - -=== c:/root/src/folder1/file3.ts === -export var x = 1; ->x : number ->1 : number - -=== c:/root/src/generated/folder2/file3.ts === -import {z as y} from "../folder1/file1" // should be resolved to 'folder1/file1.ts' ->z : string ->y : string - -let z = y.toLowerCase(); ->z : string ->y.toLowerCase() : string ->y.toLowerCase : () => string ->y : string ->toLowerCase : () => string - -=== c:/root/src/folder1/file1.ts === -import {x} from "./file2" // should be resolved to 'generated/folder1/file2.ts' ->x : number - -export var z = x.toExponential(); ->z : string ->x.toExponential() : string ->x.toExponential : (fractionDigits?: number) => string ->x : number ->toExponential : (fractionDigits?: number) => string - diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution11.js b/tests/baselines/reference/pathMappingBasedModuleResolution11.js deleted file mode 100644 index 614357ec53f..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution11.js +++ /dev/null @@ -1,38 +0,0 @@ -//// [tests/cases/compiler/pathMappingBasedModuleResolution11.ts] //// - -//// [file1.ts] -import {x} from "./file2" // should be resolved to 'generated/folder1/file2/file.ts' - -export var z = x.toExponential(); - -//// [file.ts] -export {x} from "folder1/file3" // should be resolved to 'folder1/file3.ts' - -//// [file3.ts] -export var x = 1; - -//// [file3.ts] -import {z as y} from "../folder1/file1" // should be resolved to 'folder1/file1.ts' -let z = y.toLowerCase(); - - -//// [file3.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - exports.x = 1; -}); -//// [file.js] -define(["require", "exports", "folder1/file3"], function (require, exports, file3_1) { - "use strict"; - exports.x = file3_1.x; // should be resolved to 'folder1/file3.ts' -}); -//// [file1.js] -define(["require", "exports", "./file2"], function (require, exports, file2_1) { - "use strict"; - exports.z = file2_1.x.toExponential(); -}); -//// [file3.js] -define(["require", "exports", "../folder1/file1"], function (require, exports, file1_1) { - "use strict"; - var z = file1_1.z.toLowerCase(); -}); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution11.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution11.symbols deleted file mode 100644 index f453dafe2a2..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution11.symbols +++ /dev/null @@ -1,29 +0,0 @@ -=== tests/cases/compiler/root/folder1/file1.ts === -import {x} from "./file2" // should be resolved to 'generated/folder1/file2/file.ts' ->x : Symbol(x, Decl(file1.ts, 0, 8)) - -export var z = x.toExponential(); ->z : Symbol(z, Decl(file1.ts, 2, 10)) ->x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) ->x : Symbol(x, Decl(file1.ts, 0, 8)) ->toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) - -=== tests/cases/compiler/root/generated/folder1/file2/file.ts === -export {x} from "folder1/file3" // should be resolved to 'folder1/file3.ts' ->x : Symbol(x, Decl(file.ts, 0, 8)) - -=== tests/cases/compiler/root/folder1/file3.ts === -export var x = 1; ->x : Symbol(x, Decl(file3.ts, 0, 10)) - -=== tests/cases/compiler/root/generated/folder2/file3.ts === -import {z as y} from "../folder1/file1" // should be resolved to 'folder1/file1.ts' ->z : Symbol(y, Decl(file3.ts, 0, 8)) ->y : Symbol(y, Decl(file3.ts, 0, 8)) - -let z = y.toLowerCase(); ->z : Symbol(z, Decl(file3.ts, 1, 3)) ->y.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) ->y : Symbol(y, Decl(file3.ts, 0, 8)) ->toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) - diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution11.types b/tests/baselines/reference/pathMappingBasedModuleResolution11.types deleted file mode 100644 index 45717088577..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution11.types +++ /dev/null @@ -1,32 +0,0 @@ -=== tests/cases/compiler/root/folder1/file1.ts === -import {x} from "./file2" // should be resolved to 'generated/folder1/file2/file.ts' ->x : number - -export var z = x.toExponential(); ->z : string ->x.toExponential() : string ->x.toExponential : (fractionDigits?: number) => string ->x : number ->toExponential : (fractionDigits?: number) => string - -=== tests/cases/compiler/root/generated/folder1/file2/file.ts === -export {x} from "folder1/file3" // should be resolved to 'folder1/file3.ts' ->x : number - -=== tests/cases/compiler/root/folder1/file3.ts === -export var x = 1; ->x : number ->1 : number - -=== tests/cases/compiler/root/generated/folder2/file3.ts === -import {z as y} from "../folder1/file1" // should be resolved to 'folder1/file1.ts' ->z : string ->y : string - -let z = y.toLowerCase(); ->z : string ->y.toLowerCase() : string ->y.toLowerCase : () => string ->y : string ->toLowerCase : () => string - diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution1_1.js b/tests/baselines/reference/pathMappingBasedModuleResolution1_1.js deleted file mode 100644 index 1cc12f70d5a..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution1_1.js +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/compiler/pathMappingBasedModuleResolution1_1.ts] //// - -//// [file1.ts] - -// user defined base url - -import {x} from "folder2/file2" - -declare function use(a: any): void; - -use(x.toExponential()); - -//// [file2.ts] -export {x} from "./file3" - -//// [file3.ts] -export var x = 1; - -//// [file3.js] -"use strict"; -exports.x = 1; -//// [file2.js] -"use strict"; -var file3_1 = require("./file3"); -exports.x = file3_1.x; -//// [file1.js] -// user defined base url -"use strict"; -var file2_1 = require("folder2/file2"); -use(file2_1.x.toExponential()); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution1_1.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution1_1.symbols deleted file mode 100644 index 20f69963c76..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution1_1.symbols +++ /dev/null @@ -1,25 +0,0 @@ -=== c:/root/folder1/file1.ts === - -// user defined base url - -import {x} from "folder2/file2" ->x : Symbol(x, Decl(file1.ts, 3, 8)) - -declare function use(a: any): void; ->use : Symbol(use, Decl(file1.ts, 3, 31)) ->a : Symbol(a, Decl(file1.ts, 5, 21)) - -use(x.toExponential()); ->use : Symbol(use, Decl(file1.ts, 3, 31)) ->x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) ->x : Symbol(x, Decl(file1.ts, 3, 8)) ->toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) - -=== c:/root/folder2/file2.ts === -export {x} from "./file3" ->x : Symbol(x, Decl(file2.ts, 0, 8)) - -=== c:/root/folder2/file3.ts === -export var x = 1; ->x : Symbol(x, Decl(file3.ts, 0, 10)) - diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution1_classic.errors.txt b/tests/baselines/reference/pathMappingBasedModuleResolution1_classic.errors.txt new file mode 100644 index 00000000000..85e25ec99fb --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution1_classic.errors.txt @@ -0,0 +1,7 @@ +error TS5060: Option 'paths' cannot be used without specifying '--baseUrl' option. + + +!!! error TS5060: Option 'paths' cannot be used without specifying '--baseUrl' option. +==== c:/root/f1.ts (0 errors) ==== + export var x = 1; + \ No newline at end of file diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution1_classic.js b/tests/baselines/reference/pathMappingBasedModuleResolution1_classic.js new file mode 100644 index 00000000000..1a1bd387dce --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution1_classic.js @@ -0,0 +1,9 @@ +//// [f1.ts] +export var x = 1; + + +//// [f1.js] +define(["require", "exports"], function (require, exports) { + "use strict"; + exports.x = 1; +}); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution1_classic.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution1_classic.trace.json new file mode 100644 index 00000000000..0637a088a01 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution1_classic.trace.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution1_node.errors.txt b/tests/baselines/reference/pathMappingBasedModuleResolution1_node.errors.txt new file mode 100644 index 00000000000..85e25ec99fb --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution1_node.errors.txt @@ -0,0 +1,7 @@ +error TS5060: Option 'paths' cannot be used without specifying '--baseUrl' option. + + +!!! error TS5060: Option 'paths' cannot be used without specifying '--baseUrl' option. +==== c:/root/f1.ts (0 errors) ==== + export var x = 1; + \ No newline at end of file diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution1_node.js b/tests/baselines/reference/pathMappingBasedModuleResolution1_node.js new file mode 100644 index 00000000000..5fcaa23b976 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution1_node.js @@ -0,0 +1,7 @@ +//// [f1.ts] +export var x = 1; + + +//// [f1.js] +"use strict"; +exports.x = 1; diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution1_node.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution1_node.trace.json new file mode 100644 index 00000000000..0637a088a01 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution1_node.trace.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution2.js b/tests/baselines/reference/pathMappingBasedModuleResolution2.js deleted file mode 100644 index 40cdd1fdfd4..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution2.js +++ /dev/null @@ -1,26 +0,0 @@ -//// [tests/cases/compiler/pathMappingBasedModuleResolution2.ts] //// - -//// [file1.ts] -import {x} from "folder2/file2" - -declare function use(a: any): void; - -use(x.toExponential()); - -//// [file2.ts] -export {x} from "./file3" - -//// [file3.ts] -export var x = 1; - -//// [file3.js] -"use strict"; -exports.x = 1; -//// [file2.js] -"use strict"; -var file3_1 = require("./file3"); -exports.x = file3_1.x; -//// [file1.js] -"use strict"; -var file2_1 = require("folder2/file2"); -use(file2_1.x.toExponential()); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution2.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution2.symbols deleted file mode 100644 index 94f458ff1d3..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution2.symbols +++ /dev/null @@ -1,22 +0,0 @@ -=== tests/cases/compiler/root/folder1/file1.ts === -import {x} from "folder2/file2" ->x : Symbol(x, Decl(file1.ts, 0, 8)) - -declare function use(a: any): void; ->use : Symbol(use, Decl(file1.ts, 0, 31)) ->a : Symbol(a, Decl(file1.ts, 2, 21)) - -use(x.toExponential()); ->use : Symbol(use, Decl(file1.ts, 0, 31)) ->x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) ->x : Symbol(x, Decl(file1.ts, 0, 8)) ->toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) - -=== tests/cases/compiler/root/folder2/file2.ts === -export {x} from "./file3" ->x : Symbol(x, Decl(file2.ts, 0, 8)) - -=== tests/cases/compiler/root/folder2/file3.ts === -export var x = 1; ->x : Symbol(x, Decl(file3.ts, 0, 10)) - diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution2.types b/tests/baselines/reference/pathMappingBasedModuleResolution2.types deleted file mode 100644 index ff6ef52f321..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution2.types +++ /dev/null @@ -1,25 +0,0 @@ -=== tests/cases/compiler/root/folder1/file1.ts === -import {x} from "folder2/file2" ->x : number - -declare function use(a: any): void; ->use : (a: any) => void ->a : any - -use(x.toExponential()); ->use(x.toExponential()) : void ->use : (a: any) => void ->x.toExponential() : string ->x.toExponential : (fractionDigits?: number) => string ->x : number ->toExponential : (fractionDigits?: number) => string - -=== tests/cases/compiler/root/folder2/file2.ts === -export {x} from "./file3" ->x : number - -=== tests/cases/compiler/root/folder2/file3.ts === -export var x = 1; ->x : number ->1 : number - diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution2_1.js b/tests/baselines/reference/pathMappingBasedModuleResolution2_1.js deleted file mode 100644 index 115315fec11..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution2_1.js +++ /dev/null @@ -1,26 +0,0 @@ -//// [tests/cases/compiler/pathMappingBasedModuleResolution2_1.ts] //// - -//// [file1.ts] -import {x} from "folder2/file2" - -declare function use(a: any): void; - -use(x.toExponential()); - -//// [file2.ts] -export {x} from "./file3" - -//// [file3.ts] -export var x = 1; - -//// [file3.js] -"use strict"; -exports.x = 1; -//// [file2.js] -"use strict"; -var file3_1 = require("./file3"); -exports.x = file3_1.x; -//// [file1.js] -"use strict"; -var file2_1 = require("folder2/file2"); -use(file2_1.x.toExponential()); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution6.errors.txt b/tests/baselines/reference/pathMappingBasedModuleResolution2_classic.errors.txt similarity index 100% rename from tests/baselines/reference/pathMappingBasedModuleResolution6.errors.txt rename to tests/baselines/reference/pathMappingBasedModuleResolution2_classic.errors.txt diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution6.js b/tests/baselines/reference/pathMappingBasedModuleResolution2_classic.js similarity index 100% rename from tests/baselines/reference/pathMappingBasedModuleResolution6.js rename to tests/baselines/reference/pathMappingBasedModuleResolution2_classic.js diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution2_classic.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution2_classic.trace.json new file mode 100644 index 00000000000..0637a088a01 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution2_classic.trace.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution2_node.errors.txt b/tests/baselines/reference/pathMappingBasedModuleResolution2_node.errors.txt new file mode 100644 index 00000000000..ad954bd142b --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution2_node.errors.txt @@ -0,0 +1,8 @@ +error TS5061: Pattern '*1*' can have at most one '*' character +error TS5062: Substitution '*2*' in pattern '*1*' in can have at most one '*' character + + +!!! error TS5061: Pattern '*1*' can have at most one '*' character +!!! error TS5062: Substitution '*2*' in pattern '*1*' in can have at most one '*' character +==== tests/cases/compiler/root/src/folder1/file1.ts (0 errors) ==== + export var x = 1; \ No newline at end of file diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution5.js b/tests/baselines/reference/pathMappingBasedModuleResolution2_node.js similarity index 100% rename from tests/baselines/reference/pathMappingBasedModuleResolution5.js rename to tests/baselines/reference/pathMappingBasedModuleResolution2_node.js diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution2_node.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution2_node.trace.json new file mode 100644 index 00000000000..0637a088a01 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution2_node.trace.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution3.js b/tests/baselines/reference/pathMappingBasedModuleResolution3.js deleted file mode 100644 index b7d1256da43..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution3.js +++ /dev/null @@ -1,26 +0,0 @@ -//// [tests/cases/compiler/pathMappingBasedModuleResolution3.ts] //// - -//// [file1.ts] -import {x} from "folder2/file2" - -declare function use(a: any): void; - -use(x.toExponential()); - -//// [file2.ts] -export {x} from "./file3" - -//// [file3.ts] -export var x = 1; - -//// [file3.js] -"use strict"; -exports.x = 1; -//// [file2.js] -"use strict"; -var file3_1 = require("./file3"); -exports.x = file3_1.x; -//// [file1.js] -"use strict"; -var file2_1 = require("folder2/file2"); -use(file2_1.x.toExponential()); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution3.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution3.symbols deleted file mode 100644 index b071ecec087..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution3.symbols +++ /dev/null @@ -1,22 +0,0 @@ -=== tests/cases/compiler/root/src/folder1/file1.ts === -import {x} from "folder2/file2" ->x : Symbol(x, Decl(file1.ts, 0, 8)) - -declare function use(a: any): void; ->use : Symbol(use, Decl(file1.ts, 0, 31)) ->a : Symbol(a, Decl(file1.ts, 2, 21)) - -use(x.toExponential()); ->use : Symbol(use, Decl(file1.ts, 0, 31)) ->x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) ->x : Symbol(x, Decl(file1.ts, 0, 8)) ->toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) - -=== tests/cases/compiler/root/src/folder2/file2.ts === -export {x} from "./file3" ->x : Symbol(x, Decl(file2.ts, 0, 8)) - -=== tests/cases/compiler/root/src/folder2/file3.ts === -export var x = 1; ->x : Symbol(x, Decl(file3.ts, 0, 10)) - diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution3.types b/tests/baselines/reference/pathMappingBasedModuleResolution3.types deleted file mode 100644 index 15428de5560..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution3.types +++ /dev/null @@ -1,25 +0,0 @@ -=== tests/cases/compiler/root/src/folder1/file1.ts === -import {x} from "folder2/file2" ->x : number - -declare function use(a: any): void; ->use : (a: any) => void ->a : any - -use(x.toExponential()); ->use(x.toExponential()) : void ->use : (a: any) => void ->x.toExponential() : string ->x.toExponential : (fractionDigits?: number) => string ->x : number ->toExponential : (fractionDigits?: number) => string - -=== tests/cases/compiler/root/src/folder2/file2.ts === -export {x} from "./file3" ->x : number - -=== tests/cases/compiler/root/src/folder2/file3.ts === -export var x = 1; ->x : number ->1 : number - diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution3_1.js b/tests/baselines/reference/pathMappingBasedModuleResolution3_1.js deleted file mode 100644 index 72fe7d61726..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution3_1.js +++ /dev/null @@ -1,26 +0,0 @@ -//// [tests/cases/compiler/pathMappingBasedModuleResolution3_1.ts] //// - -//// [file1.ts] -import {x} from "folder2/file2" - -declare function use(a: any): void; - -use(x.toExponential()); - -//// [file2.ts] -export {x} from "./file3" - -//// [file3.ts] -export var x = 1; - -//// [file3.js] -"use strict"; -exports.x = 1; -//// [file2.js] -"use strict"; -var file3_1 = require("./file3"); -exports.x = file3_1.x; -//// [file1.js] -"use strict"; -var file2_1 = require("folder2/file2"); -use(file2_1.x.toExponential()); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution3_1.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution3_1.symbols deleted file mode 100644 index 835d16d46f4..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution3_1.symbols +++ /dev/null @@ -1,22 +0,0 @@ -=== c:/root/src/folder1/file1.ts === -import {x} from "folder2/file2" ->x : Symbol(x, Decl(file1.ts, 0, 8)) - -declare function use(a: any): void; ->use : Symbol(use, Decl(file1.ts, 0, 31)) ->a : Symbol(a, Decl(file1.ts, 2, 21)) - -use(x.toExponential()); ->use : Symbol(use, Decl(file1.ts, 0, 31)) ->x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) ->x : Symbol(x, Decl(file1.ts, 0, 8)) ->toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) - -=== c:/root/src/folder2/file2.ts === -export {x} from "./file3" ->x : Symbol(x, Decl(file2.ts, 0, 8)) - -=== c:/root/src/folder2/file3.ts === -export var x = 1; ->x : Symbol(x, Decl(file3.ts, 0, 10)) - diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution3_1.types b/tests/baselines/reference/pathMappingBasedModuleResolution3_1.types deleted file mode 100644 index 8db89ab12b7..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution3_1.types +++ /dev/null @@ -1,25 +0,0 @@ -=== c:/root/src/folder1/file1.ts === -import {x} from "folder2/file2" ->x : number - -declare function use(a: any): void; ->use : (a: any) => void ->a : any - -use(x.toExponential()); ->use(x.toExponential()) : void ->use : (a: any) => void ->x.toExponential() : string ->x.toExponential : (fractionDigits?: number) => string ->x : number ->toExponential : (fractionDigits?: number) => string - -=== c:/root/src/folder2/file2.ts === -export {x} from "./file3" ->x : number - -=== c:/root/src/folder2/file3.ts === -export var x = 1; ->x : number ->1 : number - diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.js b/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.js new file mode 100644 index 00000000000..15867b085ea --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.js @@ -0,0 +1,42 @@ +//// [tests/cases/compiler/pathMappingBasedModuleResolution3_classic.ts] //// + +//// [file1.ts] + +// baseUrl set via command line + +import {x} from "folder2/file2" +declare function use(a: any): void; +use(x.toExponential()); + +//// [file2.ts] +import {x as a} from "./file3" // found with baseurl +import {y as b} from "file4" // found with fallback +export var x = a + b; + +//// [file3.ts] +export var x = 1; + +//// [file4.ts] +export var y = 100; + +//// [file3.js] +define(["require", "exports"], function (require, exports) { + "use strict"; + exports.x = 1; +}); +//// [file4.js] +define(["require", "exports"], function (require, exports) { + "use strict"; + exports.y = 100; +}); +//// [file2.js] +define(["require", "exports", "./file3", "file4"], function (require, exports, file3_1, file4_1) { + "use strict"; + exports.x = file3_1.x + file4_1.y; +}); +//// [file1.js] +// baseUrl set via command line +define(["require", "exports", "folder2/file2"], function (require, exports, file2_1) { + "use strict"; + use(file2_1.x.toExponential()); +}); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.symbols new file mode 100644 index 00000000000..97ec40d4cb4 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.symbols @@ -0,0 +1,39 @@ +=== c:/root/folder1/file1.ts === + +// baseUrl set via command line + +import {x} from "folder2/file2" +>x : Symbol(x, Decl(file1.ts, 3, 8)) + +declare function use(a: any): void; +>use : Symbol(use, Decl(file1.ts, 3, 31)) +>a : Symbol(a, Decl(file1.ts, 4, 21)) + +use(x.toExponential()); +>use : Symbol(use, Decl(file1.ts, 3, 31)) +>x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(file1.ts, 3, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +=== c:/root/folder2/file2.ts === +import {x as a} from "./file3" // found with baseurl +>x : Symbol(a, Decl(file2.ts, 0, 8)) +>a : Symbol(a, Decl(file2.ts, 0, 8)) + +import {y as b} from "file4" // found with fallback +>y : Symbol(b, Decl(file2.ts, 1, 8)) +>b : Symbol(b, Decl(file2.ts, 1, 8)) + +export var x = a + b; +>x : Symbol(x, Decl(file2.ts, 2, 10)) +>a : Symbol(a, Decl(file2.ts, 0, 8)) +>b : Symbol(b, Decl(file2.ts, 1, 8)) + +=== c:/root/folder2/file3.ts === +export var x = 1; +>x : Symbol(x, Decl(file3.ts, 0, 10)) + +=== c:/file4.ts === +export var y = 100; +>y : Symbol(y, Decl(file4.ts, 0, 10)) + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.trace.json new file mode 100644 index 00000000000..ac82f87bcee --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.trace.json @@ -0,0 +1,27 @@ +[ + "======== Resolving module 'folder2/file2' from 'c:/root/folder1/file1.ts'. ========", + "Explicitly specified module resolution kind: 'Classic'.", + "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'folder2/file2'", + "Resolving module name 'folder2/file2' relative to base url 'c:/root' - 'c:/root/folder2/file2'.", + "File 'c:/root/folder2/file2.ts' exist - use it as a module resolution result.", + "======== Module name 'folder2/file2' was successfully resolved to 'c:/root/folder2/file2.ts'. ========", + "======== Resolving module './file3' from 'c:/root/folder2/file2.ts'. ========", + "Explicitly specified module resolution kind: 'Classic'.", + "File 'c:/root/folder2/file3.ts' exist - use it as a module resolution result.", + "======== Module name './file3' was successfully resolved to 'c:/root/folder2/file3.ts'. ========", + "======== Resolving module 'file4' from 'c:/root/folder2/file2.ts'. ========", + "Explicitly specified module resolution kind: 'Classic'.", + "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'file4'", + "Resolving module name 'file4' relative to base url 'c:/root' - 'c:/root/file4'.", + "File 'c:/root/file4.ts' does not exist.", + "File 'c:/root/file4.tsx' does not exist.", + "File 'c:/root/file4.d.ts' does not exist.", + "File 'c:/root/folder2/file4.ts' does not exist.", + "File 'c:/root/folder2/file4.tsx' does not exist.", + "File 'c:/root/folder2/file4.d.ts' does not exist.", + "File 'c:/root/file4.ts' does not exist.", + "File 'c:/root/file4.tsx' does not exist.", + "File 'c:/root/file4.d.ts' does not exist.", + "File 'c:/file4.ts' exist - use it as a module resolution result.", + "======== Module name 'file4' was successfully resolved to 'c:/file4.ts'. ========" +] \ No newline at end of file diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.types b/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.types new file mode 100644 index 00000000000..359811ff3b2 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.types @@ -0,0 +1,44 @@ +=== c:/root/folder1/file1.ts === + +// baseUrl set via command line + +import {x} from "folder2/file2" +>x : number + +declare function use(a: any): void; +>use : (a: any) => void +>a : any + +use(x.toExponential()); +>use(x.toExponential()) : void +>use : (a: any) => void +>x.toExponential() : string +>x.toExponential : (fractionDigits?: number) => string +>x : number +>toExponential : (fractionDigits?: number) => string + +=== c:/root/folder2/file2.ts === +import {x as a} from "./file3" // found with baseurl +>x : number +>a : number + +import {y as b} from "file4" // found with fallback +>y : number +>b : number + +export var x = a + b; +>x : number +>a + b : number +>a : number +>b : number + +=== c:/root/folder2/file3.ts === +export var x = 1; +>x : number +>1 : number + +=== c:/file4.ts === +export var y = 100; +>y : number +>100 : number + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution3_node.js b/tests/baselines/reference/pathMappingBasedModuleResolution3_node.js new file mode 100644 index 00000000000..cbff6087530 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution3_node.js @@ -0,0 +1,34 @@ +//// [tests/cases/compiler/pathMappingBasedModuleResolution3_node.ts] //// + +//// [file1.ts] + +// baseUrl set via command line + +import {x} from "folder2/file2" +declare function use(a: any): void; +use(x.toExponential()); + +//// [file2.ts] +import {x as a} from "./file3" // found with baseurl +import {y as b} from "file4" // found with fallback +export var x = a + b; + +//// [file3.ts] +export var x = 1; + +//// [index.d.ts] +export var y: number; + +//// [file3.js] +"use strict"; +exports.x = 1; +//// [file2.js] +"use strict"; +var file3_1 = require("./file3"); // found with baseurl +var file4_1 = require("file4"); // found with fallback +exports.x = file3_1.x + file4_1.y; +//// [file1.js] +// baseUrl set via command line +"use strict"; +var file2_1 = require("folder2/file2"); +use(file2_1.x.toExponential()); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution3_node.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution3_node.symbols new file mode 100644 index 00000000000..487dea2fb89 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution3_node.symbols @@ -0,0 +1,39 @@ +=== c:/root/folder1/file1.ts === + +// baseUrl set via command line + +import {x} from "folder2/file2" +>x : Symbol(x, Decl(file1.ts, 3, 8)) + +declare function use(a: any): void; +>use : Symbol(use, Decl(file1.ts, 3, 31)) +>a : Symbol(a, Decl(file1.ts, 4, 21)) + +use(x.toExponential()); +>use : Symbol(use, Decl(file1.ts, 3, 31)) +>x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(file1.ts, 3, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +=== c:/root/folder2/file2.ts === +import {x as a} from "./file3" // found with baseurl +>x : Symbol(a, Decl(file2.ts, 0, 8)) +>a : Symbol(a, Decl(file2.ts, 0, 8)) + +import {y as b} from "file4" // found with fallback +>y : Symbol(b, Decl(file2.ts, 1, 8)) +>b : Symbol(b, Decl(file2.ts, 1, 8)) + +export var x = a + b; +>x : Symbol(x, Decl(file2.ts, 2, 10)) +>a : Symbol(a, Decl(file2.ts, 0, 8)) +>b : Symbol(b, Decl(file2.ts, 1, 8)) + +=== c:/root/folder2/file3.ts === +export var x = 1; +>x : Symbol(x, Decl(file3.ts, 0, 10)) + +=== c:/node_modules/file4/index.d.ts === +export var y: number; +>y : Symbol(y, Decl(index.d.ts, 0, 10)) + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution3_node.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution3_node.trace.json new file mode 100644 index 00000000000..6d0de807bc0 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution3_node.trace.json @@ -0,0 +1,49 @@ +[ + "======== Resolving module 'folder2/file2' from 'c:/root/folder1/file1.ts'. ========", + "Explicitly specified module resolution kind: 'NodeJs'.", + "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'folder2/file2'", + "Resolving module name 'folder2/file2' relative to base url 'c:/root' - 'c:/root/folder2/file2'.", + "Loading module as file / folder, candidate module location 'c:/root/folder2/file2'.", + "File 'c:/root/folder2/file2.ts' exist - use it as a module resolution result.", + "======== Module name 'folder2/file2' was successfully resolved to 'c:/root/folder2/file2.ts'. ========", + "======== Resolving module './file3' from 'c:/root/folder2/file2.ts'. ========", + "Explicitly specified module resolution kind: 'NodeJs'.", + "Loading module as file / folder, candidate module location 'c:/root/folder2/file3'.", + "File 'c:/root/folder2/file3.ts' exist - use it as a module resolution result.", + "======== Module name './file3' was successfully resolved to 'c:/root/folder2/file3.ts'. ========", + "======== Resolving module 'file4' from 'c:/root/folder2/file2.ts'. ========", + "Explicitly specified module resolution kind: 'NodeJs'.", + "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'file4'", + "Resolving module name 'file4' relative to base url 'c:/root' - 'c:/root/file4'.", + "Loading module as file / folder, candidate module location 'c:/root/file4'.", + "File 'c:/root/file4.ts' does not exist.", + "File 'c:/root/file4.tsx' does not exist.", + "File 'c:/root/file4.d.ts' does not exist.", + "File 'c:/root/file4/package.json' does not exist.", + "File 'c:/root/file4/index.ts' does not exist.", + "File 'c:/root/file4/index.tsx' does not exist.", + "File 'c:/root/file4/index.d.ts' does not exist.", + "Loading module 'file4' from 'node_modules' folder.", + "File 'c:/root/folder2/node_modules/file4.ts' does not exist.", + "File 'c:/root/folder2/node_modules/file4.tsx' does not exist.", + "File 'c:/root/folder2/node_modules/file4.d.ts' does not exist.", + "File 'c:/root/folder2/node_modules/file4/package.json' does not exist.", + "File 'c:/root/folder2/node_modules/file4/index.ts' does not exist.", + "File 'c:/root/folder2/node_modules/file4/index.tsx' does not exist.", + "File 'c:/root/folder2/node_modules/file4/index.d.ts' does not exist.", + "File 'c:/root/node_modules/file4.ts' does not exist.", + "File 'c:/root/node_modules/file4.tsx' does not exist.", + "File 'c:/root/node_modules/file4.d.ts' does not exist.", + "File 'c:/root/node_modules/file4/package.json' does not exist.", + "File 'c:/root/node_modules/file4/index.ts' does not exist.", + "File 'c:/root/node_modules/file4/index.tsx' does not exist.", + "File 'c:/root/node_modules/file4/index.d.ts' does not exist.", + "File 'c:/node_modules/file4.ts' does not exist.", + "File 'c:/node_modules/file4.tsx' does not exist.", + "File 'c:/node_modules/file4.d.ts' does not exist.", + "File 'c:/node_modules/file4/package.json' does not exist.", + "File 'c:/node_modules/file4/index.ts' does not exist.", + "File 'c:/node_modules/file4/index.tsx' does not exist.", + "File 'c:/node_modules/file4/index.d.ts' exist - use it as a module resolution result.", + "======== Module name 'file4' was successfully resolved to 'c:/node_modules/file4/index.d.ts'. ========" +] \ No newline at end of file diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution3_node.types b/tests/baselines/reference/pathMappingBasedModuleResolution3_node.types new file mode 100644 index 00000000000..78597cf50ef --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution3_node.types @@ -0,0 +1,43 @@ +=== c:/root/folder1/file1.ts === + +// baseUrl set via command line + +import {x} from "folder2/file2" +>x : number + +declare function use(a: any): void; +>use : (a: any) => void +>a : any + +use(x.toExponential()); +>use(x.toExponential()) : void +>use : (a: any) => void +>x.toExponential() : string +>x.toExponential : (fractionDigits?: number) => string +>x : number +>toExponential : (fractionDigits?: number) => string + +=== c:/root/folder2/file2.ts === +import {x as a} from "./file3" // found with baseurl +>x : number +>a : number + +import {y as b} from "file4" // found with fallback +>y : number +>b : number + +export var x = a + b; +>x : number +>a + b : number +>a : number +>b : number + +=== c:/root/folder2/file3.ts === +export var x = 1; +>x : number +>1 : number + +=== c:/node_modules/file4/index.d.ts === +export var y: number; +>y : number + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution4.js b/tests/baselines/reference/pathMappingBasedModuleResolution4.js deleted file mode 100644 index 4e76e43bb7d..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution4.js +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/compiler/pathMappingBasedModuleResolution4.ts] //// - -//// [file1.ts] -import {x} from "folder2/file2" - -declare function use(a: any): void; - -use(x.toExponential()); - -//// [file2.ts] -export {x} from "./file3" - -//// [file3.ts] -export var x = 1; - -//// [file3.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - exports.x = 1; -}); -//// [file2.js] -define(["require", "exports", "./file3"], function (require, exports, file3_1) { - "use strict"; - exports.x = file3_1.x; -}); -//// [file1.js] -define(["require", "exports", "folder2/file2"], function (require, exports, file2_1) { - "use strict"; - use(file2_1.x.toExponential()); -}); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution4.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution4.symbols deleted file mode 100644 index b071ecec087..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution4.symbols +++ /dev/null @@ -1,22 +0,0 @@ -=== tests/cases/compiler/root/src/folder1/file1.ts === -import {x} from "folder2/file2" ->x : Symbol(x, Decl(file1.ts, 0, 8)) - -declare function use(a: any): void; ->use : Symbol(use, Decl(file1.ts, 0, 31)) ->a : Symbol(a, Decl(file1.ts, 2, 21)) - -use(x.toExponential()); ->use : Symbol(use, Decl(file1.ts, 0, 31)) ->x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) ->x : Symbol(x, Decl(file1.ts, 0, 8)) ->toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) - -=== tests/cases/compiler/root/src/folder2/file2.ts === -export {x} from "./file3" ->x : Symbol(x, Decl(file2.ts, 0, 8)) - -=== tests/cases/compiler/root/src/folder2/file3.ts === -export var x = 1; ->x : Symbol(x, Decl(file3.ts, 0, 10)) - diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution4.types b/tests/baselines/reference/pathMappingBasedModuleResolution4.types deleted file mode 100644 index 15428de5560..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution4.types +++ /dev/null @@ -1,25 +0,0 @@ -=== tests/cases/compiler/root/src/folder1/file1.ts === -import {x} from "folder2/file2" ->x : number - -declare function use(a: any): void; ->use : (a: any) => void ->a : any - -use(x.toExponential()); ->use(x.toExponential()) : void ->use : (a: any) => void ->x.toExponential() : string ->x.toExponential : (fractionDigits?: number) => string ->x : number ->toExponential : (fractionDigits?: number) => string - -=== tests/cases/compiler/root/src/folder2/file2.ts === -export {x} from "./file3" ->x : number - -=== tests/cases/compiler/root/src/folder2/file3.ts === -export var x = 1; ->x : number ->1 : number - diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution4_1.js b/tests/baselines/reference/pathMappingBasedModuleResolution4_1.js deleted file mode 100644 index 56b271ec8d9..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution4_1.js +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/compiler/pathMappingBasedModuleResolution4_1.ts] //// - -//// [file1.ts] -import {x} from "folder2/file2" - -declare function use(a: any): void; - -use(x.toExponential()); - -//// [file2.ts] -export {x} from "./file3" - -//// [file3.ts] -export var x = 1; - -//// [file3.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - exports.x = 1; -}); -//// [file2.js] -define(["require", "exports", "./file3"], function (require, exports, file3_1) { - "use strict"; - exports.x = file3_1.x; -}); -//// [file1.js] -define(["require", "exports", "folder2/file2"], function (require, exports, file2_1) { - "use strict"; - use(file2_1.x.toExponential()); -}); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution4_1.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution4_1.symbols deleted file mode 100644 index 835d16d46f4..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution4_1.symbols +++ /dev/null @@ -1,22 +0,0 @@ -=== c:/root/src/folder1/file1.ts === -import {x} from "folder2/file2" ->x : Symbol(x, Decl(file1.ts, 0, 8)) - -declare function use(a: any): void; ->use : Symbol(use, Decl(file1.ts, 0, 31)) ->a : Symbol(a, Decl(file1.ts, 2, 21)) - -use(x.toExponential()); ->use : Symbol(use, Decl(file1.ts, 0, 31)) ->x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) ->x : Symbol(x, Decl(file1.ts, 0, 8)) ->toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) - -=== c:/root/src/folder2/file2.ts === -export {x} from "./file3" ->x : Symbol(x, Decl(file2.ts, 0, 8)) - -=== c:/root/src/folder2/file3.ts === -export var x = 1; ->x : Symbol(x, Decl(file3.ts, 0, 10)) - diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution4_1.types b/tests/baselines/reference/pathMappingBasedModuleResolution4_1.types deleted file mode 100644 index 8db89ab12b7..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution4_1.types +++ /dev/null @@ -1,25 +0,0 @@ -=== c:/root/src/folder1/file1.ts === -import {x} from "folder2/file2" ->x : number - -declare function use(a: any): void; ->use : (a: any) => void ->a : any - -use(x.toExponential()); ->use(x.toExponential()) : void ->use : (a: any) => void ->x.toExponential() : string ->x.toExponential : (fractionDigits?: number) => string ->x : number ->toExponential : (fractionDigits?: number) => string - -=== c:/root/src/folder2/file2.ts === -export {x} from "./file3" ->x : number - -=== c:/root/src/folder2/file3.ts === -export var x = 1; ->x : number ->1 : number - diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution4_classic.js b/tests/baselines/reference/pathMappingBasedModuleResolution4_classic.js new file mode 100644 index 00000000000..c1de8cea6c9 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution4_classic.js @@ -0,0 +1,38 @@ +//// [tests/cases/compiler/pathMappingBasedModuleResolution4_classic.ts] //// + +//// [file1.ts] +import {x} from "folder2/file2" +declare function use(a: any): void; +use(x.toExponential()); + +//// [file2.ts] +import {x as a} from "./file3" // found with baseurl +import {y as b} from "file4" // found with fallback +export var x = a + b; + +//// [file3.ts] +export var x = 1; + +//// [file4.ts] +export var y = 100; + +//// [file3.js] +define(["require", "exports"], function (require, exports) { + "use strict"; + exports.x = 1; +}); +//// [file4.js] +define(["require", "exports"], function (require, exports) { + "use strict"; + exports.y = 100; +}); +//// [file2.js] +define(["require", "exports", "./file3", "file4"], function (require, exports, file3_1, file4_1) { + "use strict"; + exports.x = file3_1.x + file4_1.y; +}); +//// [file1.js] +define(["require", "exports", "folder2/file2"], function (require, exports, file2_1) { + "use strict"; + use(file2_1.x.toExponential()); +}); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution2_1.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution4_classic.symbols similarity index 50% rename from tests/baselines/reference/pathMappingBasedModuleResolution2_1.symbols rename to tests/baselines/reference/pathMappingBasedModuleResolution4_classic.symbols index aa84fbf8cf9..7c1943dae46 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution2_1.symbols +++ b/tests/baselines/reference/pathMappingBasedModuleResolution4_classic.symbols @@ -4,7 +4,7 @@ import {x} from "folder2/file2" declare function use(a: any): void; >use : Symbol(use, Decl(file1.ts, 0, 31)) ->a : Symbol(a, Decl(file1.ts, 2, 21)) +>a : Symbol(a, Decl(file1.ts, 1, 21)) use(x.toExponential()); >use : Symbol(use, Decl(file1.ts, 0, 31)) @@ -13,10 +13,24 @@ use(x.toExponential()); >toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) === c:/root/folder2/file2.ts === -export {x} from "./file3" ->x : Symbol(x, Decl(file2.ts, 0, 8)) +import {x as a} from "./file3" // found with baseurl +>x : Symbol(a, Decl(file2.ts, 0, 8)) +>a : Symbol(a, Decl(file2.ts, 0, 8)) + +import {y as b} from "file4" // found with fallback +>y : Symbol(b, Decl(file2.ts, 1, 8)) +>b : Symbol(b, Decl(file2.ts, 1, 8)) + +export var x = a + b; +>x : Symbol(x, Decl(file2.ts, 2, 10)) +>a : Symbol(a, Decl(file2.ts, 0, 8)) +>b : Symbol(b, Decl(file2.ts, 1, 8)) === c:/root/folder2/file3.ts === export var x = 1; >x : Symbol(x, Decl(file3.ts, 0, 10)) +=== c:/file4.ts === +export var y = 100; +>y : Symbol(y, Decl(file4.ts, 0, 10)) + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution4_classic.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution4_classic.trace.json new file mode 100644 index 00000000000..ac82f87bcee --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution4_classic.trace.json @@ -0,0 +1,27 @@ +[ + "======== Resolving module 'folder2/file2' from 'c:/root/folder1/file1.ts'. ========", + "Explicitly specified module resolution kind: 'Classic'.", + "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'folder2/file2'", + "Resolving module name 'folder2/file2' relative to base url 'c:/root' - 'c:/root/folder2/file2'.", + "File 'c:/root/folder2/file2.ts' exist - use it as a module resolution result.", + "======== Module name 'folder2/file2' was successfully resolved to 'c:/root/folder2/file2.ts'. ========", + "======== Resolving module './file3' from 'c:/root/folder2/file2.ts'. ========", + "Explicitly specified module resolution kind: 'Classic'.", + "File 'c:/root/folder2/file3.ts' exist - use it as a module resolution result.", + "======== Module name './file3' was successfully resolved to 'c:/root/folder2/file3.ts'. ========", + "======== Resolving module 'file4' from 'c:/root/folder2/file2.ts'. ========", + "Explicitly specified module resolution kind: 'Classic'.", + "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'file4'", + "Resolving module name 'file4' relative to base url 'c:/root' - 'c:/root/file4'.", + "File 'c:/root/file4.ts' does not exist.", + "File 'c:/root/file4.tsx' does not exist.", + "File 'c:/root/file4.d.ts' does not exist.", + "File 'c:/root/folder2/file4.ts' does not exist.", + "File 'c:/root/folder2/file4.tsx' does not exist.", + "File 'c:/root/folder2/file4.d.ts' does not exist.", + "File 'c:/root/file4.ts' does not exist.", + "File 'c:/root/file4.tsx' does not exist.", + "File 'c:/root/file4.d.ts' does not exist.", + "File 'c:/file4.ts' exist - use it as a module resolution result.", + "======== Module name 'file4' was successfully resolved to 'c:/file4.ts'. ========" +] \ No newline at end of file diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution1_1.types b/tests/baselines/reference/pathMappingBasedModuleResolution4_classic.types similarity index 60% rename from tests/baselines/reference/pathMappingBasedModuleResolution1_1.types rename to tests/baselines/reference/pathMappingBasedModuleResolution4_classic.types index 5b0727157ac..d225246e2f9 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution1_1.types +++ b/tests/baselines/reference/pathMappingBasedModuleResolution4_classic.types @@ -1,7 +1,4 @@ === c:/root/folder1/file1.ts === - -// user defined base url - import {x} from "folder2/file2" >x : number @@ -18,11 +15,27 @@ use(x.toExponential()); >toExponential : (fractionDigits?: number) => string === c:/root/folder2/file2.ts === -export {x} from "./file3" +import {x as a} from "./file3" // found with baseurl >x : number +>a : number + +import {y as b} from "file4" // found with fallback +>y : number +>b : number + +export var x = a + b; +>x : number +>a + b : number +>a : number +>b : number === c:/root/folder2/file3.ts === export var x = 1; >x : number >1 : number +=== c:/file4.ts === +export var y = 100; +>y : number +>100 : number + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution4_node.js b/tests/baselines/reference/pathMappingBasedModuleResolution4_node.js new file mode 100644 index 00000000000..c5a08d55d8b --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution4_node.js @@ -0,0 +1,30 @@ +//// [tests/cases/compiler/pathMappingBasedModuleResolution4_node.ts] //// + +//// [file1.ts] +import {x} from "folder2/file2" +declare function use(a: any): void; +use(x.toExponential()); + +//// [file2.ts] +import {x as a} from "./file3" // found with baseurl +import {y as b} from "file4" // found with fallback +export var x = a + b; + +//// [file3.ts] +export var x = 1; + +//// [index.d.ts] +export var y: number; + +//// [file3.js] +"use strict"; +exports.x = 1; +//// [file2.js] +"use strict"; +var file3_1 = require("./file3"); // found with baseurl +var file4_1 = require("file4"); // found with fallback +exports.x = file3_1.x + file4_1.y; +//// [file1.js] +"use strict"; +var file2_1 = require("folder2/file2"); +use(file2_1.x.toExponential()); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution4_node.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution4_node.symbols new file mode 100644 index 00000000000..fb1c5be9de6 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution4_node.symbols @@ -0,0 +1,36 @@ +=== c:/root/folder1/file1.ts === +import {x} from "folder2/file2" +>x : Symbol(x, Decl(file1.ts, 0, 8)) + +declare function use(a: any): void; +>use : Symbol(use, Decl(file1.ts, 0, 31)) +>a : Symbol(a, Decl(file1.ts, 1, 21)) + +use(x.toExponential()); +>use : Symbol(use, Decl(file1.ts, 0, 31)) +>x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(file1.ts, 0, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +=== c:/root/folder2/file2.ts === +import {x as a} from "./file3" // found with baseurl +>x : Symbol(a, Decl(file2.ts, 0, 8)) +>a : Symbol(a, Decl(file2.ts, 0, 8)) + +import {y as b} from "file4" // found with fallback +>y : Symbol(b, Decl(file2.ts, 1, 8)) +>b : Symbol(b, Decl(file2.ts, 1, 8)) + +export var x = a + b; +>x : Symbol(x, Decl(file2.ts, 2, 10)) +>a : Symbol(a, Decl(file2.ts, 0, 8)) +>b : Symbol(b, Decl(file2.ts, 1, 8)) + +=== c:/root/folder2/file3.ts === +export var x = 1; +>x : Symbol(x, Decl(file3.ts, 0, 10)) + +=== c:/node_modules/file4/index.d.ts === +export var y: number; +>y : Symbol(y, Decl(index.d.ts, 0, 10)) + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution4_node.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution4_node.trace.json new file mode 100644 index 00000000000..6d0de807bc0 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution4_node.trace.json @@ -0,0 +1,49 @@ +[ + "======== Resolving module 'folder2/file2' from 'c:/root/folder1/file1.ts'. ========", + "Explicitly specified module resolution kind: 'NodeJs'.", + "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'folder2/file2'", + "Resolving module name 'folder2/file2' relative to base url 'c:/root' - 'c:/root/folder2/file2'.", + "Loading module as file / folder, candidate module location 'c:/root/folder2/file2'.", + "File 'c:/root/folder2/file2.ts' exist - use it as a module resolution result.", + "======== Module name 'folder2/file2' was successfully resolved to 'c:/root/folder2/file2.ts'. ========", + "======== Resolving module './file3' from 'c:/root/folder2/file2.ts'. ========", + "Explicitly specified module resolution kind: 'NodeJs'.", + "Loading module as file / folder, candidate module location 'c:/root/folder2/file3'.", + "File 'c:/root/folder2/file3.ts' exist - use it as a module resolution result.", + "======== Module name './file3' was successfully resolved to 'c:/root/folder2/file3.ts'. ========", + "======== Resolving module 'file4' from 'c:/root/folder2/file2.ts'. ========", + "Explicitly specified module resolution kind: 'NodeJs'.", + "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'file4'", + "Resolving module name 'file4' relative to base url 'c:/root' - 'c:/root/file4'.", + "Loading module as file / folder, candidate module location 'c:/root/file4'.", + "File 'c:/root/file4.ts' does not exist.", + "File 'c:/root/file4.tsx' does not exist.", + "File 'c:/root/file4.d.ts' does not exist.", + "File 'c:/root/file4/package.json' does not exist.", + "File 'c:/root/file4/index.ts' does not exist.", + "File 'c:/root/file4/index.tsx' does not exist.", + "File 'c:/root/file4/index.d.ts' does not exist.", + "Loading module 'file4' from 'node_modules' folder.", + "File 'c:/root/folder2/node_modules/file4.ts' does not exist.", + "File 'c:/root/folder2/node_modules/file4.tsx' does not exist.", + "File 'c:/root/folder2/node_modules/file4.d.ts' does not exist.", + "File 'c:/root/folder2/node_modules/file4/package.json' does not exist.", + "File 'c:/root/folder2/node_modules/file4/index.ts' does not exist.", + "File 'c:/root/folder2/node_modules/file4/index.tsx' does not exist.", + "File 'c:/root/folder2/node_modules/file4/index.d.ts' does not exist.", + "File 'c:/root/node_modules/file4.ts' does not exist.", + "File 'c:/root/node_modules/file4.tsx' does not exist.", + "File 'c:/root/node_modules/file4.d.ts' does not exist.", + "File 'c:/root/node_modules/file4/package.json' does not exist.", + "File 'c:/root/node_modules/file4/index.ts' does not exist.", + "File 'c:/root/node_modules/file4/index.tsx' does not exist.", + "File 'c:/root/node_modules/file4/index.d.ts' does not exist.", + "File 'c:/node_modules/file4.ts' does not exist.", + "File 'c:/node_modules/file4.tsx' does not exist.", + "File 'c:/node_modules/file4.d.ts' does not exist.", + "File 'c:/node_modules/file4/package.json' does not exist.", + "File 'c:/node_modules/file4/index.ts' does not exist.", + "File 'c:/node_modules/file4/index.tsx' does not exist.", + "File 'c:/node_modules/file4/index.d.ts' exist - use it as a module resolution result.", + "======== Module name 'file4' was successfully resolved to 'c:/node_modules/file4/index.d.ts'. ========" +] \ No newline at end of file diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution2_1.types b/tests/baselines/reference/pathMappingBasedModuleResolution4_node.types similarity index 59% rename from tests/baselines/reference/pathMappingBasedModuleResolution2_1.types rename to tests/baselines/reference/pathMappingBasedModuleResolution4_node.types index de76a17e406..5478a601f02 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution2_1.types +++ b/tests/baselines/reference/pathMappingBasedModuleResolution4_node.types @@ -15,11 +15,26 @@ use(x.toExponential()); >toExponential : (fractionDigits?: number) => string === c:/root/folder2/file2.ts === -export {x} from "./file3" +import {x as a} from "./file3" // found with baseurl >x : number +>a : number + +import {y as b} from "file4" // found with fallback +>y : number +>b : number + +export var x = a + b; +>x : number +>a + b : number +>a : number +>b : number === c:/root/folder2/file3.ts === export var x = 1; >x : number >1 : number +=== c:/node_modules/file4/index.d.ts === +export var y: number; +>y : number + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution5.errors.txt b/tests/baselines/reference/pathMappingBasedModuleResolution5.errors.txt deleted file mode 100644 index bcf7ced9509..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution5.errors.txt +++ /dev/null @@ -1,6 +0,0 @@ -error TS5064: Module resolution kind cannot be determined automatically. Please specify module resolution explicitly via 'moduleResolution' option. - - -!!! error TS5064: Module resolution kind cannot be determined automatically. Please specify module resolution explicitly via 'moduleResolution' option. -==== tests/cases/compiler/root/src/folder1/file1.ts (0 errors) ==== - export var x = 1; \ No newline at end of file diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution7_2.js b/tests/baselines/reference/pathMappingBasedModuleResolution5_classic.js similarity index 91% rename from tests/baselines/reference/pathMappingBasedModuleResolution7_2.js rename to tests/baselines/reference/pathMappingBasedModuleResolution5_classic.js index 7c66828054e..24297f85e35 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution7_2.js +++ b/tests/baselines/reference/pathMappingBasedModuleResolution5_classic.js @@ -1,4 +1,4 @@ -//// [tests/cases/compiler/pathMappingBasedModuleResolution7_2.ts] //// +//// [tests/cases/compiler/pathMappingBasedModuleResolution5_classic.ts] //// //// [file1.ts] import {x} from "folder2/file1" diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution7_2.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution5_classic.symbols similarity index 95% rename from tests/baselines/reference/pathMappingBasedModuleResolution7_2.symbols rename to tests/baselines/reference/pathMappingBasedModuleResolution5_classic.symbols index a974a238200..057b5a622a1 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution7_2.symbols +++ b/tests/baselines/reference/pathMappingBasedModuleResolution5_classic.symbols @@ -51,7 +51,7 @@ export var y = 1; export var z = 1; >z : Symbol(z, Decl(file3.ts, 0, 10)) -=== c:/sharedrepo/file4.ts === +=== c:/file4.ts === export var z1 = 1; >z1 : Symbol(z1, Decl(file4.ts, 0, 10)) diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution5_classic.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution5_classic.trace.json new file mode 100644 index 00000000000..293291e4acf --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution5_classic.trace.json @@ -0,0 +1,51 @@ +[ + "======== Resolving module 'folder2/file1' from 'c:/root/folder1/file1.ts'. ========", + "Module resolution kind is not specified, using 'Classic'.", + "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'folder2/file1'", + "'paths' option is specified, looking for a pattern to match module name 'folder2/file1'.", + "Module name 'folder2/file1', matched pattern '*'.", + "Trying substitution '*', candidate module location: 'folder2/file1'.", + "File 'c:/root/folder2/file1.ts' exist - use it as a module resolution result.", + "======== Module name 'folder2/file1' was successfully resolved to 'c:/root/folder2/file1.ts'. ========", + "======== Resolving module 'folder3/file2' from 'c:/root/folder1/file1.ts'. ========", + "Module resolution kind is not specified, using 'Classic'.", + "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'folder3/file2'", + "'paths' option is specified, looking for a pattern to match module name 'folder3/file2'.", + "Module name 'folder3/file2', matched pattern '*'.", + "Trying substitution '*', candidate module location: 'folder3/file2'.", + "File 'c:/root/folder3/file2.ts' does not exist.", + "File 'c:/root/folder3/file2.tsx' does not exist.", + "File 'c:/root/folder3/file2.d.ts' does not exist.", + "Trying substitution 'generated/*', candidate module location: 'generated/folder3/file2'.", + "File 'c:/root/generated/folder3/file2.ts' exist - use it as a module resolution result.", + "======== Module name 'folder3/file2' was successfully resolved to 'c:/root/generated/folder3/file2.ts'. ========", + "======== Resolving module 'components/file3' from 'c:/root/folder1/file1.ts'. ========", + "Module resolution kind is not specified, using 'Classic'.", + "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'components/file3'", + "'paths' option is specified, looking for a pattern to match module name 'components/file3'.", + "Module name 'components/file3', matched pattern 'components/*'.", + "Trying substitution 'shared/components/*', candidate module location: 'shared/components/file3'.", + "File 'c:/root/shared/components/file3.ts' exist - use it as a module resolution result.", + "======== Module name 'components/file3' was successfully resolved to 'c:/root/shared/components/file3.ts'. ========", + "======== Resolving module 'file4' from 'c:/root/folder1/file1.ts'. ========", + "Module resolution kind is not specified, using 'Classic'.", + "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'file4'", + "'paths' option is specified, looking for a pattern to match module name 'file4'.", + "Module name 'file4', matched pattern '*'.", + "Trying substitution '*', candidate module location: 'file4'.", + "File 'c:/root/file4.ts' does not exist.", + "File 'c:/root/file4.tsx' does not exist.", + "File 'c:/root/file4.d.ts' does not exist.", + "Trying substitution 'generated/*', candidate module location: 'generated/file4'.", + "File 'c:/root/generated/file4.ts' does not exist.", + "File 'c:/root/generated/file4.tsx' does not exist.", + "File 'c:/root/generated/file4.d.ts' does not exist.", + "File 'c:/root/folder1/file4.ts' does not exist.", + "File 'c:/root/folder1/file4.tsx' does not exist.", + "File 'c:/root/folder1/file4.d.ts' does not exist.", + "File 'c:/root/file4.ts' does not exist.", + "File 'c:/root/file4.tsx' does not exist.", + "File 'c:/root/file4.d.ts' does not exist.", + "File 'c:/file4.ts' exist - use it as a module resolution result.", + "======== Module name 'file4' was successfully resolved to 'c:/file4.ts'. ========" +] \ No newline at end of file diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution7_2.types b/tests/baselines/reference/pathMappingBasedModuleResolution5_classic.types similarity index 93% rename from tests/baselines/reference/pathMappingBasedModuleResolution7_2.types rename to tests/baselines/reference/pathMappingBasedModuleResolution5_classic.types index 9a88412b623..32a1f42bc0f 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution7_2.types +++ b/tests/baselines/reference/pathMappingBasedModuleResolution5_classic.types @@ -62,7 +62,7 @@ export var z = 1; >z : number >1 : number -=== c:/sharedrepo/file4.ts === +=== c:/file4.ts === export var z1 = 1; >z1 : number >1 : number diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution5_node.js b/tests/baselines/reference/pathMappingBasedModuleResolution5_node.js new file mode 100644 index 00000000000..1958800f918 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution5_node.js @@ -0,0 +1,46 @@ +//// [tests/cases/compiler/pathMappingBasedModuleResolution5_node.ts] //// + +//// [file1.ts] +import {x} from "folder2/file1" +import {y} from "folder3/file2" +import {z} from "components/file3" +import {z1} from "file4" + +declare function use(a: any): void; + +use(x.toExponential()); +use(y.toExponential()); +use(z.toExponential()); +use(z1.toExponential()); + +//// [file1.ts] +export var x = 1; + +//// [file2.ts] +export var y = 1; + +//// [index.d.ts] +export var z: number; + +//// [file4.ts] +export var z1 = 1; + +//// [file1.js] +"use strict"; +exports.x = 1; +//// [file2.js] +"use strict"; +exports.y = 1; +//// [file4.js] +"use strict"; +exports.z1 = 1; +//// [file1.js] +"use strict"; +var file1_1 = require("folder2/file1"); +var file2_1 = require("folder3/file2"); +var file3_1 = require("components/file3"); +var file4_1 = require("file4"); +use(file1_1.x.toExponential()); +use(file2_1.y.toExponential()); +use(file3_1.z.toExponential()); +use(file4_1.z1.toExponential()); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution8_1.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution5_node.symbols similarity index 85% rename from tests/baselines/reference/pathMappingBasedModuleResolution8_1.symbols rename to tests/baselines/reference/pathMappingBasedModuleResolution5_node.symbols index 553112dde95..67bf14607dd 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution8_1.symbols +++ b/tests/baselines/reference/pathMappingBasedModuleResolution5_node.symbols @@ -39,19 +39,19 @@ use(z1.toExponential()); >z1 : Symbol(z1, Decl(file1.ts, 3, 8)) >toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) -=== c:/root/src/folder2/file1.ts === +=== c:/root/folder2/file1.ts === export var x = 1; >x : Symbol(x, Decl(file1.ts, 0, 10)) -=== c:/root/src/generated/folder3/file2.ts === +=== c:/root/generated/folder3/file2.ts === export var y = 1; >y : Symbol(y, Decl(file2.ts, 0, 10)) -=== c:/root/src/shared/components/file3.ts === -export var z = 1; ->z : Symbol(z, Decl(file3.ts, 0, 10)) +=== c:/root/shared/components/file3/index.d.ts === +export var z: number; +>z : Symbol(z, Decl(index.d.ts, 0, 10)) -=== c:/sharedrepo/file4.ts === +=== c:/node_modules/file4.ts === export var z1 = 1; >z1 : Symbol(z1, Decl(file4.ts, 0, 10)) diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution5_node.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution5_node.trace.json new file mode 100644 index 00000000000..398d15839de --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution5_node.trace.json @@ -0,0 +1,84 @@ +[ + "======== Resolving module 'folder2/file1' from 'c:/root/folder1/file1.ts'. ========", + "Module resolution kind is not specified, using 'NodeJs'.", + "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'folder2/file1'", + "'paths' option is specified, looking for a pattern to match module name 'folder2/file1'.", + "Module name 'folder2/file1', matched pattern '*'.", + "Trying substitution '*', candidate module location: 'folder2/file1'.", + "Loading module as file / folder, candidate module location 'c:/root/folder2/file1'.", + "File 'c:/root/folder2/file1.ts' exist - use it as a module resolution result.", + "======== Module name 'folder2/file1' was successfully resolved to 'c:/root/folder2/file1.ts'. ========", + "======== Resolving module 'folder3/file2' from 'c:/root/folder1/file1.ts'. ========", + "Module resolution kind is not specified, using 'NodeJs'.", + "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'folder3/file2'", + "'paths' option is specified, looking for a pattern to match module name 'folder3/file2'.", + "Module name 'folder3/file2', matched pattern '*'.", + "Trying substitution '*', candidate module location: 'folder3/file2'.", + "Loading module as file / folder, candidate module location 'c:/root/folder3/file2'.", + "File 'c:/root/folder3/file2.ts' does not exist.", + "File 'c:/root/folder3/file2.tsx' does not exist.", + "File 'c:/root/folder3/file2.d.ts' does not exist.", + "File 'c:/root/folder3/file2/package.json' does not exist.", + "File 'c:/root/folder3/file2/index.ts' does not exist.", + "File 'c:/root/folder3/file2/index.tsx' does not exist.", + "File 'c:/root/folder3/file2/index.d.ts' does not exist.", + "Trying substitution 'generated/*', candidate module location: 'generated/folder3/file2'.", + "Loading module as file / folder, candidate module location 'c:/root/generated/folder3/file2'.", + "File 'c:/root/generated/folder3/file2.ts' exist - use it as a module resolution result.", + "======== Module name 'folder3/file2' was successfully resolved to 'c:/root/generated/folder3/file2.ts'. ========", + "======== Resolving module 'components/file3' from 'c:/root/folder1/file1.ts'. ========", + "Module resolution kind is not specified, using 'NodeJs'.", + "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'components/file3'", + "'paths' option is specified, looking for a pattern to match module name 'components/file3'.", + "Module name 'components/file3', matched pattern 'components/*'.", + "Trying substitution 'shared/components/*', candidate module location: 'shared/components/file3'.", + "Loading module as file / folder, candidate module location 'c:/root/shared/components/file3'.", + "File 'c:/root/shared/components/file3.ts' does not exist.", + "File 'c:/root/shared/components/file3.tsx' does not exist.", + "File 'c:/root/shared/components/file3.d.ts' does not exist.", + "File 'c:/root/shared/components/file3/package.json' does not exist.", + "File 'c:/root/shared/components/file3/index.ts' does not exist.", + "File 'c:/root/shared/components/file3/index.tsx' does not exist.", + "File 'c:/root/shared/components/file3/index.d.ts' exist - use it as a module resolution result.", + "======== Module name 'components/file3' was successfully resolved to 'c:/root/shared/components/file3/index.d.ts'. ========", + "======== Resolving module 'file4' from 'c:/root/folder1/file1.ts'. ========", + "Module resolution kind is not specified, using 'NodeJs'.", + "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'file4'", + "'paths' option is specified, looking for a pattern to match module name 'file4'.", + "Module name 'file4', matched pattern '*'.", + "Trying substitution '*', candidate module location: 'file4'.", + "Loading module as file / folder, candidate module location 'c:/root/file4'.", + "File 'c:/root/file4.ts' does not exist.", + "File 'c:/root/file4.tsx' does not exist.", + "File 'c:/root/file4.d.ts' does not exist.", + "File 'c:/root/file4/package.json' does not exist.", + "File 'c:/root/file4/index.ts' does not exist.", + "File 'c:/root/file4/index.tsx' does not exist.", + "File 'c:/root/file4/index.d.ts' does not exist.", + "Trying substitution 'generated/*', candidate module location: 'generated/file4'.", + "Loading module as file / folder, candidate module location 'c:/root/generated/file4'.", + "File 'c:/root/generated/file4.ts' does not exist.", + "File 'c:/root/generated/file4.tsx' does not exist.", + "File 'c:/root/generated/file4.d.ts' does not exist.", + "File 'c:/root/generated/file4/package.json' does not exist.", + "File 'c:/root/generated/file4/index.ts' does not exist.", + "File 'c:/root/generated/file4/index.tsx' does not exist.", + "File 'c:/root/generated/file4/index.d.ts' does not exist.", + "Loading module 'file4' from 'node_modules' folder.", + "File 'c:/root/folder1/node_modules/file4.ts' does not exist.", + "File 'c:/root/folder1/node_modules/file4.tsx' does not exist.", + "File 'c:/root/folder1/node_modules/file4.d.ts' does not exist.", + "File 'c:/root/folder1/node_modules/file4/package.json' does not exist.", + "File 'c:/root/folder1/node_modules/file4/index.ts' does not exist.", + "File 'c:/root/folder1/node_modules/file4/index.tsx' does not exist.", + "File 'c:/root/folder1/node_modules/file4/index.d.ts' does not exist.", + "File 'c:/root/node_modules/file4.ts' does not exist.", + "File 'c:/root/node_modules/file4.tsx' does not exist.", + "File 'c:/root/node_modules/file4.d.ts' does not exist.", + "File 'c:/root/node_modules/file4/package.json' does not exist.", + "File 'c:/root/node_modules/file4/index.ts' does not exist.", + "File 'c:/root/node_modules/file4/index.tsx' does not exist.", + "File 'c:/root/node_modules/file4/index.d.ts' does not exist.", + "File 'c:/node_modules/file4.ts' exist - use it as a module resolution result.", + "======== Module name 'file4' was successfully resolved to 'c:/node_modules/file4.ts'. ========" +] \ No newline at end of file diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution8_1.types b/tests/baselines/reference/pathMappingBasedModuleResolution5_node.types similarity index 83% rename from tests/baselines/reference/pathMappingBasedModuleResolution8_1.types rename to tests/baselines/reference/pathMappingBasedModuleResolution5_node.types index 61da62d4ee6..1b96e3f4f22 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution8_1.types +++ b/tests/baselines/reference/pathMappingBasedModuleResolution5_node.types @@ -47,22 +47,21 @@ use(z1.toExponential()); >z1 : number >toExponential : (fractionDigits?: number) => string -=== c:/root/src/folder2/file1.ts === +=== c:/root/folder2/file1.ts === export var x = 1; >x : number >1 : number -=== c:/root/src/generated/folder3/file2.ts === +=== c:/root/generated/folder3/file2.ts === export var y = 1; >y : number >1 : number -=== c:/root/src/shared/components/file3.ts === -export var z = 1; +=== c:/root/shared/components/file3/index.d.ts === +export var z: number; >z : number ->1 : number -=== c:/sharedrepo/file4.ts === +=== c:/node_modules/file4.ts === export var z1 = 1; >z1 : number >1 : number diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution6_classic.js b/tests/baselines/reference/pathMappingBasedModuleResolution6_classic.js new file mode 100644 index 00000000000..1e8f8807e2c --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution6_classic.js @@ -0,0 +1,23 @@ +//// [tests/cases/compiler/pathMappingBasedModuleResolution6_classic.ts] //// + +//// [file1.ts] +import {x} from "./project/file3"; +declare function use(x: string); +use(x.toExponential()); + +//// [file2.d.ts] +export let x: number; + +//// [file3.ts] +export {x} from "../file2"; + +//// [file3.js] +define(["require", "exports", "../file2"], function (require, exports, file2_1) { + "use strict"; + exports.x = file2_1.x; +}); +//// [file1.js] +define(["require", "exports", "./project/file3"], function (require, exports, file3_1) { + "use strict"; + use(file3_1.x.toExponential()); +}); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution6_classic.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution6_classic.symbols new file mode 100644 index 00000000000..a451ffb2584 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution6_classic.symbols @@ -0,0 +1,22 @@ +=== c:/root/src/file1.ts === +import {x} from "./project/file3"; +>x : Symbol(x, Decl(file1.ts, 0, 8)) + +declare function use(x: string); +>use : Symbol(use, Decl(file1.ts, 0, 34)) +>x : Symbol(x, Decl(file1.ts, 1, 21)) + +use(x.toExponential()); +>use : Symbol(use, Decl(file1.ts, 0, 34)) +>x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(file1.ts, 0, 8)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) + +=== c:/root/src/file2.d.ts === +export let x: number; +>x : Symbol(x, Decl(file2.d.ts, 0, 10)) + +=== c:/root/generated/src/project/file3.ts === +export {x} from "../file2"; +>x : Symbol(x, Decl(file3.ts, 0, 8)) + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution6_classic.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution6_classic.trace.json new file mode 100644 index 00000000000..229ef51a924 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution6_classic.trace.json @@ -0,0 +1,32 @@ +[ + "======== Resolving module './project/file3' from 'c:/root/src/file1.ts'. ========", + "Module resolution kind is not specified, using 'Classic'.", + "'rootDirs' option is set, using it to resolve relative module name './project/file3'", + "Checking if 'c:/root/src/' is the longest matching prefix for 'c:/root/src/project/file3' - 'true'.", + "Checking if 'c:/root/generated/src/' is the longest matching prefix for 'c:/root/src/project/file3' - 'false'.", + "Longest matching prefix for 'c:/root/src/project/file3' is 'c:/root/src/'", + "Loading 'project/file3' from the root dir 'c:/root/src/', candidate location 'c:/root/src/project/file3'", + "File 'c:/root/src/project/file3.ts' does not exist.", + "File 'c:/root/src/project/file3.tsx' does not exist.", + "File 'c:/root/src/project/file3.d.ts' does not exist.", + "Trying other entries in 'rootDirs'", + "Loading 'project/file3' from the root dir 'c:/root/generated/src', candidate location 'c:/root/generated/src/project/file3'", + "File 'c:/root/generated/src/project/file3.ts' exist - use it as a module resolution result.", + "======== Module name './project/file3' was successfully resolved to 'c:/root/generated/src/project/file3.ts'. ========", + "======== Resolving module '../file2' from 'c:/root/generated/src/project/file3.ts'. ========", + "Module resolution kind is not specified, using 'Classic'.", + "'rootDirs' option is set, using it to resolve relative module name '../file2'", + "Checking if 'c:/root/src/' is the longest matching prefix for 'c:/root/generated/src/file2' - 'false'.", + "Checking if 'c:/root/generated/src/' is the longest matching prefix for 'c:/root/generated/src/file2' - 'true'.", + "Longest matching prefix for 'c:/root/generated/src/file2' is 'c:/root/generated/src/'", + "Loading 'file2' from the root dir 'c:/root/generated/src/', candidate location 'c:/root/generated/src/file2'", + "File 'c:/root/generated/src/file2.ts' does not exist.", + "File 'c:/root/generated/src/file2.tsx' does not exist.", + "File 'c:/root/generated/src/file2.d.ts' does not exist.", + "Trying other entries in 'rootDirs'", + "Loading 'file2' from the root dir 'c:/root/src', candidate location 'c:/root/src/file2'", + "File 'c:/root/src/file2.ts' does not exist.", + "File 'c:/root/src/file2.tsx' does not exist.", + "File 'c:/root/src/file2.d.ts' exist - use it as a module resolution result.", + "======== Module name '../file2' was successfully resolved to 'c:/root/src/file2.d.ts'. ========" +] \ No newline at end of file diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution6_classic.types b/tests/baselines/reference/pathMappingBasedModuleResolution6_classic.types new file mode 100644 index 00000000000..06d2cbdce34 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution6_classic.types @@ -0,0 +1,24 @@ +=== c:/root/src/file1.ts === +import {x} from "./project/file3"; +>x : number + +declare function use(x: string); +>use : (x: string) => any +>x : string + +use(x.toExponential()); +>use(x.toExponential()) : any +>use : (x: string) => any +>x.toExponential() : string +>x.toExponential : (fractionDigits?: number) => string +>x : number +>toExponential : (fractionDigits?: number) => string + +=== c:/root/src/file2.d.ts === +export let x: number; +>x : number + +=== c:/root/generated/src/project/file3.ts === +export {x} from "../file2"; +>x : number + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution6_node.js b/tests/baselines/reference/pathMappingBasedModuleResolution6_node.js new file mode 100644 index 00000000000..6db3fecf83f --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution6_node.js @@ -0,0 +1,21 @@ +//// [tests/cases/compiler/pathMappingBasedModuleResolution6_node.ts] //// + +//// [file1.ts] +import {x} from "./project/file3"; +declare function use(x: string); +use(x.toFixed()); + +//// [index.d.ts] +export let x: number; + +//// [file3.ts] +export {x} from "../file2"; + +//// [file3.js] +"use strict"; +var file2_1 = require("../file2"); +exports.x = file2_1.x; +//// [file1.js] +"use strict"; +var file3_1 = require("./project/file3"); +use(file3_1.x.toFixed()); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution6_node.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution6_node.symbols new file mode 100644 index 00000000000..06554bae039 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution6_node.symbols @@ -0,0 +1,22 @@ +=== c:/root/src/file1.ts === +import {x} from "./project/file3"; +>x : Symbol(x, Decl(file1.ts, 0, 8)) + +declare function use(x: string); +>use : Symbol(use, Decl(file1.ts, 0, 34)) +>x : Symbol(x, Decl(file1.ts, 1, 21)) + +use(x.toFixed()); +>use : Symbol(use, Decl(file1.ts, 0, 34)) +>x.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(file1.ts, 0, 8)) +>toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) + +=== c:/root/src/file2/index.d.ts === +export let x: number; +>x : Symbol(x, Decl(index.d.ts, 0, 10)) + +=== c:/root/generated/src/project/file3.ts === +export {x} from "../file2"; +>x : Symbol(x, Decl(file3.ts, 0, 8)) + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution6_node.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution6_node.trace.json new file mode 100644 index 00000000000..4ea2f12a63c --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution6_node.trace.json @@ -0,0 +1,48 @@ +[ + "======== Resolving module './project/file3' from 'c:/root/src/file1.ts'. ========", + "Module resolution kind is not specified, using 'NodeJs'.", + "'rootDirs' option is set, using it to resolve relative module name './project/file3'", + "Checking if 'c:/root/src/' is the longest matching prefix for 'c:/root/src/project/file3' - 'true'.", + "Checking if 'c:/root/generated/src/' is the longest matching prefix for 'c:/root/src/project/file3' - 'false'.", + "Longest matching prefix for 'c:/root/src/project/file3' is 'c:/root/src/'", + "Loading 'project/file3' from the root dir 'c:/root/src/', candidate location 'c:/root/src/project/file3'", + "Loading module as file / folder, candidate module location 'c:/root/src/project/file3'.", + "File 'c:/root/src/project/file3.ts' does not exist.", + "File 'c:/root/src/project/file3.tsx' does not exist.", + "File 'c:/root/src/project/file3.d.ts' does not exist.", + "File 'c:/root/src/project/file3/package.json' does not exist.", + "File 'c:/root/src/project/file3/index.ts' does not exist.", + "File 'c:/root/src/project/file3/index.tsx' does not exist.", + "File 'c:/root/src/project/file3/index.d.ts' does not exist.", + "Trying other entries in 'rootDirs'", + "Loading 'project/file3' from the root dir 'c:/root/generated/src', candidate location 'c:/root/generated/src/project/file3'", + "Loading module as file / folder, candidate module location 'c:/root/generated/src/project/file3'.", + "File 'c:/root/generated/src/project/file3.ts' exist - use it as a module resolution result.", + "======== Module name './project/file3' was successfully resolved to 'c:/root/generated/src/project/file3.ts'. ========", + "======== Resolving module '../file2' from 'c:/root/generated/src/project/file3.ts'. ========", + "Module resolution kind is not specified, using 'NodeJs'.", + "'rootDirs' option is set, using it to resolve relative module name '../file2'", + "Checking if 'c:/root/src/' is the longest matching prefix for 'c:/root/generated/src/file2' - 'false'.", + "Checking if 'c:/root/generated/src/' is the longest matching prefix for 'c:/root/generated/src/file2' - 'true'.", + "Longest matching prefix for 'c:/root/generated/src/file2' is 'c:/root/generated/src/'", + "Loading 'file2' from the root dir 'c:/root/generated/src/', candidate location 'c:/root/generated/src/file2'", + "Loading module as file / folder, candidate module location 'c:/root/generated/src/file2'.", + "File 'c:/root/generated/src/file2.ts' does not exist.", + "File 'c:/root/generated/src/file2.tsx' does not exist.", + "File 'c:/root/generated/src/file2.d.ts' does not exist.", + "File 'c:/root/generated/src/file2/package.json' does not exist.", + "File 'c:/root/generated/src/file2/index.ts' does not exist.", + "File 'c:/root/generated/src/file2/index.tsx' does not exist.", + "File 'c:/root/generated/src/file2/index.d.ts' does not exist.", + "Trying other entries in 'rootDirs'", + "Loading 'file2' from the root dir 'c:/root/src', candidate location 'c:/root/src/file2'", + "Loading module as file / folder, candidate module location 'c:/root/src/file2'.", + "File 'c:/root/src/file2.ts' does not exist.", + "File 'c:/root/src/file2.tsx' does not exist.", + "File 'c:/root/src/file2.d.ts' does not exist.", + "File 'c:/root/src/file2/package.json' does not exist.", + "File 'c:/root/src/file2/index.ts' does not exist.", + "File 'c:/root/src/file2/index.tsx' does not exist.", + "File 'c:/root/src/file2/index.d.ts' exist - use it as a module resolution result.", + "======== Module name '../file2' was successfully resolved to 'c:/root/src/file2/index.d.ts'. ========" +] \ No newline at end of file diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution6_node.types b/tests/baselines/reference/pathMappingBasedModuleResolution6_node.types new file mode 100644 index 00000000000..2fd10e8e133 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution6_node.types @@ -0,0 +1,24 @@ +=== c:/root/src/file1.ts === +import {x} from "./project/file3"; +>x : number + +declare function use(x: string); +>use : (x: string) => any +>x : string + +use(x.toFixed()); +>use(x.toFixed()) : any +>use : (x: string) => any +>x.toFixed() : string +>x.toFixed : (fractionDigits?: number) => string +>x : number +>toFixed : (fractionDigits?: number) => string + +=== c:/root/src/file2/index.d.ts === +export let x: number; +>x : number + +=== c:/root/generated/src/project/file3.ts === +export {x} from "../file2"; +>x : number + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution7.js b/tests/baselines/reference/pathMappingBasedModuleResolution7.js deleted file mode 100644 index ef79caaabc0..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution7.js +++ /dev/null @@ -1,44 +0,0 @@ -//// [tests/cases/compiler/pathMappingBasedModuleResolution7.ts] //// - -//// [file1.ts] -import {x} from "folder2/file1" -import {y} from "folder3/file2" -import {z} from "components/file3" - -declare function use(a: any): void; - -use(x.toExponential()); -use(y.toExponential()); -use(z.toExponential()); - -//// [file1.ts] -export var x = 1; - -//// [file2.ts] -export var y = 1; - -//// [file3.ts] -export var z = 1; - -//// [file1.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - exports.x = 1; -}); -//// [file2.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - exports.y = 1; -}); -//// [file3.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - exports.z = 1; -}); -//// [file1.js] -define(["require", "exports", "folder2/file1", "folder3/file2", "components/file3"], function (require, exports, file1_1, file2_1, file3_1) { - "use strict"; - use(file1_1.x.toExponential()); - use(file2_1.y.toExponential()); - use(file3_1.z.toExponential()); -}); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution7.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution7.symbols deleted file mode 100644 index 4b7b9c15739..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution7.symbols +++ /dev/null @@ -1,44 +0,0 @@ -=== tests/cases/compiler/root/folder1/file1.ts === -import {x} from "folder2/file1" ->x : Symbol(x, Decl(file1.ts, 0, 8)) - -import {y} from "folder3/file2" ->y : Symbol(y, Decl(file1.ts, 1, 8)) - -import {z} from "components/file3" ->z : Symbol(z, Decl(file1.ts, 2, 8)) - -declare function use(a: any): void; ->use : Symbol(use, Decl(file1.ts, 2, 34)) ->a : Symbol(a, Decl(file1.ts, 4, 21)) - -use(x.toExponential()); ->use : Symbol(use, Decl(file1.ts, 2, 34)) ->x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) ->x : Symbol(x, Decl(file1.ts, 0, 8)) ->toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) - -use(y.toExponential()); ->use : Symbol(use, Decl(file1.ts, 2, 34)) ->y.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) ->y : Symbol(y, Decl(file1.ts, 1, 8)) ->toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) - -use(z.toExponential()); ->use : Symbol(use, Decl(file1.ts, 2, 34)) ->z.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) ->z : Symbol(z, Decl(file1.ts, 2, 8)) ->toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) - -=== tests/cases/compiler/root/folder2/file1.ts === -export var x = 1; ->x : Symbol(x, Decl(file1.ts, 0, 10)) - -=== tests/cases/compiler/root/generated/folder3/file2.ts === -export var y = 1; ->y : Symbol(y, Decl(file2.ts, 0, 10)) - -=== tests/cases/compiler/root/shared/components/file3.ts === -export var z = 1; ->z : Symbol(z, Decl(file3.ts, 0, 10)) - diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution7.types b/tests/baselines/reference/pathMappingBasedModuleResolution7.types deleted file mode 100644 index 1bc1622b19f..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution7.types +++ /dev/null @@ -1,53 +0,0 @@ -=== tests/cases/compiler/root/folder1/file1.ts === -import {x} from "folder2/file1" ->x : number - -import {y} from "folder3/file2" ->y : number - -import {z} from "components/file3" ->z : number - -declare function use(a: any): void; ->use : (a: any) => void ->a : any - -use(x.toExponential()); ->use(x.toExponential()) : void ->use : (a: any) => void ->x.toExponential() : string ->x.toExponential : (fractionDigits?: number) => string ->x : number ->toExponential : (fractionDigits?: number) => string - -use(y.toExponential()); ->use(y.toExponential()) : void ->use : (a: any) => void ->y.toExponential() : string ->y.toExponential : (fractionDigits?: number) => string ->y : number ->toExponential : (fractionDigits?: number) => string - -use(z.toExponential()); ->use(z.toExponential()) : void ->use : (a: any) => void ->z.toExponential() : string ->z.toExponential : (fractionDigits?: number) => string ->z : number ->toExponential : (fractionDigits?: number) => string - -=== tests/cases/compiler/root/folder2/file1.ts === -export var x = 1; ->x : number ->1 : number - -=== tests/cases/compiler/root/generated/folder3/file2.ts === -export var y = 1; ->y : number ->1 : number - -=== tests/cases/compiler/root/shared/components/file3.ts === -export var z = 1; ->z : number ->1 : number - diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution7_1.js b/tests/baselines/reference/pathMappingBasedModuleResolution7_1.js deleted file mode 100644 index ad2b8ef2a90..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution7_1.js +++ /dev/null @@ -1,44 +0,0 @@ -//// [tests/cases/compiler/pathMappingBasedModuleResolution7_1.ts] //// - -//// [file1.ts] -import {x} from "folder2/file1" -import {y} from "folder3/file2" -import {z} from "components/file3" - -declare function use(a: any): void; - -use(x.toExponential()); -use(y.toExponential()); -use(z.toExponential()); - -//// [file1.ts] -export var x = 1; - -//// [file2.ts] -export var y = 1; - -//// [file3.ts] -export var z = 1; - -//// [file1.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - exports.x = 1; -}); -//// [file2.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - exports.y = 1; -}); -//// [file3.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - exports.z = 1; -}); -//// [file1.js] -define(["require", "exports", "folder2/file1", "folder3/file2", "components/file3"], function (require, exports, file1_1, file2_1, file3_1) { - "use strict"; - use(file1_1.x.toExponential()); - use(file2_1.y.toExponential()); - use(file3_1.z.toExponential()); -}); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution7_1.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution7_1.symbols deleted file mode 100644 index 097f0747b47..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution7_1.symbols +++ /dev/null @@ -1,44 +0,0 @@ -=== c:/root/folder1/file1.ts === -import {x} from "folder2/file1" ->x : Symbol(x, Decl(file1.ts, 0, 8)) - -import {y} from "folder3/file2" ->y : Symbol(y, Decl(file1.ts, 1, 8)) - -import {z} from "components/file3" ->z : Symbol(z, Decl(file1.ts, 2, 8)) - -declare function use(a: any): void; ->use : Symbol(use, Decl(file1.ts, 2, 34)) ->a : Symbol(a, Decl(file1.ts, 4, 21)) - -use(x.toExponential()); ->use : Symbol(use, Decl(file1.ts, 2, 34)) ->x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) ->x : Symbol(x, Decl(file1.ts, 0, 8)) ->toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) - -use(y.toExponential()); ->use : Symbol(use, Decl(file1.ts, 2, 34)) ->y.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) ->y : Symbol(y, Decl(file1.ts, 1, 8)) ->toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) - -use(z.toExponential()); ->use : Symbol(use, Decl(file1.ts, 2, 34)) ->z.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) ->z : Symbol(z, Decl(file1.ts, 2, 8)) ->toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) - -=== c:/root/folder2/file1.ts === -export var x = 1; ->x : Symbol(x, Decl(file1.ts, 0, 10)) - -=== c:/root/generated/folder3/file2.ts === -export var y = 1; ->y : Symbol(y, Decl(file2.ts, 0, 10)) - -=== c:/root/shared/components/file3.ts === -export var z = 1; ->z : Symbol(z, Decl(file3.ts, 0, 10)) - diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution7_1.types b/tests/baselines/reference/pathMappingBasedModuleResolution7_1.types deleted file mode 100644 index 9cc451eaa3b..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution7_1.types +++ /dev/null @@ -1,53 +0,0 @@ -=== c:/root/folder1/file1.ts === -import {x} from "folder2/file1" ->x : number - -import {y} from "folder3/file2" ->y : number - -import {z} from "components/file3" ->z : number - -declare function use(a: any): void; ->use : (a: any) => void ->a : any - -use(x.toExponential()); ->use(x.toExponential()) : void ->use : (a: any) => void ->x.toExponential() : string ->x.toExponential : (fractionDigits?: number) => string ->x : number ->toExponential : (fractionDigits?: number) => string - -use(y.toExponential()); ->use(y.toExponential()) : void ->use : (a: any) => void ->y.toExponential() : string ->y.toExponential : (fractionDigits?: number) => string ->y : number ->toExponential : (fractionDigits?: number) => string - -use(z.toExponential()); ->use(z.toExponential()) : void ->use : (a: any) => void ->z.toExponential() : string ->z.toExponential : (fractionDigits?: number) => string ->z : number ->toExponential : (fractionDigits?: number) => string - -=== c:/root/folder2/file1.ts === -export var x = 1; ->x : number ->1 : number - -=== c:/root/generated/folder3/file2.ts === -export var y = 1; ->y : number ->1 : number - -=== c:/root/shared/components/file3.ts === -export var z = 1; ->z : number ->1 : number - diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution7_classic.js b/tests/baselines/reference/pathMappingBasedModuleResolution7_classic.js new file mode 100644 index 00000000000..5670f41be0f --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution7_classic.js @@ -0,0 +1,45 @@ +//// [tests/cases/compiler/pathMappingBasedModuleResolution7_classic.ts] //// + +//// [file1.ts] +import {x} from "./project/file2"; +import {y} from "module3"; + +declare function use(x: string); +use(x.toFixed()); +use(y.toFixed()); + +//// [file2.ts] +import {a} from "module1"; +import {b} from "templates/module2"; +import {x as c} from "../file3"; +export let x = a + b + c; + +//// [module1.d.ts] +export let a: number + +//// [module2.ts] +export let b: number; + +//// [file3.d.ts] +export let x: number; + +//// [module3.d.ts] +export let y: number; + + + +//// [module2.js] +define(["require", "exports"], function (require, exports) { + "use strict"; +}); +//// [file2.js] +define(["require", "exports", "module1", "templates/module2", "../file3"], function (require, exports, module1_1, module2_1, file3_1) { + "use strict"; + exports.x = module1_1.a + module2_1.b + file3_1.x; +}); +//// [file1.js] +define(["require", "exports", "./project/file2", "module3"], function (require, exports, file2_1, module3_1) { + "use strict"; + use(file2_1.x.toFixed()); + use(module3_1.y.toFixed()); +}); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution7_classic.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution7_classic.symbols new file mode 100644 index 00000000000..b1e4751c495 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution7_classic.symbols @@ -0,0 +1,57 @@ +=== c:/root/src/file1.ts === +import {x} from "./project/file2"; +>x : Symbol(x, Decl(file1.ts, 0, 8)) + +import {y} from "module3"; +>y : Symbol(y, Decl(file1.ts, 1, 8)) + +declare function use(x: string); +>use : Symbol(use, Decl(file1.ts, 1, 26)) +>x : Symbol(x, Decl(file1.ts, 3, 21)) + +use(x.toFixed()); +>use : Symbol(use, Decl(file1.ts, 1, 26)) +>x.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(file1.ts, 0, 8)) +>toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) + +use(y.toFixed()); +>use : Symbol(use, Decl(file1.ts, 1, 26)) +>y.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) +>y : Symbol(y, Decl(file1.ts, 1, 8)) +>toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) + +=== c:/root/generated/src/project/file2.ts === +import {a} from "module1"; +>a : Symbol(a, Decl(file2.ts, 0, 8)) + +import {b} from "templates/module2"; +>b : Symbol(b, Decl(file2.ts, 1, 8)) + +import {x as c} from "../file3"; +>x : Symbol(c, Decl(file2.ts, 2, 8)) +>c : Symbol(c, Decl(file2.ts, 2, 8)) + +export let x = a + b + c; +>x : Symbol(x, Decl(file2.ts, 3, 10)) +>a : Symbol(a, Decl(file2.ts, 0, 8)) +>b : Symbol(b, Decl(file2.ts, 1, 8)) +>c : Symbol(c, Decl(file2.ts, 2, 8)) + +=== c:/shared/module1.d.ts === +export let a: number +>a : Symbol(a, Decl(module1.d.ts, 0, 10)) + +=== c:/root/generated/src/templates/module2.ts === +export let b: number; +>b : Symbol(b, Decl(module2.ts, 0, 10)) + +=== c:/root/src/file3.d.ts === +export let x: number; +>x : Symbol(x, Decl(file3.d.ts, 0, 10)) + +=== c:/module3.d.ts === +export let y: number; +>y : Symbol(y, Decl(module3.d.ts, 0, 10)) + + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution7_classic.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution7_classic.trace.json new file mode 100644 index 00000000000..8242f8fb442 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution7_classic.trace.json @@ -0,0 +1,77 @@ +[ + "======== Resolving module './project/file2' from 'c:/root/src/file1.ts'. ========", + "Module resolution kind is not specified, using 'Classic'.", + "'rootDirs' option is set, using it to resolve relative module name './project/file2'", + "Checking if 'c:/root/src/' is the longest matching prefix for 'c:/root/src/project/file2' - 'true'.", + "Checking if 'c:/root/generated/src/' is the longest matching prefix for 'c:/root/src/project/file2' - 'false'.", + "Longest matching prefix for 'c:/root/src/project/file2' is 'c:/root/src/'", + "Loading 'project/file2' from the root dir 'c:/root/src/', candidate location 'c:/root/src/project/file2'", + "File 'c:/root/src/project/file2.ts' does not exist.", + "File 'c:/root/src/project/file2.tsx' does not exist.", + "File 'c:/root/src/project/file2.d.ts' does not exist.", + "Trying other entries in 'rootDirs'", + "Loading 'project/file2' from the root dir 'c:/root/generated/src', candidate location 'c:/root/generated/src/project/file2'", + "File 'c:/root/generated/src/project/file2.ts' exist - use it as a module resolution result.", + "======== Module name './project/file2' was successfully resolved to 'c:/root/generated/src/project/file2.ts'. ========", + "======== Resolving module 'module3' from 'c:/root/src/file1.ts'. ========", + "Module resolution kind is not specified, using 'Classic'.", + "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'module3'", + "'paths' option is specified, looking for a pattern to match module name 'module3'.", + "Module name 'module3', matched pattern '*'.", + "Trying substitution '*', candidate module location: 'module3'.", + "File 'c:/root/module3.ts' does not exist.", + "File 'c:/root/module3.tsx' does not exist.", + "File 'c:/root/module3.d.ts' does not exist.", + "Trying substitution 'c:/shared/*', candidate module location: 'c:/shared/module3'.", + "File 'c:/shared/module3.ts' does not exist.", + "File 'c:/shared/module3.tsx' does not exist.", + "File 'c:/shared/module3.d.ts' does not exist.", + "File 'c:/root/src/module3.ts' does not exist.", + "File 'c:/root/src/module3.tsx' does not exist.", + "File 'c:/root/src/module3.d.ts' does not exist.", + "File 'c:/root/module3.ts' does not exist.", + "File 'c:/root/module3.tsx' does not exist.", + "File 'c:/root/module3.d.ts' does not exist.", + "File 'c:/module3.ts' does not exist.", + "File 'c:/module3.tsx' does not exist.", + "File 'c:/module3.d.ts' exist - use it as a module resolution result.", + "======== Module name 'module3' was successfully resolved to 'c:/module3.d.ts'. ========", + "======== Resolving module 'module1' from 'c:/root/generated/src/project/file2.ts'. ========", + "Module resolution kind is not specified, using 'Classic'.", + "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'module1'", + "'paths' option is specified, looking for a pattern to match module name 'module1'.", + "Module name 'module1', matched pattern '*'.", + "Trying substitution '*', candidate module location: 'module1'.", + "File 'c:/root/module1.ts' does not exist.", + "File 'c:/root/module1.tsx' does not exist.", + "File 'c:/root/module1.d.ts' does not exist.", + "Trying substitution 'c:/shared/*', candidate module location: 'c:/shared/module1'.", + "File 'c:/shared/module1.ts' does not exist.", + "File 'c:/shared/module1.tsx' does not exist.", + "File 'c:/shared/module1.d.ts' exist - use it as a module resolution result.", + "======== Module name 'module1' was successfully resolved to 'c:/shared/module1.d.ts'. ========", + "======== Resolving module 'templates/module2' from 'c:/root/generated/src/project/file2.ts'. ========", + "Module resolution kind is not specified, using 'Classic'.", + "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'templates/module2'", + "'paths' option is specified, looking for a pattern to match module name 'templates/module2'.", + "Module name 'templates/module2', matched pattern 'templates/*'.", + "Trying substitution 'generated/src/templates/*', candidate module location: 'generated/src/templates/module2'.", + "File 'c:/root/generated/src/templates/module2.ts' exist - use it as a module resolution result.", + "======== Module name 'templates/module2' was successfully resolved to 'c:/root/generated/src/templates/module2.ts'. ========", + "======== Resolving module '../file3' from 'c:/root/generated/src/project/file2.ts'. ========", + "Module resolution kind is not specified, using 'Classic'.", + "'rootDirs' option is set, using it to resolve relative module name '../file3'", + "Checking if 'c:/root/src/' is the longest matching prefix for 'c:/root/generated/src/file3' - 'false'.", + "Checking if 'c:/root/generated/src/' is the longest matching prefix for 'c:/root/generated/src/file3' - 'true'.", + "Longest matching prefix for 'c:/root/generated/src/file3' is 'c:/root/generated/src/'", + "Loading 'file3' from the root dir 'c:/root/generated/src/', candidate location 'c:/root/generated/src/file3'", + "File 'c:/root/generated/src/file3.ts' does not exist.", + "File 'c:/root/generated/src/file3.tsx' does not exist.", + "File 'c:/root/generated/src/file3.d.ts' does not exist.", + "Trying other entries in 'rootDirs'", + "Loading 'file3' from the root dir 'c:/root/src', candidate location 'c:/root/src/file3'", + "File 'c:/root/src/file3.ts' does not exist.", + "File 'c:/root/src/file3.tsx' does not exist.", + "File 'c:/root/src/file3.d.ts' exist - use it as a module resolution result.", + "======== Module name '../file3' was successfully resolved to 'c:/root/src/file3.d.ts'. ========" +] \ No newline at end of file diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution7_classic.types b/tests/baselines/reference/pathMappingBasedModuleResolution7_classic.types new file mode 100644 index 00000000000..26c4b425c88 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution7_classic.types @@ -0,0 +1,63 @@ +=== c:/root/src/file1.ts === +import {x} from "./project/file2"; +>x : number + +import {y} from "module3"; +>y : number + +declare function use(x: string); +>use : (x: string) => any +>x : string + +use(x.toFixed()); +>use(x.toFixed()) : any +>use : (x: string) => any +>x.toFixed() : string +>x.toFixed : (fractionDigits?: number) => string +>x : number +>toFixed : (fractionDigits?: number) => string + +use(y.toFixed()); +>use(y.toFixed()) : any +>use : (x: string) => any +>y.toFixed() : string +>y.toFixed : (fractionDigits?: number) => string +>y : number +>toFixed : (fractionDigits?: number) => string + +=== c:/root/generated/src/project/file2.ts === +import {a} from "module1"; +>a : number + +import {b} from "templates/module2"; +>b : number + +import {x as c} from "../file3"; +>x : number +>c : number + +export let x = a + b + c; +>x : number +>a + b + c : number +>a + b : number +>a : number +>b : number +>c : number + +=== c:/shared/module1.d.ts === +export let a: number +>a : number + +=== c:/root/generated/src/templates/module2.ts === +export let b: number; +>b : number + +=== c:/root/src/file3.d.ts === +export let x: number; +>x : number + +=== c:/module3.d.ts === +export let y: number; +>y : number + + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution7_node.js b/tests/baselines/reference/pathMappingBasedModuleResolution7_node.js new file mode 100644 index 00000000000..3be48cfc85c --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution7_node.js @@ -0,0 +1,44 @@ +//// [tests/cases/compiler/pathMappingBasedModuleResolution7_node.ts] //// + +//// [file1.ts] +import {x} from "./project/file2"; +import {y} from "module3"; + +declare function use(x: string); +use(x.toFixed()); +use(y.toFixed()); + +//// [file2.ts] +import {a} from "module1"; +import {b} from "templates/module2"; +import {x as c} from "../file3"; +export let x = a + b + c; + +//// [index.d.ts] +export let a: number + +//// [module2.ts] +export let b: number; + +//// [index.d.ts] +export let x: number; + +//// [module3.d.ts] +export let y: number; + + + +//// [module2.js] +"use strict"; +//// [file2.js] +"use strict"; +var module1_1 = require("module1"); +var module2_1 = require("templates/module2"); +var file3_1 = require("../file3"); +exports.x = module1_1.a + module2_1.b + file3_1.x; +//// [file1.js] +"use strict"; +var file2_1 = require("./project/file2"); +var module3_1 = require("module3"); +use(file2_1.x.toFixed()); +use(module3_1.y.toFixed()); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution7_node.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution7_node.symbols new file mode 100644 index 00000000000..9cda76790ea --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution7_node.symbols @@ -0,0 +1,57 @@ +=== c:/root/src/file1.ts === +import {x} from "./project/file2"; +>x : Symbol(x, Decl(file1.ts, 0, 8)) + +import {y} from "module3"; +>y : Symbol(y, Decl(file1.ts, 1, 8)) + +declare function use(x: string); +>use : Symbol(use, Decl(file1.ts, 1, 26)) +>x : Symbol(x, Decl(file1.ts, 3, 21)) + +use(x.toFixed()); +>use : Symbol(use, Decl(file1.ts, 1, 26)) +>x.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(file1.ts, 0, 8)) +>toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) + +use(y.toFixed()); +>use : Symbol(use, Decl(file1.ts, 1, 26)) +>y.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) +>y : Symbol(y, Decl(file1.ts, 1, 8)) +>toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) + +=== c:/root/generated/src/project/file2.ts === +import {a} from "module1"; +>a : Symbol(a, Decl(file2.ts, 0, 8)) + +import {b} from "templates/module2"; +>b : Symbol(b, Decl(file2.ts, 1, 8)) + +import {x as c} from "../file3"; +>x : Symbol(c, Decl(file2.ts, 2, 8)) +>c : Symbol(c, Decl(file2.ts, 2, 8)) + +export let x = a + b + c; +>x : Symbol(x, Decl(file2.ts, 3, 10)) +>a : Symbol(a, Decl(file2.ts, 0, 8)) +>b : Symbol(b, Decl(file2.ts, 1, 8)) +>c : Symbol(c, Decl(file2.ts, 2, 8)) + +=== c:/shared/module1/index.d.ts === +export let a: number +>a : Symbol(a, Decl(index.d.ts, 0, 10)) + +=== c:/root/generated/src/templates/module2.ts === +export let b: number; +>b : Symbol(b, Decl(module2.ts, 0, 10)) + +=== c:/root/src/file3/index.d.ts === +export let x: number; +>x : Symbol(x, Decl(index.d.ts, 0, 10)) + +=== c:/node_modules/module3.d.ts === +export let y: number; +>y : Symbol(y, Decl(module3.d.ts, 0, 10)) + + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution7_node.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution7_node.trace.json new file mode 100644 index 00000000000..39d5c25c92a --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution7_node.trace.json @@ -0,0 +1,123 @@ +[ + "======== Resolving module './project/file2' from 'c:/root/src/file1.ts'. ========", + "Module resolution kind is not specified, using 'NodeJs'.", + "'rootDirs' option is set, using it to resolve relative module name './project/file2'", + "Checking if 'c:/root/src/' is the longest matching prefix for 'c:/root/src/project/file2' - 'true'.", + "Checking if 'c:/root/generated/src/' is the longest matching prefix for 'c:/root/src/project/file2' - 'false'.", + "Longest matching prefix for 'c:/root/src/project/file2' is 'c:/root/src/'", + "Loading 'project/file2' from the root dir 'c:/root/src/', candidate location 'c:/root/src/project/file2'", + "Loading module as file / folder, candidate module location 'c:/root/src/project/file2'.", + "File 'c:/root/src/project/file2.ts' does not exist.", + "File 'c:/root/src/project/file2.tsx' does not exist.", + "File 'c:/root/src/project/file2.d.ts' does not exist.", + "File 'c:/root/src/project/file2/package.json' does not exist.", + "File 'c:/root/src/project/file2/index.ts' does not exist.", + "File 'c:/root/src/project/file2/index.tsx' does not exist.", + "File 'c:/root/src/project/file2/index.d.ts' does not exist.", + "Trying other entries in 'rootDirs'", + "Loading 'project/file2' from the root dir 'c:/root/generated/src', candidate location 'c:/root/generated/src/project/file2'", + "Loading module as file / folder, candidate module location 'c:/root/generated/src/project/file2'.", + "File 'c:/root/generated/src/project/file2.ts' exist - use it as a module resolution result.", + "======== Module name './project/file2' was successfully resolved to 'c:/root/generated/src/project/file2.ts'. ========", + "======== Resolving module 'module3' from 'c:/root/src/file1.ts'. ========", + "Module resolution kind is not specified, using 'NodeJs'.", + "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'module3'", + "'paths' option is specified, looking for a pattern to match module name 'module3'.", + "Module name 'module3', matched pattern '*'.", + "Trying substitution '*', candidate module location: 'module3'.", + "Loading module as file / folder, candidate module location 'c:/root/module3'.", + "File 'c:/root/module3.ts' does not exist.", + "File 'c:/root/module3.tsx' does not exist.", + "File 'c:/root/module3.d.ts' does not exist.", + "File 'c:/root/module3/package.json' does not exist.", + "File 'c:/root/module3/index.ts' does not exist.", + "File 'c:/root/module3/index.tsx' does not exist.", + "File 'c:/root/module3/index.d.ts' does not exist.", + "Trying substitution 'c:/shared/*', candidate module location: 'c:/shared/module3'.", + "Loading module as file / folder, candidate module location 'c:/shared/module3'.", + "File 'c:/shared/module3.ts' does not exist.", + "File 'c:/shared/module3.tsx' does not exist.", + "File 'c:/shared/module3.d.ts' does not exist.", + "File 'c:/shared/module3/package.json' does not exist.", + "File 'c:/shared/module3/index.ts' does not exist.", + "File 'c:/shared/module3/index.tsx' does not exist.", + "File 'c:/shared/module3/index.d.ts' does not exist.", + "Loading module 'module3' from 'node_modules' folder.", + "File 'c:/root/src/node_modules/module3.ts' does not exist.", + "File 'c:/root/src/node_modules/module3.tsx' does not exist.", + "File 'c:/root/src/node_modules/module3.d.ts' does not exist.", + "File 'c:/root/src/node_modules/module3/package.json' does not exist.", + "File 'c:/root/src/node_modules/module3/index.ts' does not exist.", + "File 'c:/root/src/node_modules/module3/index.tsx' does not exist.", + "File 'c:/root/src/node_modules/module3/index.d.ts' does not exist.", + "File 'c:/root/node_modules/module3.ts' does not exist.", + "File 'c:/root/node_modules/module3.tsx' does not exist.", + "File 'c:/root/node_modules/module3.d.ts' does not exist.", + "File 'c:/root/node_modules/module3/package.json' does not exist.", + "File 'c:/root/node_modules/module3/index.ts' does not exist.", + "File 'c:/root/node_modules/module3/index.tsx' does not exist.", + "File 'c:/root/node_modules/module3/index.d.ts' does not exist.", + "File 'c:/node_modules/module3.ts' does not exist.", + "File 'c:/node_modules/module3.tsx' does not exist.", + "File 'c:/node_modules/module3.d.ts' exist - use it as a module resolution result.", + "======== Module name 'module3' was successfully resolved to 'c:/node_modules/module3.d.ts'. ========", + "======== Resolving module 'module1' from 'c:/root/generated/src/project/file2.ts'. ========", + "Module resolution kind is not specified, using 'NodeJs'.", + "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'module1'", + "'paths' option is specified, looking for a pattern to match module name 'module1'.", + "Module name 'module1', matched pattern '*'.", + "Trying substitution '*', candidate module location: 'module1'.", + "Loading module as file / folder, candidate module location 'c:/root/module1'.", + "File 'c:/root/module1.ts' does not exist.", + "File 'c:/root/module1.tsx' does not exist.", + "File 'c:/root/module1.d.ts' does not exist.", + "File 'c:/root/module1/package.json' does not exist.", + "File 'c:/root/module1/index.ts' does not exist.", + "File 'c:/root/module1/index.tsx' does not exist.", + "File 'c:/root/module1/index.d.ts' does not exist.", + "Trying substitution 'c:/shared/*', candidate module location: 'c:/shared/module1'.", + "Loading module as file / folder, candidate module location 'c:/shared/module1'.", + "File 'c:/shared/module1.ts' does not exist.", + "File 'c:/shared/module1.tsx' does not exist.", + "File 'c:/shared/module1.d.ts' does not exist.", + "File 'c:/shared/module1/package.json' does not exist.", + "File 'c:/shared/module1/index.ts' does not exist.", + "File 'c:/shared/module1/index.tsx' does not exist.", + "File 'c:/shared/module1/index.d.ts' exist - use it as a module resolution result.", + "======== Module name 'module1' was successfully resolved to 'c:/shared/module1/index.d.ts'. ========", + "======== Resolving module 'templates/module2' from 'c:/root/generated/src/project/file2.ts'. ========", + "Module resolution kind is not specified, using 'NodeJs'.", + "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'templates/module2'", + "'paths' option is specified, looking for a pattern to match module name 'templates/module2'.", + "Module name 'templates/module2', matched pattern 'templates/*'.", + "Trying substitution 'generated/src/templates/*', candidate module location: 'generated/src/templates/module2'.", + "Loading module as file / folder, candidate module location 'c:/root/generated/src/templates/module2'.", + "File 'c:/root/generated/src/templates/module2.ts' exist - use it as a module resolution result.", + "======== Module name 'templates/module2' was successfully resolved to 'c:/root/generated/src/templates/module2.ts'. ========", + "======== Resolving module '../file3' from 'c:/root/generated/src/project/file2.ts'. ========", + "Module resolution kind is not specified, using 'NodeJs'.", + "'rootDirs' option is set, using it to resolve relative module name '../file3'", + "Checking if 'c:/root/src/' is the longest matching prefix for 'c:/root/generated/src/file3' - 'false'.", + "Checking if 'c:/root/generated/src/' is the longest matching prefix for 'c:/root/generated/src/file3' - 'true'.", + "Longest matching prefix for 'c:/root/generated/src/file3' is 'c:/root/generated/src/'", + "Loading 'file3' from the root dir 'c:/root/generated/src/', candidate location 'c:/root/generated/src/file3'", + "Loading module as file / folder, candidate module location 'c:/root/generated/src/file3'.", + "File 'c:/root/generated/src/file3.ts' does not exist.", + "File 'c:/root/generated/src/file3.tsx' does not exist.", + "File 'c:/root/generated/src/file3.d.ts' does not exist.", + "File 'c:/root/generated/src/file3/package.json' does not exist.", + "File 'c:/root/generated/src/file3/index.ts' does not exist.", + "File 'c:/root/generated/src/file3/index.tsx' does not exist.", + "File 'c:/root/generated/src/file3/index.d.ts' does not exist.", + "Trying other entries in 'rootDirs'", + "Loading 'file3' from the root dir 'c:/root/src', candidate location 'c:/root/src/file3'", + "Loading module as file / folder, candidate module location 'c:/root/src/file3'.", + "File 'c:/root/src/file3.ts' does not exist.", + "File 'c:/root/src/file3.tsx' does not exist.", + "File 'c:/root/src/file3.d.ts' does not exist.", + "File 'c:/root/src/file3/package.json' does not exist.", + "File 'c:/root/src/file3/index.ts' does not exist.", + "File 'c:/root/src/file3/index.tsx' does not exist.", + "File 'c:/root/src/file3/index.d.ts' exist - use it as a module resolution result.", + "======== Module name '../file3' was successfully resolved to 'c:/root/src/file3/index.d.ts'. ========" +] \ No newline at end of file diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution7_node.types b/tests/baselines/reference/pathMappingBasedModuleResolution7_node.types new file mode 100644 index 00000000000..974f710b4c2 --- /dev/null +++ b/tests/baselines/reference/pathMappingBasedModuleResolution7_node.types @@ -0,0 +1,63 @@ +=== c:/root/src/file1.ts === +import {x} from "./project/file2"; +>x : number + +import {y} from "module3"; +>y : number + +declare function use(x: string); +>use : (x: string) => any +>x : string + +use(x.toFixed()); +>use(x.toFixed()) : any +>use : (x: string) => any +>x.toFixed() : string +>x.toFixed : (fractionDigits?: number) => string +>x : number +>toFixed : (fractionDigits?: number) => string + +use(y.toFixed()); +>use(y.toFixed()) : any +>use : (x: string) => any +>y.toFixed() : string +>y.toFixed : (fractionDigits?: number) => string +>y : number +>toFixed : (fractionDigits?: number) => string + +=== c:/root/generated/src/project/file2.ts === +import {a} from "module1"; +>a : number + +import {b} from "templates/module2"; +>b : number + +import {x as c} from "../file3"; +>x : number +>c : number + +export let x = a + b + c; +>x : number +>a + b + c : number +>a + b : number +>a : number +>b : number +>c : number + +=== c:/shared/module1/index.d.ts === +export let a: number +>a : number + +=== c:/root/generated/src/templates/module2.ts === +export let b: number; +>b : number + +=== c:/root/src/file3/index.d.ts === +export let x: number; +>x : number + +=== c:/node_modules/module3.d.ts === +export let y: number; +>y : number + + diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution8.js b/tests/baselines/reference/pathMappingBasedModuleResolution8.js deleted file mode 100644 index ba2f37bdc71..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution8.js +++ /dev/null @@ -1,44 +0,0 @@ -//// [tests/cases/compiler/pathMappingBasedModuleResolution8.ts] //// - -//// [file1.ts] -import {x} from "folder2/file1" -import {y} from "folder3/file2" -import {z} from "components/file3" - -declare function use(a: any): void; - -use(x.toExponential()); -use(y.toExponential()); -use(z.toExponential()); - -//// [file1.ts] -export var x = 1; - -//// [file2.ts] -export var y = 1; - -//// [file3.ts] -export var z = 1; - -//// [file1.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - exports.x = 1; -}); -//// [file2.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - exports.y = 1; -}); -//// [file3.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - exports.z = 1; -}); -//// [file1.js] -define(["require", "exports", "folder2/file1", "folder3/file2", "components/file3"], function (require, exports, file1_1, file2_1, file3_1) { - "use strict"; - use(file1_1.x.toExponential()); - use(file2_1.y.toExponential()); - use(file3_1.z.toExponential()); -}); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution8.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution8.symbols deleted file mode 100644 index 214b1d30ba8..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution8.symbols +++ /dev/null @@ -1,44 +0,0 @@ -=== tests/cases/compiler/root/folder1/file1.ts === -import {x} from "folder2/file1" ->x : Symbol(x, Decl(file1.ts, 0, 8)) - -import {y} from "folder3/file2" ->y : Symbol(y, Decl(file1.ts, 1, 8)) - -import {z} from "components/file3" ->z : Symbol(z, Decl(file1.ts, 2, 8)) - -declare function use(a: any): void; ->use : Symbol(use, Decl(file1.ts, 2, 34)) ->a : Symbol(a, Decl(file1.ts, 4, 21)) - -use(x.toExponential()); ->use : Symbol(use, Decl(file1.ts, 2, 34)) ->x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) ->x : Symbol(x, Decl(file1.ts, 0, 8)) ->toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) - -use(y.toExponential()); ->use : Symbol(use, Decl(file1.ts, 2, 34)) ->y.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) ->y : Symbol(y, Decl(file1.ts, 1, 8)) ->toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) - -use(z.toExponential()); ->use : Symbol(use, Decl(file1.ts, 2, 34)) ->z.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) ->z : Symbol(z, Decl(file1.ts, 2, 8)) ->toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) - -=== tests/cases/compiler/root/src/folder2/file1.ts === -export var x = 1; ->x : Symbol(x, Decl(file1.ts, 0, 10)) - -=== tests/cases/compiler/root/src/generated/folder3/file2.ts === -export var y = 1; ->y : Symbol(y, Decl(file2.ts, 0, 10)) - -=== tests/cases/compiler/root/src/shared/components/file3.ts === -export var z = 1; ->z : Symbol(z, Decl(file3.ts, 0, 10)) - diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution8.types b/tests/baselines/reference/pathMappingBasedModuleResolution8.types deleted file mode 100644 index 5938d95ee03..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution8.types +++ /dev/null @@ -1,53 +0,0 @@ -=== tests/cases/compiler/root/folder1/file1.ts === -import {x} from "folder2/file1" ->x : number - -import {y} from "folder3/file2" ->y : number - -import {z} from "components/file3" ->z : number - -declare function use(a: any): void; ->use : (a: any) => void ->a : any - -use(x.toExponential()); ->use(x.toExponential()) : void ->use : (a: any) => void ->x.toExponential() : string ->x.toExponential : (fractionDigits?: number) => string ->x : number ->toExponential : (fractionDigits?: number) => string - -use(y.toExponential()); ->use(y.toExponential()) : void ->use : (a: any) => void ->y.toExponential() : string ->y.toExponential : (fractionDigits?: number) => string ->y : number ->toExponential : (fractionDigits?: number) => string - -use(z.toExponential()); ->use(z.toExponential()) : void ->use : (a: any) => void ->z.toExponential() : string ->z.toExponential : (fractionDigits?: number) => string ->z : number ->toExponential : (fractionDigits?: number) => string - -=== tests/cases/compiler/root/src/folder2/file1.ts === -export var x = 1; ->x : number ->1 : number - -=== tests/cases/compiler/root/src/generated/folder3/file2.ts === -export var y = 1; ->y : number ->1 : number - -=== tests/cases/compiler/root/src/shared/components/file3.ts === -export var z = 1; ->z : number ->1 : number - diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution8_1.js b/tests/baselines/reference/pathMappingBasedModuleResolution8_1.js deleted file mode 100644 index 1aa0d19a29d..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution8_1.js +++ /dev/null @@ -1,55 +0,0 @@ -//// [tests/cases/compiler/pathMappingBasedModuleResolution8_1.ts] //// - -//// [file1.ts] -import {x} from "folder2/file1" -import {y} from "folder3/file2" -import {z} from "components/file3" -import {z1} from "file4" - -declare function use(a: any): void; - -use(x.toExponential()); -use(y.toExponential()); -use(z.toExponential()); -use(z1.toExponential()); - -//// [file1.ts] -export var x = 1; - -//// [file2.ts] -export var y = 1; - -//// [file3.ts] -export var z = 1; - -//// [file4.ts] -export var z1 = 1; - -//// [file1.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - exports.x = 1; -}); -//// [file2.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - exports.y = 1; -}); -//// [file3.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - exports.z = 1; -}); -//// [file4.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - exports.z1 = 1; -}); -//// [file1.js] -define(["require", "exports", "folder2/file1", "folder3/file2", "components/file3", "file4"], function (require, exports, file1_1, file2_1, file3_1, file4_1) { - "use strict"; - use(file1_1.x.toExponential()); - use(file2_1.y.toExponential()); - use(file3_1.z.toExponential()); - use(file4_1.z1.toExponential()); -}); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution9.js b/tests/baselines/reference/pathMappingBasedModuleResolution9.js deleted file mode 100644 index 57e53934eed..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution9.js +++ /dev/null @@ -1,52 +0,0 @@ -//// [tests/cases/compiler/pathMappingBasedModuleResolution9.ts] //// - -//// [file1.ts] -import {x} from "folder2/file1" -import {y} from "folder3/file2" -import {z} from "components/file3" - -declare function use(a: any): void; - -use(x.toExponential()); -use(y.toExponential()); -use(z.toExponential()); - -//// [file1.ts] -export var x = 1; - -//// [file2.ts] -export var y = 1; - -//// [file3.ts] -export {z} from "./file4" - -//// [file4.ts] -export var z = 1; - -//// [file1.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - exports.x = 1; -}); -//// [file2.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - exports.y = 1; -}); -//// [file4.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - exports.z = 1; -}); -//// [file3.js] -define(["require", "exports", "./file4"], function (require, exports, file4_1) { - "use strict"; - exports.z = file4_1.z; -}); -//// [file1.js] -define(["require", "exports", "folder2/file1", "folder3/file2", "components/file3"], function (require, exports, file1_1, file2_1, file3_1) { - "use strict"; - use(file1_1.x.toExponential()); - use(file2_1.y.toExponential()); - use(file3_1.z.toExponential()); -}); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution9.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution9.symbols deleted file mode 100644 index 764f878b293..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution9.symbols +++ /dev/null @@ -1,48 +0,0 @@ -=== tests/cases/compiler/root/folder1/file1.ts === -import {x} from "folder2/file1" ->x : Symbol(x, Decl(file1.ts, 0, 8)) - -import {y} from "folder3/file2" ->y : Symbol(y, Decl(file1.ts, 1, 8)) - -import {z} from "components/file3" ->z : Symbol(z, Decl(file1.ts, 2, 8)) - -declare function use(a: any): void; ->use : Symbol(use, Decl(file1.ts, 2, 34)) ->a : Symbol(a, Decl(file1.ts, 4, 21)) - -use(x.toExponential()); ->use : Symbol(use, Decl(file1.ts, 2, 34)) ->x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) ->x : Symbol(x, Decl(file1.ts, 0, 8)) ->toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) - -use(y.toExponential()); ->use : Symbol(use, Decl(file1.ts, 2, 34)) ->y.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) ->y : Symbol(y, Decl(file1.ts, 1, 8)) ->toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) - -use(z.toExponential()); ->use : Symbol(use, Decl(file1.ts, 2, 34)) ->z.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) ->z : Symbol(z, Decl(file1.ts, 2, 8)) ->toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) - -=== tests/cases/compiler/root/src/folder2/file1.ts === -export var x = 1; ->x : Symbol(x, Decl(file1.ts, 0, 10)) - -=== tests/cases/compiler/root/src/generated/folder3/file2.ts === -export var y = 1; ->y : Symbol(y, Decl(file2.ts, 0, 10)) - -=== tests/cases/compiler/root/src/shared/components/file3.ts === -export {z} from "./file4" ->z : Symbol(z, Decl(file3.ts, 0, 8)) - -=== tests/cases/compiler/root/src/shared/components/file4.ts === -export var z = 1; ->z : Symbol(z, Decl(file4.ts, 0, 10)) - diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution9.types b/tests/baselines/reference/pathMappingBasedModuleResolution9.types deleted file mode 100644 index 789e8d050b1..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution9.types +++ /dev/null @@ -1,57 +0,0 @@ -=== tests/cases/compiler/root/folder1/file1.ts === -import {x} from "folder2/file1" ->x : number - -import {y} from "folder3/file2" ->y : number - -import {z} from "components/file3" ->z : number - -declare function use(a: any): void; ->use : (a: any) => void ->a : any - -use(x.toExponential()); ->use(x.toExponential()) : void ->use : (a: any) => void ->x.toExponential() : string ->x.toExponential : (fractionDigits?: number) => string ->x : number ->toExponential : (fractionDigits?: number) => string - -use(y.toExponential()); ->use(y.toExponential()) : void ->use : (a: any) => void ->y.toExponential() : string ->y.toExponential : (fractionDigits?: number) => string ->y : number ->toExponential : (fractionDigits?: number) => string - -use(z.toExponential()); ->use(z.toExponential()) : void ->use : (a: any) => void ->z.toExponential() : string ->z.toExponential : (fractionDigits?: number) => string ->z : number ->toExponential : (fractionDigits?: number) => string - -=== tests/cases/compiler/root/src/folder2/file1.ts === -export var x = 1; ->x : number ->1 : number - -=== tests/cases/compiler/root/src/generated/folder3/file2.ts === -export var y = 1; ->y : number ->1 : number - -=== tests/cases/compiler/root/src/shared/components/file3.ts === -export {z} from "./file4" ->z : number - -=== tests/cases/compiler/root/src/shared/components/file4.ts === -export var z = 1; ->z : number ->1 : number - diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution9_1.js b/tests/baselines/reference/pathMappingBasedModuleResolution9_1.js deleted file mode 100644 index ff719ebc2be..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution9_1.js +++ /dev/null @@ -1,63 +0,0 @@ -//// [tests/cases/compiler/pathMappingBasedModuleResolution9_1.ts] //// - -//// [file1.ts] -import {x} from "folder2/file1" -import {y} from "folder3/file2" -import {z} from "components/file3" -import {z1} from "my/file4" - -declare function use(a: any): void; - -use(x.toExponential()); -use(y.toExponential()); -use(z.toExponential()); -use(z1.toExponential()); - -//// [file1.ts] -export var x = 1; - -//// [file2.ts] -export var y = 1; - -//// [file3.ts] -export {z} from "./file4" - -//// [file4.ts] -export var z = 1; - -//// [file4.ts] -export var z1 = 1; - -//// [file1.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - exports.x = 1; -}); -//// [file2.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - exports.y = 1; -}); -//// [file4.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - exports.z = 1; -}); -//// [file3.js] -define(["require", "exports", "./file4"], function (require, exports, file4_1) { - "use strict"; - exports.z = file4_1.z; -}); -//// [file4.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - exports.z1 = 1; -}); -//// [file1.js] -define(["require", "exports", "folder2/file1", "folder3/file2", "components/file3", "my/file4"], function (require, exports, file1_1, file2_1, file3_1, file4_1) { - "use strict"; - use(file1_1.x.toExponential()); - use(file2_1.y.toExponential()); - use(file3_1.z.toExponential()); - use(file4_1.z1.toExponential()); -}); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution9_1.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution9_1.symbols deleted file mode 100644 index 6f244cf026e..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution9_1.symbols +++ /dev/null @@ -1,61 +0,0 @@ -=== c:/root/folder1/file1.ts === -import {x} from "folder2/file1" ->x : Symbol(x, Decl(file1.ts, 0, 8)) - -import {y} from "folder3/file2" ->y : Symbol(y, Decl(file1.ts, 1, 8)) - -import {z} from "components/file3" ->z : Symbol(z, Decl(file1.ts, 2, 8)) - -import {z1} from "my/file4" ->z1 : Symbol(z1, Decl(file1.ts, 3, 8)) - -declare function use(a: any): void; ->use : Symbol(use, Decl(file1.ts, 3, 27)) ->a : Symbol(a, Decl(file1.ts, 5, 21)) - -use(x.toExponential()); ->use : Symbol(use, Decl(file1.ts, 3, 27)) ->x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) ->x : Symbol(x, Decl(file1.ts, 0, 8)) ->toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) - -use(y.toExponential()); ->use : Symbol(use, Decl(file1.ts, 3, 27)) ->y.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) ->y : Symbol(y, Decl(file1.ts, 1, 8)) ->toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) - -use(z.toExponential()); ->use : Symbol(use, Decl(file1.ts, 3, 27)) ->z.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) ->z : Symbol(z, Decl(file1.ts, 2, 8)) ->toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) - -use(z1.toExponential()); ->use : Symbol(use, Decl(file1.ts, 3, 27)) ->z1.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) ->z1 : Symbol(z1, Decl(file1.ts, 3, 8)) ->toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) - -=== c:/root/src/folder2/file1.ts === -export var x = 1; ->x : Symbol(x, Decl(file1.ts, 0, 10)) - -=== c:/root/src/generated/folder3/file2.ts === -export var y = 1; ->y : Symbol(y, Decl(file2.ts, 0, 10)) - -=== c:/root/src/shared/components/file3.ts === -export {z} from "./file4" ->z : Symbol(z, Decl(file3.ts, 0, 8)) - -=== c:/root/src/shared/components/file4.ts === -export var z = 1; ->z : Symbol(z, Decl(file4.ts, 0, 10)) - -=== c:/sharedrepo/my/file4.ts === -export var z1 = 1; ->z1 : Symbol(z1, Decl(file4.ts, 0, 10)) - diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution9_1.types b/tests/baselines/reference/pathMappingBasedModuleResolution9_1.types deleted file mode 100644 index 24e70346d2a..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution9_1.types +++ /dev/null @@ -1,73 +0,0 @@ -=== c:/root/folder1/file1.ts === -import {x} from "folder2/file1" ->x : number - -import {y} from "folder3/file2" ->y : number - -import {z} from "components/file3" ->z : number - -import {z1} from "my/file4" ->z1 : number - -declare function use(a: any): void; ->use : (a: any) => void ->a : any - -use(x.toExponential()); ->use(x.toExponential()) : void ->use : (a: any) => void ->x.toExponential() : string ->x.toExponential : (fractionDigits?: number) => string ->x : number ->toExponential : (fractionDigits?: number) => string - -use(y.toExponential()); ->use(y.toExponential()) : void ->use : (a: any) => void ->y.toExponential() : string ->y.toExponential : (fractionDigits?: number) => string ->y : number ->toExponential : (fractionDigits?: number) => string - -use(z.toExponential()); ->use(z.toExponential()) : void ->use : (a: any) => void ->z.toExponential() : string ->z.toExponential : (fractionDigits?: number) => string ->z : number ->toExponential : (fractionDigits?: number) => string - -use(z1.toExponential()); ->use(z1.toExponential()) : void ->use : (a: any) => void ->z1.toExponential() : string ->z1.toExponential : (fractionDigits?: number) => string ->z1 : number ->toExponential : (fractionDigits?: number) => string - -=== c:/root/src/folder2/file1.ts === -export var x = 1; ->x : number ->1 : number - -=== c:/root/src/generated/folder3/file2.ts === -export var y = 1; ->y : number ->1 : number - -=== c:/root/src/shared/components/file3.ts === -export {z} from "./file4" ->z : number - -=== c:/root/src/shared/components/file4.ts === -export var z = 1; ->z : number ->1 : number - -=== c:/sharedrepo/my/file4.ts === -export var z1 = 1; ->z1 : number ->1 : number - diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution9_2.js b/tests/baselines/reference/pathMappingBasedModuleResolution9_2.js deleted file mode 100644 index 8fb164e1d54..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution9_2.js +++ /dev/null @@ -1,63 +0,0 @@ -//// [tests/cases/compiler/pathMappingBasedModuleResolution9_2.ts] //// - -//// [file1.ts] -import {x} from "folder2/file1" -import {y} from "folder3/file2" -import {z} from "components/file3" -import {z1} from "my/file4" - -declare function use(a: any): void; - -use(x.toExponential()); -use(y.toExponential()); -use(z.toExponential()); -use(z1.toExponential()); - -//// [file1.ts] -export var x = 1; - -//// [file2.ts] -export var y = 1; - -//// [file3.ts] -export {z} from "./file4" - -//// [file4.ts] -export var z = 1; - -//// [file4.ts] -export var z1 = 1; - -//// [file1.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - exports.x = 1; -}); -//// [file2.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - exports.y = 1; -}); -//// [file4.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - exports.z = 1; -}); -//// [file3.js] -define(["require", "exports", "./file4"], function (require, exports, file4_1) { - "use strict"; - exports.z = file4_1.z; -}); -//// [file4.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - exports.z1 = 1; -}); -//// [file1.js] -define(["require", "exports", "folder2/file1", "folder3/file2", "components/file3", "my/file4"], function (require, exports, file1_1, file2_1, file3_1, file4_1) { - "use strict"; - use(file1_1.x.toExponential()); - use(file2_1.y.toExponential()); - use(file3_1.z.toExponential()); - use(file4_1.z1.toExponential()); -}); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution9_2.symbols b/tests/baselines/reference/pathMappingBasedModuleResolution9_2.symbols deleted file mode 100644 index f9f5bc671ab..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution9_2.symbols +++ /dev/null @@ -1,61 +0,0 @@ -=== c:/root/folder1/file1.ts === -import {x} from "folder2/file1" ->x : Symbol(x, Decl(file1.ts, 0, 8)) - -import {y} from "folder3/file2" ->y : Symbol(y, Decl(file1.ts, 1, 8)) - -import {z} from "components/file3" ->z : Symbol(z, Decl(file1.ts, 2, 8)) - -import {z1} from "my/file4" ->z1 : Symbol(z1, Decl(file1.ts, 3, 8)) - -declare function use(a: any): void; ->use : Symbol(use, Decl(file1.ts, 3, 27)) ->a : Symbol(a, Decl(file1.ts, 5, 21)) - -use(x.toExponential()); ->use : Symbol(use, Decl(file1.ts, 3, 27)) ->x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) ->x : Symbol(x, Decl(file1.ts, 0, 8)) ->toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) - -use(y.toExponential()); ->use : Symbol(use, Decl(file1.ts, 3, 27)) ->y.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) ->y : Symbol(y, Decl(file1.ts, 1, 8)) ->toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) - -use(z.toExponential()); ->use : Symbol(use, Decl(file1.ts, 3, 27)) ->z.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) ->z : Symbol(z, Decl(file1.ts, 2, 8)) ->toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) - -use(z1.toExponential()); ->use : Symbol(use, Decl(file1.ts, 3, 27)) ->z1.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) ->z1 : Symbol(z1, Decl(file1.ts, 3, 8)) ->toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) - -=== c:/base/folder2/file1.ts === -export var x = 1; ->x : Symbol(x, Decl(file1.ts, 0, 10)) - -=== c:/base/generated/folder3/file2.ts === -export var y = 1; ->y : Symbol(y, Decl(file2.ts, 0, 10)) - -=== c:/base/shared/components/file3.ts === -export {z} from "./file4" ->z : Symbol(z, Decl(file3.ts, 0, 8)) - -=== c:/base/shared/components/file4.ts === -export var z = 1; ->z : Symbol(z, Decl(file4.ts, 0, 10)) - -=== c:/sharedrepo/my/file4.ts === -export var z1 = 1; ->z1 : Symbol(z1, Decl(file4.ts, 0, 10)) - diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution9_2.types b/tests/baselines/reference/pathMappingBasedModuleResolution9_2.types deleted file mode 100644 index e84babf0a79..00000000000 --- a/tests/baselines/reference/pathMappingBasedModuleResolution9_2.types +++ /dev/null @@ -1,73 +0,0 @@ -=== c:/root/folder1/file1.ts === -import {x} from "folder2/file1" ->x : number - -import {y} from "folder3/file2" ->y : number - -import {z} from "components/file3" ->z : number - -import {z1} from "my/file4" ->z1 : number - -declare function use(a: any): void; ->use : (a: any) => void ->a : any - -use(x.toExponential()); ->use(x.toExponential()) : void ->use : (a: any) => void ->x.toExponential() : string ->x.toExponential : (fractionDigits?: number) => string ->x : number ->toExponential : (fractionDigits?: number) => string - -use(y.toExponential()); ->use(y.toExponential()) : void ->use : (a: any) => void ->y.toExponential() : string ->y.toExponential : (fractionDigits?: number) => string ->y : number ->toExponential : (fractionDigits?: number) => string - -use(z.toExponential()); ->use(z.toExponential()) : void ->use : (a: any) => void ->z.toExponential() : string ->z.toExponential : (fractionDigits?: number) => string ->z : number ->toExponential : (fractionDigits?: number) => string - -use(z1.toExponential()); ->use(z1.toExponential()) : void ->use : (a: any) => void ->z1.toExponential() : string ->z1.toExponential : (fractionDigits?: number) => string ->z1 : number ->toExponential : (fractionDigits?: number) => string - -=== c:/base/folder2/file1.ts === -export var x = 1; ->x : number ->1 : number - -=== c:/base/generated/folder3/file2.ts === -export var y = 1; ->y : number ->1 : number - -=== c:/base/shared/components/file3.ts === -export {z} from "./file4" ->z : number - -=== c:/base/shared/components/file4.ts === -export var z = 1; ->z : number ->1 : number - -=== c:/sharedrepo/my/file4.ts === -export var z1 = 1; ->z1 : number ->1 : number - diff --git a/tests/baselines/reference/staticInstanceResolution5.errors.txt b/tests/baselines/reference/staticInstanceResolution5.errors.txt index 3c1cee93fd5..da6f0fde143 100644 --- a/tests/baselines/reference/staticInstanceResolution5.errors.txt +++ b/tests/baselines/reference/staticInstanceResolution5.errors.txt @@ -1,15 +1,21 @@ -tests/cases/compiler/staticInstanceResolution5_1.ts(1,24): error TS2307: Cannot find module 'staticInstanceResolution5_0.ts'. +tests/cases/compiler/staticInstanceResolution5_1.ts(4,14): error TS2304: Cannot find name 'WinJS'. +tests/cases/compiler/staticInstanceResolution5_1.ts(5,23): error TS2304: Cannot find name 'WinJS'. +tests/cases/compiler/staticInstanceResolution5_1.ts(6,16): error TS2304: Cannot find name 'WinJS'. -==== tests/cases/compiler/staticInstanceResolution5_1.ts (1 errors) ==== +==== tests/cases/compiler/staticInstanceResolution5_1.ts (3 errors) ==== import WinJS = require('staticInstanceResolution5_0.ts'); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'staticInstanceResolution5_0.ts'. // these 3 should be errors var x = (w1: WinJS) => { }; + ~~~~~ +!!! error TS2304: Cannot find name 'WinJS'. var y = function (w2: WinJS) { } + ~~~~~ +!!! error TS2304: Cannot find name 'WinJS'. function z(w3: WinJS) { } + ~~~~~ +!!! error TS2304: Cannot find name 'WinJS'. ==== tests/cases/compiler/staticInstanceResolution5_0.ts (0 errors) ==== export class Promise { diff --git a/tests/baselines/reference/staticInstanceResolution5.js b/tests/baselines/reference/staticInstanceResolution5.js index 58def522978..0809d1af5f0 100644 --- a/tests/baselines/reference/staticInstanceResolution5.js +++ b/tests/baselines/reference/staticInstanceResolution5.js @@ -16,6 +16,19 @@ var y = function (w2: WinJS) { } function z(w3: WinJS) { } +//// [staticInstanceResolution5_0.js] +define(["require", "exports"], function (require, exports) { + "use strict"; + var Promise = (function () { + function Promise() { + } + Promise.timeout = function (delay) { + return null; + }; + return Promise; + }()); + exports.Promise = Promise; +}); //// [staticInstanceResolution5_1.js] define(["require", "exports"], function (require, exports) { "use strict"; diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution1.ts b/tests/cases/compiler/pathMappingBasedModuleResolution1.ts deleted file mode 100644 index d6c24d75f96..00000000000 --- a/tests/cases/compiler/pathMappingBasedModuleResolution1.ts +++ /dev/null @@ -1,18 +0,0 @@ -// @moduleResolution: baseUrl -// @module: commonjs -// @baseUrl: root - -// user defined base url - -// @filename: root/folder1/file1.ts -import {x} from "folder2/file2" - -declare function use(a: any): void; - -use(x.toExponential()); - -// @filename: root/folder2/file2.ts -export {x} from "./file3" - -// @filename: root/folder2/file3.ts -export var x = 1; \ No newline at end of file diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution10.ts b/tests/cases/compiler/pathMappingBasedModuleResolution10.ts deleted file mode 100644 index 2f32cf3e7cd..00000000000 --- a/tests/cases/compiler/pathMappingBasedModuleResolution10.ts +++ /dev/null @@ -1,34 +0,0 @@ -// @module: amd - -// paths\rootDirs is defined in tsconfig.json -// baseUrl is inferred from tsconfig.json - -// @filename: root/tsconfig.json -{ - "compilerOptions": { - "paths": { - "*": [ - "*", - "generated/*" - ] - }, - "rootDirs": [ - ".", - "./generated" - ] - } -} -// @filename: root/folder1/file1.ts -import {x} from "./file2" // should be resolved to 'generated/folder1/file2.ts' - -export var z = x.toExponential(); - -// @filename: root/generated/folder1/file2.ts -export {x} from "folder1/file3" // should be resolved to 'folder1/file3.ts' - -// @filename: root/folder1/file3.ts -export var x = 1; - -// @filename: root/generated/folder2/file3.ts -import {z as y} from "../folder1/file1" // should be resolved to 'folder1/file1.ts' -let z = y.toLowerCase(); diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution10_1.ts b/tests/cases/compiler/pathMappingBasedModuleResolution10_1.ts deleted file mode 100644 index 6cc6f8e32d9..00000000000 --- a/tests/cases/compiler/pathMappingBasedModuleResolution10_1.ts +++ /dev/null @@ -1,35 +0,0 @@ -// @module: amd - -// paths\rootDirs is defined in tsconfig.json -// baseUrl is inferred from tsconfig.json - -// @filename: c:/root/tsconfig.json -{ - "compilerOptions": { - "paths": { - "*": [ - "*", - "generated/*" - ] - }, - "rootDirs": [ - ".", - "./generated" - ] - } -} - -// @filename: c:/root/generated/folder1/file2.ts -export {x} from "folder1/file3" // should be resolved to 'folder1/file3.ts' - -// @filename: c:/root/folder1/file3.ts -export var x = 1; - -// @filename: c:/root/generated/folder2/file3.ts -import {z as y} from "../folder1/file1" // should be resolved to 'folder1/file1.ts' -let z = y.toLowerCase(); - -// @filename: c:/root/folder1/file1.ts -import {x} from "./file2" // should be resolved to 'generated/folder1/file2.ts' - -export var z = x.toExponential(); diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution10_2.ts b/tests/cases/compiler/pathMappingBasedModuleResolution10_2.ts deleted file mode 100644 index 754df23f4bf..00000000000 --- a/tests/cases/compiler/pathMappingBasedModuleResolution10_2.ts +++ /dev/null @@ -1,36 +0,0 @@ -// @module: amd - -// paths\rootDirs is defined in tsconfig.json -// baseUrl is defined in tsconfig.json - -// @filename: c:/root/tsconfig.json -{ - "compilerOptions": { - "baseUrl": "./src", - "paths": { - "*": [ - "*", - "generated/*" - ] - }, - "rootDirs": [ - "./src/", - "./src/generated" - ] - } -} - -// @filename: c:/root/src/generated/folder1/file2.ts -export {x} from "folder1/file3" // should be resolved to 'folder1/file3.ts' - -// @filename: c:/root/src/folder1/file3.ts -export var x = 1; - -// @filename: c:/root/src/generated/folder2/file3.ts -import {z as y} from "../folder1/file1" // should be resolved to 'folder1/file1.ts' -let z = y.toLowerCase(); - -// @filename: c:/root/src/folder1/file1.ts -import {x} from "./file2" // should be resolved to 'generated/folder1/file2.ts' - -export var z = x.toExponential(); diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution11.ts b/tests/cases/compiler/pathMappingBasedModuleResolution11.ts deleted file mode 100644 index e0504126ca1..00000000000 --- a/tests/cases/compiler/pathMappingBasedModuleResolution11.ts +++ /dev/null @@ -1,34 +0,0 @@ -// @module: amd - -// paths\rootDirs is defined in tsconfig.json -// baseUrl is inferred from tsconfig.json - -// @filename: root/tsconfig.json -{ - "compilerOptions": { - "paths": { - "*": [ - "*", - "generated/*/file" - ] - }, - "rootDirs": [ - ".", - "./generated" - ] - } -} -// @filename: root/folder1/file1.ts -import {x} from "./file2" // should be resolved to 'generated/folder1/file2/file.ts' - -export var z = x.toExponential(); - -// @filename: root/generated/folder1/file2/file.ts -export {x} from "folder1/file3" // should be resolved to 'folder1/file3.ts' - -// @filename: root/folder1/file3.ts -export var x = 1; - -// @filename: root/generated/folder2/file3.ts -import {z as y} from "../folder1/file1" // should be resolved to 'folder1/file1.ts' -let z = y.toLowerCase(); diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution1_1.ts b/tests/cases/compiler/pathMappingBasedModuleResolution1_1.ts deleted file mode 100644 index fa987961cd2..00000000000 --- a/tests/cases/compiler/pathMappingBasedModuleResolution1_1.ts +++ /dev/null @@ -1,18 +0,0 @@ -// @moduleResolution: baseUrl -// @module: commonjs -// @baseUrl: c:/root - -// user defined base url - -// @filename: c:/root/folder1/file1.ts -import {x} from "folder2/file2" - -declare function use(a: any): void; - -use(x.toExponential()); - -// @filename: c:/root/folder2/file2.ts -export {x} from "./file3" - -// @filename: c:/root/folder2/file3.ts -export var x = 1; \ No newline at end of file diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution1_classic.ts b/tests/cases/compiler/pathMappingBasedModuleResolution1_classic.ts new file mode 100644 index 00000000000..20845a49372 --- /dev/null +++ b/tests/cases/compiler/pathMappingBasedModuleResolution1_classic.ts @@ -0,0 +1,19 @@ +// @module: amd +// @traceModuleResolution: true + +// paths should error in the absence of baseurl + +// @filename: c:/root/tsconfig.json +{ + "compilerOptions": { + "paths": { + "*": [ + "*", + "generated/*" + ] + } + } +} + +// @filename: c:/root/f1.ts +export var x = 1; diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution1_node.ts b/tests/cases/compiler/pathMappingBasedModuleResolution1_node.ts new file mode 100644 index 00000000000..392e85bd7c3 --- /dev/null +++ b/tests/cases/compiler/pathMappingBasedModuleResolution1_node.ts @@ -0,0 +1,18 @@ +// @module: commonjs +// @traceModuleResolution: true + +// paths should error in the absence of baseurl +// @filename: c:/root/tsconfig.json +{ + "compilerOptions": { + "paths": { + "*": [ + "*", + "generated/*" + ] + } + } +} + +// @filename: c:/root/f1.ts +export var x = 1; diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution2.ts b/tests/cases/compiler/pathMappingBasedModuleResolution2.ts deleted file mode 100644 index 84bfc36b8d1..00000000000 --- a/tests/cases/compiler/pathMappingBasedModuleResolution2.ts +++ /dev/null @@ -1,22 +0,0 @@ -// @module: commonjs - -// location of tsconfig.json as baseurl - -// @filename: root/tsconfig.json -{ - "compilerOptions": { - "moduleResolution": "baseUrl" - } -} -// @filename: root/folder1/file1.ts -import {x} from "folder2/file2" - -declare function use(a: any): void; - -use(x.toExponential()); - -// @filename: root/folder2/file2.ts -export {x} from "./file3" - -// @filename: root/folder2/file3.ts -export var x = 1; \ No newline at end of file diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution2_1.ts b/tests/cases/compiler/pathMappingBasedModuleResolution2_1.ts deleted file mode 100644 index 4b94e352879..00000000000 --- a/tests/cases/compiler/pathMappingBasedModuleResolution2_1.ts +++ /dev/null @@ -1,22 +0,0 @@ -// @module: commonjs - -// location of tsconfig.json as baseurl - -// @filename: c:/root/tsconfig.json -{ - "compilerOptions": { - "moduleResolution": "baseUrl" - } -} -// @filename: c:/root/folder1/file1.ts -import {x} from "folder2/file2" - -declare function use(a: any): void; - -use(x.toExponential()); - -// @filename: c:/root/folder2/file2.ts -export {x} from "./file3" - -// @filename: c:/root/folder2/file3.ts -export var x = 1; \ No newline at end of file diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution6.ts b/tests/cases/compiler/pathMappingBasedModuleResolution2_classic.ts similarity index 85% rename from tests/cases/compiler/pathMappingBasedModuleResolution6.ts rename to tests/cases/compiler/pathMappingBasedModuleResolution2_classic.ts index f1e51afc805..6c84a197eeb 100644 --- a/tests/cases/compiler/pathMappingBasedModuleResolution6.ts +++ b/tests/cases/compiler/pathMappingBasedModuleResolution2_classic.ts @@ -1,4 +1,5 @@ // @module: amd +// @traceModuleResolution: true // baseurl is defined in tsconfig.json // paths has errors diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution5.ts b/tests/cases/compiler/pathMappingBasedModuleResolution2_node.ts similarity index 54% rename from tests/cases/compiler/pathMappingBasedModuleResolution5.ts rename to tests/cases/compiler/pathMappingBasedModuleResolution2_node.ts index 305f7aa9c3f..78ef7215e73 100644 --- a/tests/cases/compiler/pathMappingBasedModuleResolution5.ts +++ b/tests/cases/compiler/pathMappingBasedModuleResolution2_node.ts @@ -1,13 +1,18 @@ -// @module: commonjs - -// baseurl is defined in tsconfig.json -// module resolution kind is ambiguous - error should be reported - -// @filename: root/tsconfig.json -{ - "compilerOptions": { - "baseUrl": "./src" - } -} -// @filename: root/src/folder1/file1.ts +// @module: commonjs +// @traceModuleResolution: true + +// baseurl is defined in tsconfig.json +// paths has errors + +// @filename: root/tsconfig.json +{ + "compilerOptions": { + "baseUrl": "./src", + "paths": { + "*1*": [ "*2*" ] + } + } +} + +// @filename: root/src/folder1/file1.ts export var x = 1; \ No newline at end of file diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution3.ts b/tests/cases/compiler/pathMappingBasedModuleResolution3.ts deleted file mode 100644 index 466e8c90d77..00000000000 --- a/tests/cases/compiler/pathMappingBasedModuleResolution3.ts +++ /dev/null @@ -1,23 +0,0 @@ -// @module: commonjs - -// baseurl is defined in tsconfig.json - -// @filename: root/tsconfig.json -{ - "compilerOptions": { - "moduleResolution": "baseUrl", - "baseUrl": "./src" - } -} -// @filename: root/src/folder1/file1.ts -import {x} from "folder2/file2" - -declare function use(a: any): void; - -use(x.toExponential()); - -// @filename: root/src/folder2/file2.ts -export {x} from "./file3" - -// @filename: root/src/folder2/file3.ts -export var x = 1; \ No newline at end of file diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution3_1.ts b/tests/cases/compiler/pathMappingBasedModuleResolution3_1.ts deleted file mode 100644 index f3a8ccaf0a8..00000000000 --- a/tests/cases/compiler/pathMappingBasedModuleResolution3_1.ts +++ /dev/null @@ -1,23 +0,0 @@ -// @module: commonjs - -// baseurl is defined in tsconfig.json - -// @filename: c:/root/tsconfig.json -{ - "compilerOptions": { - "moduleResolution": "baseUrl", - "baseUrl": "./src" - } -} -// @filename: c:/root/src/folder1/file1.ts -import {x} from "folder2/file2" - -declare function use(a: any): void; - -use(x.toExponential()); - -// @filename: c:/root/src/folder2/file2.ts -export {x} from "./file3" - -// @filename: c:/root/src/folder2/file3.ts -export var x = 1; \ No newline at end of file diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution3_classic.ts b/tests/cases/compiler/pathMappingBasedModuleResolution3_classic.ts new file mode 100644 index 00000000000..d46308d089f --- /dev/null +++ b/tests/cases/compiler/pathMappingBasedModuleResolution3_classic.ts @@ -0,0 +1,22 @@ +// @moduleResolution: classic +// @module: amd +// @baseUrl: c:/root +// @traceModuleResolution: true + +// baseUrl set via command line + +// @filename: c:/root/folder1/file1.ts +import {x} from "folder2/file2" +declare function use(a: any): void; +use(x.toExponential()); + +// @filename: c:/root/folder2/file2.ts +import {x as a} from "./file3" // found with baseurl +import {y as b} from "file4" // found with fallback +export var x = a + b; + +// @filename: c:/root/folder2/file3.ts +export var x = 1; + +// @filename: c:/file4.ts +export var y = 100; \ No newline at end of file diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution3_node.ts b/tests/cases/compiler/pathMappingBasedModuleResolution3_node.ts new file mode 100644 index 00000000000..30e95c9303e --- /dev/null +++ b/tests/cases/compiler/pathMappingBasedModuleResolution3_node.ts @@ -0,0 +1,22 @@ +// @moduleResolution: node +// @module: commonjs +// @baseUrl: c:/root +// @traceModuleResolution: true + +// baseUrl set via command line + +// @filename: c:/root/folder1/file1.ts +import {x} from "folder2/file2" +declare function use(a: any): void; +use(x.toExponential()); + +// @filename: c:/root/folder2/file2.ts +import {x as a} from "./file3" // found with baseurl +import {y as b} from "file4" // found with fallback +export var x = a + b; + +// @filename: c:/root/folder2/file3.ts +export var x = 1; + +// @filename: c:/node_modules/file4/index.d.ts +export var y: number; \ No newline at end of file diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution4.ts b/tests/cases/compiler/pathMappingBasedModuleResolution4.ts deleted file mode 100644 index 17f8258e763..00000000000 --- a/tests/cases/compiler/pathMappingBasedModuleResolution4.ts +++ /dev/null @@ -1,23 +0,0 @@ -// @module: amd - -// baseurl is defined in tsconfig.json -// module resolution kind is inferred from settings (baseurl is specified) - -// @filename: root/tsconfig.json -{ - "compilerOptions": { - "baseUrl": "./src" - } -} -// @filename: root/src/folder1/file1.ts -import {x} from "folder2/file2" - -declare function use(a: any): void; - -use(x.toExponential()); - -// @filename: root/src/folder2/file2.ts -export {x} from "./file3" - -// @filename: root/src/folder2/file3.ts -export var x = 1; \ No newline at end of file diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution4_1.ts b/tests/cases/compiler/pathMappingBasedModuleResolution4_1.ts deleted file mode 100644 index df6f267da65..00000000000 --- a/tests/cases/compiler/pathMappingBasedModuleResolution4_1.ts +++ /dev/null @@ -1,23 +0,0 @@ -// @module: amd - -// baseurl is defined in tsconfig.json -// module resolution kind is inferred from settings (baseurl is specified) - -// @filename: c:/root/tsconfig.json -{ - "compilerOptions": { - "baseUrl": "./src" - } -} -// @filename: c:/root/src/folder1/file1.ts -import {x} from "folder2/file2" - -declare function use(a: any): void; - -use(x.toExponential()); - -// @filename: c:/root/src/folder2/file2.ts -export {x} from "./file3" - -// @filename: c:/root/src/folder2/file3.ts -export var x = 1; \ No newline at end of file diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution4_classic.ts b/tests/cases/compiler/pathMappingBasedModuleResolution4_classic.ts new file mode 100644 index 00000000000..723de05b70c --- /dev/null +++ b/tests/cases/compiler/pathMappingBasedModuleResolution4_classic.ts @@ -0,0 +1,28 @@ +// @moduleResolution: classic +// @module: amd +// @traceModuleResolution: true + +// baseUrl set via command line + +// @filename: c:/root/tsconfig.json +{ + "compilerOptions": { + "baseUrl": "." + } +} + +// @filename: c:/root/folder1/file1.ts +import {x} from "folder2/file2" +declare function use(a: any): void; +use(x.toExponential()); + +// @filename: c:/root/folder2/file2.ts +import {x as a} from "./file3" // found with baseurl +import {y as b} from "file4" // found with fallback +export var x = a + b; + +// @filename: c:/root/folder2/file3.ts +export var x = 1; + +// @filename: c:/file4.ts +export var y = 100; \ No newline at end of file diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution4_node.ts b/tests/cases/compiler/pathMappingBasedModuleResolution4_node.ts new file mode 100644 index 00000000000..e68635e205e --- /dev/null +++ b/tests/cases/compiler/pathMappingBasedModuleResolution4_node.ts @@ -0,0 +1,28 @@ +// @moduleResolution: node +// @module: commonjs +// @traceModuleResolution: true + +// baseUrl set via command line + +// @filename: c:/root/tsconfig.json +{ + "compilerOptions": { + "baseUrl": "." + } +} + +// @filename: c:/root/folder1/file1.ts +import {x} from "folder2/file2" +declare function use(a: any): void; +use(x.toExponential()); + +// @filename: c:/root/folder2/file2.ts +import {x as a} from "./file3" // found with baseurl +import {y as b} from "file4" // found with fallback +export var x = a + b; + +// @filename: c:/root/folder2/file3.ts +export var x = 1; + +// @filename: c:/node_modules/file4/index.d.ts +export var y: number; \ No newline at end of file diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution7_2.ts b/tests/cases/compiler/pathMappingBasedModuleResolution5_classic.ts similarity index 70% rename from tests/cases/compiler/pathMappingBasedModuleResolution7_2.ts rename to tests/cases/compiler/pathMappingBasedModuleResolution5_classic.ts index 16284349643..a7662688e37 100644 --- a/tests/cases/compiler/pathMappingBasedModuleResolution7_2.ts +++ b/tests/cases/compiler/pathMappingBasedModuleResolution5_classic.ts @@ -1,20 +1,19 @@ // @module: amd +// @traceModuleResolution: true // paths is defined in tsconfig.json -// module resolution kind is inferred from the presence of 'paths' - // @filename: c:/root/tsconfig.json { "compilerOptions": { + "baseUrl": ".", "paths": { "*": [ "*", - "generated/*", - "c:/sharedrepo/*" + "generated/*" ], - "components/*": [ - "shared/components/*" - ] + "components/*": [ + "shared/components/*" + ] } } } @@ -40,5 +39,5 @@ export var y = 1; // @filename: c:/root/shared/components/file3.ts export var z = 1; -// @filename: c:/sharedrepo/file4.ts +// @filename: c:/file4.ts export var z1 = 1; \ No newline at end of file diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution7_1.ts b/tests/cases/compiler/pathMappingBasedModuleResolution5_node.ts similarity index 57% rename from tests/cases/compiler/pathMappingBasedModuleResolution7_1.ts rename to tests/cases/compiler/pathMappingBasedModuleResolution5_node.ts index c64eb687764..ef5ef0afd6a 100644 --- a/tests/cases/compiler/pathMappingBasedModuleResolution7_1.ts +++ b/tests/cases/compiler/pathMappingBasedModuleResolution5_node.ts @@ -1,19 +1,19 @@ -// @module: amd +// @module: commonjs +// @traceModuleResolution: true // paths is defined in tsconfig.json -// module resolution kind is inferred from the presence of 'paths' - // @filename: c:/root/tsconfig.json { "compilerOptions": { - "paths": { + "baseUrl": ".", + "paths": { "*": [ "*", "generated/*" ], - "components/*": [ - "shared/components/*" - ] + "components/*": [ + "shared/components/*" + ] } } } @@ -21,12 +21,14 @@ import {x} from "folder2/file1" import {y} from "folder3/file2" import {z} from "components/file3" +import {z1} from "file4" declare function use(a: any): void; use(x.toExponential()); use(y.toExponential()); use(z.toExponential()); +use(z1.toExponential()); // @filename: c:/root/folder2/file1.ts export var x = 1; @@ -34,5 +36,8 @@ export var x = 1; // @filename: c:/root/generated/folder3/file2.ts export var y = 1; -// @filename: c:/root/shared/components/file3.ts -export var z = 1; \ No newline at end of file +// @filename: c:/root/shared/components/file3/index.d.ts +export var z: number; + +// @filename: c:/node_modules/file4.ts +export var z1 = 1; \ No newline at end of file diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution6_classic.ts b/tests/cases/compiler/pathMappingBasedModuleResolution6_classic.ts new file mode 100644 index 00000000000..adaba8478c9 --- /dev/null +++ b/tests/cases/compiler/pathMappingBasedModuleResolution6_classic.ts @@ -0,0 +1,23 @@ +// @module: amd +// @traceModuleResolution: true + +// @filename: c:/root/src/tsconfig.json +{ + "compilerOptions": { + "rootDirs": [ + ".", + "../generated/src" + ] + } +} + +// @filename: c:/root/src/file1.ts +import {x} from "./project/file3"; +declare function use(x: string); +use(x.toExponential()); + +// @filename: c:/root/src/file2.d.ts +export let x: number; + +// @filename: c:/root/generated/src/project/file3.ts +export {x} from "../file2"; \ No newline at end of file diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution6_node.ts b/tests/cases/compiler/pathMappingBasedModuleResolution6_node.ts new file mode 100644 index 00000000000..a3d0feadf7c --- /dev/null +++ b/tests/cases/compiler/pathMappingBasedModuleResolution6_node.ts @@ -0,0 +1,23 @@ +// @module: commonjs +// @traceModuleResolution: true + +// @filename: c:/root/src/tsconfig.json +{ + "compilerOptions": { + "rootDirs": [ + ".", + "../generated/src" + ] + } +} + +// @filename: c:/root/src/file1.ts +import {x} from "./project/file3"; +declare function use(x: string); +use(x.toFixed()); + +// @filename: c:/root/src/file2/index.d.ts +export let x: number; + +// @filename: c:/root/generated/src/project/file3.ts +export {x} from "../file2"; \ No newline at end of file diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution7.ts b/tests/cases/compiler/pathMappingBasedModuleResolution7.ts deleted file mode 100644 index f59f0701a33..00000000000 --- a/tests/cases/compiler/pathMappingBasedModuleResolution7.ts +++ /dev/null @@ -1,38 +0,0 @@ -// @module: amd - -// paths is defined in tsconfig.json -// module resolution kind is inferred from the presence of 'paths' - -// @filename: root/tsconfig.json -{ - "compilerOptions": { - "paths": { - "*": [ - "*", - "generated/*" - ], - "components/*": [ - "shared/components/*" - ] - } - } -} -// @filename: root/folder1/file1.ts -import {x} from "folder2/file1" -import {y} from "folder3/file2" -import {z} from "components/file3" - -declare function use(a: any): void; - -use(x.toExponential()); -use(y.toExponential()); -use(z.toExponential()); - -// @filename: root/folder2/file1.ts -export var x = 1; - -// @filename: root/generated/folder3/file2.ts -export var y = 1; - -// @filename: root/shared/components/file3.ts -export var z = 1; \ No newline at end of file diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution7_classic.ts b/tests/cases/compiler/pathMappingBasedModuleResolution7_classic.ts new file mode 100644 index 00000000000..af092df5ce9 --- /dev/null +++ b/tests/cases/compiler/pathMappingBasedModuleResolution7_classic.ts @@ -0,0 +1,49 @@ +// @module: amd +// @traceModuleResolution: true + +// @filename: c:/root/src/tsconfig.json +{ + "compilerOptions": { + "baseUrl": "../", + "paths": { + "*": [ + "*", + "c:/shared/*" + ], + "templates/*": [ + "generated/src/templates/*" + ] + }, + "rootDirs": [ + ".", + "../generated/src" + ] + } +} + +// @filename: c:/root/src/file1.ts +import {x} from "./project/file2"; +import {y} from "module3"; + +declare function use(x: string); +use(x.toFixed()); +use(y.toFixed()); + +// @filename: c:/root/generated/src/project/file2.ts +import {a} from "module1"; +import {b} from "templates/module2"; +import {x as c} from "../file3"; +export let x = a + b + c; + +// @filename: c:/shared/module1.d.ts +export let a: number + +// @filename: c:/root/generated/src/templates/module2.ts +export let b: number; + +// @filename: c:/root/src/file3.d.ts +export let x: number; + +// @filename: c:/module3.d.ts +export let y: number; + diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution7_node.ts b/tests/cases/compiler/pathMappingBasedModuleResolution7_node.ts new file mode 100644 index 00000000000..faecbe4adb9 --- /dev/null +++ b/tests/cases/compiler/pathMappingBasedModuleResolution7_node.ts @@ -0,0 +1,49 @@ +// @module: commonjs +// @traceModuleResolution: true + +// @filename: c:/root/src/tsconfig.json +{ + "compilerOptions": { + "baseUrl": "../", + "paths": { + "*": [ + "*", + "c:/shared/*" + ], + "templates/*": [ + "generated/src/templates/*" + ] + }, + "rootDirs": [ + ".", + "../generated/src" + ] + } +} + +// @filename: c:/root/src/file1.ts +import {x} from "./project/file2"; +import {y} from "module3"; + +declare function use(x: string); +use(x.toFixed()); +use(y.toFixed()); + +// @filename: c:/root/generated/src/project/file2.ts +import {a} from "module1"; +import {b} from "templates/module2"; +import {x as c} from "../file3"; +export let x = a + b + c; + +// @filename: c:/shared/module1/index.d.ts +export let a: number + +// @filename: c:/root/generated/src/templates/module2.ts +export let b: number; + +// @filename: c:/root/src/file3/index.d.ts +export let x: number; + +// @filename: c:/node_modules/module3.d.ts +export let y: number; + diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution8.ts b/tests/cases/compiler/pathMappingBasedModuleResolution8.ts deleted file mode 100644 index dc2be22c4ca..00000000000 --- a/tests/cases/compiler/pathMappingBasedModuleResolution8.ts +++ /dev/null @@ -1,39 +0,0 @@ -// @module: amd - -// paths is defined in tsconfig.json -// baseUrl is specified in tsconfig.json - -// @filename: root/tsconfig.json -{ - "compilerOptions": { - "baseUrl": "./src", - "paths": { - "*": [ - "*", - "generated/*" - ], - "components/*": [ - "shared/components/*" - ] - } - } -} -// @filename: root/folder1/file1.ts -import {x} from "folder2/file1" -import {y} from "folder3/file2" -import {z} from "components/file3" - -declare function use(a: any): void; - -use(x.toExponential()); -use(y.toExponential()); -use(z.toExponential()); - -// @filename: root/src/folder2/file1.ts -export var x = 1; - -// @filename: root/src/generated/folder3/file2.ts -export var y = 1; - -// @filename: root/src/shared/components/file3.ts -export var z = 1; \ No newline at end of file diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution8_1.ts b/tests/cases/compiler/pathMappingBasedModuleResolution8_1.ts deleted file mode 100644 index b858be9455d..00000000000 --- a/tests/cases/compiler/pathMappingBasedModuleResolution8_1.ts +++ /dev/null @@ -1,45 +0,0 @@ -// @module: amd - -// paths is defined in tsconfig.json -// baseUrl is specified in tsconfig.json - -// @filename: c:/root/tsconfig.json -{ - "compilerOptions": { - "baseUrl": "./src", - "paths": { - "*": [ - "*", - "generated/*", - "c:/sharedrepo/*" - ], - "components/*": [ - "shared/components/*" - ] - } - } -} -// @filename: c:/root/folder1/file1.ts -import {x} from "folder2/file1" -import {y} from "folder3/file2" -import {z} from "components/file3" -import {z1} from "file4" - -declare function use(a: any): void; - -use(x.toExponential()); -use(y.toExponential()); -use(z.toExponential()); -use(z1.toExponential()); - -// @filename: c:/root/src/folder2/file1.ts -export var x = 1; - -// @filename: c:/root/src/generated/folder3/file2.ts -export var y = 1; - -// @filename: c:/root/src/shared/components/file3.ts -export var z = 1; - -// @filename: c:/sharedrepo/file4.ts -export var z1 = 1; \ No newline at end of file diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution9.ts b/tests/cases/compiler/pathMappingBasedModuleResolution9.ts deleted file mode 100644 index 1b104a27251..00000000000 --- a/tests/cases/compiler/pathMappingBasedModuleResolution9.ts +++ /dev/null @@ -1,42 +0,0 @@ -// @module: amd - -// paths is defined in tsconfig.json -// baseUrl is specified in tsconfig.json - -// @filename: root/tsconfig.json -{ - "compilerOptions": { - "baseUrl": "./src", - "paths": { - "*": [ - "*", - "generated/*" - ], - "components/*": [ - "shared/components/*" - ] - } - } -} -// @filename: root/folder1/file1.ts -import {x} from "folder2/file1" -import {y} from "folder3/file2" -import {z} from "components/file3" - -declare function use(a: any): void; - -use(x.toExponential()); -use(y.toExponential()); -use(z.toExponential()); - -// @filename: root/src/folder2/file1.ts -export var x = 1; - -// @filename: root/src/generated/folder3/file2.ts -export var y = 1; - -// @filename: root/src/shared/components/file3.ts -export {z} from "./file4" - -// @filename: root/src/shared/components/file4.ts -export var z = 1; \ No newline at end of file diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution9_1.ts b/tests/cases/compiler/pathMappingBasedModuleResolution9_1.ts deleted file mode 100644 index 68a0898229c..00000000000 --- a/tests/cases/compiler/pathMappingBasedModuleResolution9_1.ts +++ /dev/null @@ -1,48 +0,0 @@ -// @module: amd - -// paths is defined in tsconfig.json -// baseUrl is specified in tsconfig.json - -// @filename: c:/root/tsconfig.json -{ - "compilerOptions": { - "baseUrl": "./src", - "paths": { - "*": [ - "*", - "generated/*", - "c:/sharedrepo/*" - ], - "components/*": [ - "shared/components/*" - ] - } - } -} -// @filename: c:/root/folder1/file1.ts -import {x} from "folder2/file1" -import {y} from "folder3/file2" -import {z} from "components/file3" -import {z1} from "my/file4" - -declare function use(a: any): void; - -use(x.toExponential()); -use(y.toExponential()); -use(z.toExponential()); -use(z1.toExponential()); - -// @filename: c:/root/src/folder2/file1.ts -export var x = 1; - -// @filename: c:/root/src/generated/folder3/file2.ts -export var y = 1; - -// @filename: c:/root/src/shared/components/file3.ts -export {z} from "./file4" - -// @filename: c:/root/src/shared/components/file4.ts -export var z = 1; - -// @filename: c:/sharedrepo/my/file4.ts -export var z1 = 1; \ No newline at end of file diff --git a/tests/cases/compiler/pathMappingBasedModuleResolution9_2.ts b/tests/cases/compiler/pathMappingBasedModuleResolution9_2.ts deleted file mode 100644 index 83990d3c5ad..00000000000 --- a/tests/cases/compiler/pathMappingBasedModuleResolution9_2.ts +++ /dev/null @@ -1,48 +0,0 @@ -// @module: amd - -// paths is defined in tsconfig.json -// baseUrl is specified in tsconfig.json and it is absolute - -// @filename: c:/root/tsconfig.json -{ - "compilerOptions": { - "baseUrl": "c:/base", - "paths": { - "*": [ - "*", - "generated/*", - "c:/sharedrepo/*" - ], - "components/*": [ - "shared/components/*" - ] - } - } -} -// @filename: c:/root/folder1/file1.ts -import {x} from "folder2/file1" -import {y} from "folder3/file2" -import {z} from "components/file3" -import {z1} from "my/file4" - -declare function use(a: any): void; - -use(x.toExponential()); -use(y.toExponential()); -use(z.toExponential()); -use(z1.toExponential()); - -// @filename: c:/base/folder2/file1.ts -export var x = 1; - -// @filename: c:/base/generated/folder3/file2.ts -export var y = 1; - -// @filename: c:/base/shared/components/file3.ts -export {z} from "./file4" - -// @filename: c:/base/shared/components/file4.ts -export var z = 1; - -// @filename: c:/sharedrepo/my/file4.ts -export var z1 = 1; \ No newline at end of file diff --git a/tests/cases/unittests/cachingInServerLSHost.ts b/tests/cases/unittests/cachingInServerLSHost.ts index 88b44a693b9..59f97f434e6 100644 --- a/tests/cases/unittests/cachingInServerLSHost.ts +++ b/tests/cases/unittests/cachingInServerLSHost.ts @@ -7,6 +7,10 @@ module ts { } function createDefaultServerHost(fileMap: Map): server.ServerHost { + const directories: Map = {}; + for (const f in fileMap) { + directories[getDirectoryPath(f)] = f; + } return { args: [], newLine: "\r\n", @@ -26,7 +30,7 @@ module ts { return hasProperty(fileMap, path); }, directoryExists: (path: string): boolean => { - throw new Error("NYI"); + return hasProperty(directories, path); }, createDirectory: (path: string) => { }, diff --git a/tests/cases/unittests/moduleResolution.ts b/tests/cases/unittests/moduleResolution.ts index cc5324cb44a..6bbbdcc90b4 100644 --- a/tests/cases/unittests/moduleResolution.ts +++ b/tests/cases/unittests/moduleResolution.ts @@ -459,7 +459,8 @@ import b = require("./moduleB.ts"); }) }); - describe("baseUrl module resolution", () => { + describe("baseUrl augmented module resolution", () => { + it("module resolution without path mappings/rootDirs", () => { test(/*hasDirectoryExists*/ false); test(/*hasDirectoryExists*/ true); @@ -469,42 +470,100 @@ import b = require("./moduleB.ts"); const file2: File = { name: "/root/folder2/file2.ts" }; const file3: File = { name: "/root/folder2/file3.ts" }; const host = createModuleResolutionHost(hasDirectoryExists, file1, file2, file3); - const options: CompilerOptions = { moduleResolution: ModuleResolutionKind.BaseUrl, baseUrl: "/root" }; - { - const result = baseUrlModuleNameResolver("folder2/file2", file1.name, options, host); - assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); - assert.equal(result.resolvedModule.resolvedFileName, file2.name); - assert.deepEqual(result.failedLookupLocations, []); - } - { - const result = baseUrlModuleNameResolver("./file3", file2.name, options, host); - assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); - assert.equal(result.resolvedModule.resolvedFileName, file3.name); - assert.deepEqual(result.failedLookupLocations, []); - } - { - const result = baseUrlModuleNameResolver(file1.name, file2.name, options, host); - assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); - assert.equal(result.resolvedModule.resolvedFileName, file1.name); - assert.deepEqual(result.failedLookupLocations, []); + for (const moduleResolution of [ ModuleResolutionKind.NodeJs, ModuleResolutionKind.Classic ]) { + const options: CompilerOptions = { moduleResolution, baseUrl: "/root" }; + { + const result = resolveModuleName("folder2/file2", file1.name, options, host); + assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); + assert.equal(result.resolvedModule.resolvedFileName, file2.name); + assert.deepEqual(result.failedLookupLocations, []); + } + { + const result = resolveModuleName("./file3", file2.name, options, host); + assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); + assert.equal(result.resolvedModule.resolvedFileName, file3.name); + assert.deepEqual(result.failedLookupLocations, []); + } + { + const result = resolveModuleName("/root/folder1/file1", file2.name, options, host); + assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); + assert.equal(result.resolvedModule.resolvedFileName, file1.name); + assert.deepEqual(result.failedLookupLocations, []); + } } } // add failure tests }); - - it("module resolution with path mappings", () => { + + it("node + baseUrl", () => { test(/*hasDirectoryExists*/ false); test(/*hasDirectoryExists*/ true); function test(hasDirectoryExists: boolean) { + const main: File = { name: "/root/a/b/main.ts" }; + const m1: File = { name: "/root/m1.ts" }; // load file as module + const m2: File = { name: "/root/m2/index.d.ts" }; // load folder as module + const m3: File = { name: "/root/m3/package.json", content: JSON.stringify({ typings: "dist/typings.d.ts" }) }; + const m3Typings: File = { name: "/root/m3/dist/typings.d.ts" }; + const m4: File = { name: "/root/node_modules/m4.ts" }; // fallback to node + + const options: CompilerOptions = { moduleResolution: ModuleResolutionKind.NodeJs, baseUrl: "/root" }; + const host = createModuleResolutionHost(hasDirectoryExists, main, m1, m2, m3, m3Typings, m4); + + check("m1", main, m1); + check("m2", main, m2); + check("m3", main, m3Typings); + check("m4", main, m4); + + function check(name: string, caller: File, expected: File) { + const result = resolveModuleName(name, caller.name, options, host); + assert.isTrue(result.resolvedModule !== undefined); + assert.equal(result.resolvedModule.resolvedFileName, expected.name); + } + } + }); + + it("classic + baseUrl", () => { + test(/*hasDirectoryExists*/ false); + test(/*hasDirectoryExists*/ true); + + function test(hasDirectoryExists: boolean) { + const main: File = { name: "/root/a/b/main.ts" }; + const m1: File = { name: "/root/x/m1.ts" }; // load from base url + const m2: File = { name: "/m2.ts" }; // fallback to classic + + const options: CompilerOptions = { moduleResolution: ModuleResolutionKind.Classic, baseUrl: "/root/x" }; + const host = createModuleResolutionHost(hasDirectoryExists, main, m1, m2); + + check("m1", main, m1); + check("m2", main, m2); + + function check(name: string, caller: File, expected: File) { + const result = resolveModuleName(name, caller.name, options, host); + assert.isTrue(result.resolvedModule !== undefined); + assert.equal(result.resolvedModule.resolvedFileName, expected.name); + } + } + }) + + it("node + baseUrl + path mappings", () => { + test(/*hasDirectoryExists*/ false); + test(/*hasDirectoryExists*/ true); + + function test(hasDirectoryExists: boolean) { + const main: File = { name: "/root/folder1/main.ts" }; + const file1: File = { name: "/root/folder1/file1.ts" }; - const file2: File = { name: "/root/folder1/file2.ts" } - const file3: File = { name: "/root/generated/folder1/file3.ts" } - const file4: File = { name: "/root/generated/folder2/file4.ts" } - const file5: File = { name: "/root/someanotherfolder/file5.ts" } - const host = createModuleResolutionHost(hasDirectoryExists, file1, file2, file3, file4, file5); + const file2: File = { name: "/root/generated/folder1/file2.ts" } // load remapped file as module + const file3: File = { name: "/root/generated/folder2/file3/index.d.ts" } // load folder a module + const file4Typings: File = { name: "/root/generated/folder2/file4/package.json", content: JSON.stringify({ typings: "dist/types.d.ts" })}; + const file4: File = { name: "/root/generated/folder2/file4/dist/types.d.ts" }; // load file pointed by typings + const file5: File = { name: "/root/someanotherfolder/file5/index.d.ts" } // load remapped module from folder + const file6: File = { name: "/root/node_modules/file6.ts" }; // fallback to node + const host = createModuleResolutionHost(hasDirectoryExists, file1, file2, file3, file4, file4Typings, file5, file6); + const options: CompilerOptions = { - moduleResolution: ModuleResolutionKind.BaseUrl, + moduleResolution: ModuleResolutionKind.NodeJs, baseUrl: "/root", paths: { "*": [ @@ -516,50 +575,242 @@ import b = require("./moduleB.ts"); ] } }; - { - const result = baseUrlModuleNameResolver("folder1/file2", file1.name, options, host); + check("folder1/file1", file1, []); + check("folder1/file2", file2, [ + // first try the '*' + "/root/folder1/file2.ts", + "/root/folder1/file2.tsx", + "/root/folder1/file2.d.ts", + "/root/folder1/file2/package.json", + "/root/folder1/file2/index.ts", + "/root/folder1/file2/index.tsx", + "/root/folder1/file2/index.d.ts" + // then first attempt on 'generated/*' was successful + ]); + check("folder2/file3", file3, [ + // first try '*' + "/root/folder2/file3.ts", + "/root/folder2/file3.tsx", + "/root/folder2/file3.d.ts", + "/root/folder2/file3/package.json", + "/root/folder2/file3/index.ts", + "/root/folder2/file3/index.tsx", + "/root/folder2/file3/index.d.ts", + // then use remapped location + "/root/generated/folder2/file3.ts", + "/root/generated/folder2/file3.tsx", + "/root/generated/folder2/file3.d.ts", + "/root/generated/folder2/file3/package.json", + "/root/generated/folder2/file3/index.ts", + "/root/generated/folder2/file3/index.tsx", + // success on index.d.ts + ]); + check("folder2/file4", file4, [ + // first try '*' + "/root/folder2/file4.ts", + "/root/folder2/file4.tsx", + "/root/folder2/file4.d.ts", + "/root/folder2/file4/package.json", + "/root/folder2/file4/index.ts", + "/root/folder2/file4/index.tsx", + "/root/folder2/file4/index.d.ts", + // try to load from file from remapped location + "/root/generated/folder2/file4.ts", + "/root/generated/folder2/file4.tsx", + "/root/generated/folder2/file4.d.ts" + // success on loading as from folder + ]); + check("somefolder/file5", file5, [ + // load from remapped location + // first load from fle + "/root/someanotherfolder/file5.ts", + "/root/someanotherfolder/file5.tsx", + "/root/someanotherfolder/file5.d.ts", + // load from folder + "/root/someanotherfolder/file5/package.json", + "/root/someanotherfolder/file5/index.ts", + "/root/someanotherfolder/file5/index.tsx", + // success on index.d.ts + ]); + check("file6", file6, [ + // first try * + // load from file + "/root/file6.ts", + "/root/file6.tsx", + "/root/file6.d.ts", + // load from folder + "/root/file6/package.json", + "/root/file6/index.ts", + "/root/file6/index.tsx", + "/root/file6/index.d.ts", + // then try 'generated/*' + // load from file + "/root/generated/file6.ts", + "/root/generated/file6.tsx", + "/root/generated/file6.d.ts", + // load from folder + "/root/generated/file6/package.json", + "/root/generated/file6/index.ts", + "/root/generated/file6/index.tsx", + "/root/generated/file6/index.d.ts", + // fallback to standard node behavior + // load from file + "/root/folder1/node_modules/file6.ts", + "/root/folder1/node_modules/file6.tsx", + "/root/folder1/node_modules/file6.d.ts", + // load from folder + "/root/folder1/node_modules/file6/package.json", + "/root/folder1/node_modules/file6/index.ts", + "/root/folder1/node_modules/file6/index.tsx", + "/root/folder1/node_modules/file6/index.d.ts", + // success on /root/node_modules/file6.ts + ]); + + function check(name: string, expected: File, expectedFailedLookups: string[]) { + const result = resolveModuleName(name, main.name, options, host); assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); - assert.equal(result.resolvedModule.resolvedFileName, file2.name); - assert.deepEqual(result.failedLookupLocations, []); + assert.equal(result.resolvedModule.resolvedFileName, expected.name); + assert.deepEqual(result.failedLookupLocations, expectedFailedLookups); } - { - const result = baseUrlModuleNameResolver("./file2", file1.name, options, host); - assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); - assert.equal(result.resolvedModule.resolvedFileName, file2.name); - assert.deepEqual(result.failedLookupLocations, []); - } - { - const result = baseUrlModuleNameResolver("folder1/file3", file1.name, options, host); - assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); - assert.equal(result.resolvedModule.resolvedFileName, file3.name); - // non-empty because it tries to use '*' match first - assert.deepEqual(result.failedLookupLocations, [ - "/root/folder1/file3.ts", - "/root/folder1/file3.tsx", - "/root/folder1/file3.d.ts", - ]); - } - { - const result = baseUrlModuleNameResolver("folder2/file4", file1.name, options, host); - assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); - assert.equal(result.resolvedModule.resolvedFileName, file4.name); - assert.deepEqual(result.failedLookupLocations, [ - "/root/folder2/file4.ts", - "/root/folder2/file4.tsx", - "/root/folder2/file4.d.ts", - ]); - } - { - const result = baseUrlModuleNameResolver("somefolder/file5", file1.name, options, host); - assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); - assert.equal(result.resolvedModule.resolvedFileName, file5.name); - assert.deepEqual(result.failedLookupLocations, []); - } - // add failure tests } }); - it("module resolution with path mappings and root dirs", () => { + it ("classic + baseUrl + path mappings", () => { + test(/*hasDirectoryExists*/ false); + test(/*hasDirectoryExists*/ true); + + function test(hasDirectoryExists: boolean) { + const main: File = { name: "/root/folder1/main.ts" }; + + const file1: File = { name: "/root/folder1/file1.ts" }; + const file2: File = { name: "/root/generated/folder1/file2.ts" }; + const file3: File = { name: "/folder1/file3.ts" }; // fallback to classic + const host = createModuleResolutionHost(hasDirectoryExists, file1, file2, file3); + + const options: CompilerOptions = { + moduleResolution: ModuleResolutionKind.Classic, + baseUrl: "/root", + paths: { + "*": [ + "*", + "generated/*" + ], + "somefolder/*": [ + "someanotherfolder/*" + ] + } + }; + check("folder1/file1", file1, []); + check("folder1/file2", file2, [ + // first try '*' + "/root/folder1/file2.ts", + "/root/folder1/file2.tsx", + "/root/folder1/file2.d.ts", + // success when using 'generated/*' + ]); + check("folder1/file3", file3, [ + // first try '*' + "/root/folder1/file3.ts", + "/root/folder1/file3.tsx", + "/root/folder1/file3.d.ts", + // then try 'generated/*' + "/root/generated/folder1/file3.ts", + "/root/generated/folder1/file3.tsx", + "/root/generated/folder1/file3.d.ts", + // fallback to classic + "/root/folder1/folder1/file3.ts", + "/root/folder1/folder1/file3.tsx", + "/root/folder1/folder1/file3.d.ts", + "/root/folder1/file3.ts", + "/root/folder1/file3.tsx", + "/root/folder1/file3.d.ts", + ]); + + function check(name: string, expected: File, expectedFailedLookups: string[]) { + const result = resolveModuleName(name, main.name, options, host); + assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); + assert.equal(result.resolvedModule.resolvedFileName, expected.name); + assert.deepEqual(result.failedLookupLocations, expectedFailedLookups); + } + } + }) + + it ("node + rootDirs", () => { + test(/*hasDirectoryExists*/ false); + test(/*hasDirectoryExists*/ true); + + function test(hasDirectoryExists: boolean) { + let file1: File = { name: "/root/folder1/file1.ts" }; + let file1_1: File = { name: "/root/folder1/file1_1/index.d.ts" }; + let file2: File = { name: "/root/generated/folder1/file2.ts" }; + let file3: File = { name: "/root/generated/folder2/file3.ts" }; + const host = createModuleResolutionHost(hasDirectoryExists, file1, file1_1, file2, file3); + const options: CompilerOptions = { + moduleResolution: ModuleResolutionKind.NodeJs, + rootDirs: [ + "/root", + "/root/generated/" + ] + }; + check("./file2", file1, file2, [ + // first try current location + // load from file + "/root/folder1/file2.ts", + "/root/folder1/file2.tsx", + "/root/folder1/file2.d.ts", + // load from folder + "/root/folder1/file2/package.json", + "/root/folder1/file2/index.ts", + "/root/folder1/file2/index.tsx", + "/root/folder1/file2/index.d.ts", + // success after using alternative rootDir entry + ]); + check("../folder1/file1", file3, file1, [ + // first try current location + // load from file + "/root/generated/folder1/file1.ts", + "/root/generated/folder1/file1.tsx", + "/root/generated/folder1/file1.d.ts", + // load from module + "/root/generated/folder1/file1/package.json", + "/root/generated/folder1/file1/index.ts", + "/root/generated/folder1/file1/index.tsx", + "/root/generated/folder1/file1/index.d.ts", + // success after using alternative rootDir entry + ]); + check("../folder1/file1_1", file3, file1_1, [ + // first try current location + // load from file + "/root/generated/folder1/file1_1.ts", + "/root/generated/folder1/file1_1.tsx", + "/root/generated/folder1/file1_1.d.ts", + // load from folder + "/root/generated/folder1/file1_1/package.json", + "/root/generated/folder1/file1_1/index.ts", + "/root/generated/folder1/file1_1/index.tsx", + "/root/generated/folder1/file1_1/index.d.ts", + // try alternative rootDir entry + // load from file + "/root/folder1/file1_1.ts", + "/root/folder1/file1_1.tsx", + "/root/folder1/file1_1.d.ts", + // load from directory + "/root/folder1/file1_1/package.json", + "/root/folder1/file1_1/index.ts", + "/root/folder1/file1_1/index.tsx", + // success on loading '/root/folder1/file1_1/index.d.ts' + ]); + + function check(name: string, container: File, expected: File, expectedFailedLookups: string[]) { + const result = resolveModuleName(name, container.name, options, host); + assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); + assert.equal(result.resolvedModule.resolvedFileName, expected.name); + assert.deepEqual(result.failedLookupLocations,expectedFailedLookups); + } + } + }); + + it ("classic + rootDirs", () => { test(/*hasDirectoryExists*/ false); test(/*hasDirectoryExists*/ true); @@ -567,39 +818,85 @@ import b = require("./moduleB.ts"); let file1: File = { name: "/root/folder1/file1.ts" }; let file2: File = { name: "/root/generated/folder1/file2.ts" }; let file3: File = { name: "/root/generated/folder2/file3.ts" }; - const host = createModuleResolutionHost(hasDirectoryExists, file1, file2, file3); + let file4: File = { name: "/folder1/file1_1.ts" }; + const host = createModuleResolutionHost(hasDirectoryExists, file1, file2, file3, file4); const options: CompilerOptions = { - moduleResolution: ModuleResolutionKind.BaseUrl, - baseUrl: "/root", - paths: { - "*": [ - "*", - "generated/*" - ] - }, + moduleResolution: ModuleResolutionKind.Classic, rootDirs: [ "/root", "/root/generated/" ] }; - { - const result = baseUrlModuleNameResolver("./file2", file1.name, options, host); + check("./file2", file1, file2, [ + // first load from current location + "/root/folder1/file2.ts", + "/root/folder1/file2.tsx", + "/root/folder1/file2.d.ts", + // then try alternative rootDir entry + ]); + check("../folder1/file1", file3, file1, [ + // first load from current location + "/root/generated/folder1/file1.ts", + "/root/generated/folder1/file1.tsx", + "/root/generated/folder1/file1.d.ts", + // then try alternative rootDir entry + ]); + check("../folder1/file1_1", file3, file4, [ + // load from initial location + "/root/generated/folder1/file1_1.ts", + "/root/generated/folder1/file1_1.tsx", + "/root/generated/folder1/file1_1.d.ts", + // load from alternative rootDir entry + "/root/folder1/file1_1.ts", + "/root/folder1/file1_1.tsx", + "/root/folder1/file1_1.d.ts", + // fallback to classic + // step1: initial location + "/root/generated/folder1/file1_1.ts", + "/root/generated/folder1/file1_1.tsx", + "/root/generated/folder1/file1_1.d.ts", + // step2: walk 1 level up + "/root/folder1/file1_1.ts", + "/root/folder1/file1_1.tsx", + "/root/folder1/file1_1.d.ts", + ]); + + function check(name: string, container: File, expected: File, expectedFailedLookups: string[]) { + const result = resolveModuleName(name, container.name, options, host); assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); - assert.equal(result.resolvedModule.resolvedFileName, file2.name); - assert.deepEqual(result.failedLookupLocations, [ - "/root/folder1/file2.ts", - "/root/folder1/file2.tsx", - "/root/folder1/file2.d.ts", - ]); - } - { - const result = baseUrlModuleNameResolver("../folder1/file1", file3.name, options, host); - assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); - assert.equal(result.resolvedModule.resolvedFileName, file1.name); - assert.deepEqual(result.failedLookupLocations, []); + assert.equal(result.resolvedModule.resolvedFileName, expected.name); + assert.deepEqual(result.failedLookupLocations,expectedFailedLookups); } } }); + + it ("nested node module", () => { + test(/*hasDirectoryExists*/ false); + test(/*hasDirectoryExists*/ true); + + function test(hasDirectoryExists: boolean) { + const app: File = { name: "/root/src/app.ts" } + const libsPackage: File = { name: "/root/src/libs/guid/package.json", content: JSON.stringify({ typings: "dist/guid.d.ts" }) }; + const libsTypings: File = { name: "/root/src/libs/guid/dist/guid.d.ts" }; + const host = createModuleResolutionHost(hasDirectoryExists, app, libsPackage, libsTypings); + const options: CompilerOptions = { + moduleResolution: ModuleResolutionKind.NodeJs, + baseUrl: "/root", + paths: { + "libs/guid": [ "src/libs/guid" ] + } + }; + const result = resolveModuleName("libs/guid", app.name, options, host); + assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); + assert.equal(result.resolvedModule.resolvedFileName, libsTypings.name); + assert.deepEqual(result.failedLookupLocations, [ + // first try to load module as file + "/root/src/libs/guid.ts", + "/root/src/libs/guid.tsx", + "/root/src/libs/guid.d.ts", + ]); + } + }) }); function notImplemented(name: string): () => any { From bfd6ca04af5fb79815cf9c76a69fb1256a37183e Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Mon, 25 Jan 2016 13:25:22 -0800 Subject: [PATCH 077/160] baseline-accept --- .../jsFileCompilationTypeAssertions.errors.txt | 9 ++++++--- .../getJavaScriptSemanticDiagnostics20.ts | 16 ---------------- 2 files changed, 6 insertions(+), 19 deletions(-) delete mode 100644 tests/cases/fourslash/getJavaScriptSemanticDiagnostics20.ts diff --git a/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt b/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt index e73ee46fb89..662eea4d405 100644 --- a/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt @@ -1,9 +1,12 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. -tests/cases/compiler/a.js(1,10): error TS8016: 'type assertion expressions' can only be used in a .ts file. +tests/cases/compiler/a.js(1,10): error TS17008: JSX element 'string' has no corresponding closing tag. +tests/cases/compiler/a.js(1,27): error TS1005: 'undefined; ~~~~~~ -!!! error TS8016: 'type assertion expressions' can only be used in a .ts file. \ No newline at end of file +!!! error TS17008: JSX element 'string' has no corresponding closing tag. + +!!! error TS1005: ' - -// @allowJs: true -// @Filename: a.js -//// var v = undefined; - -verify.getSyntacticDiagnostics(`[]`); -verify.getSemanticDiagnostics(`[ - { - "message": "'type assertion expressions' can only be used in a .ts file.", - "start": 9, - "length": 6, - "category": "error", - "code": 8016 - } -]`); \ No newline at end of file From c38021ffb8db7fdd081823d603cdf5af8da606e7 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Mon, 25 Jan 2016 13:38:00 -0800 Subject: [PATCH 078/160] Lint --- src/compiler/parser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 16196e277dc..09df49d748c 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -546,7 +546,7 @@ namespace ts { function getLanguageVariant(fileName: string) { // .tsx and .jsx files are treated as jsx language variant. - return fileExtensionIs(fileName, ".tsx") || fileExtensionIs(fileName, ".jsx") || fileExtensionIs(fileName, '.js') ? LanguageVariant.JSX : LanguageVariant.Standard; + return fileExtensionIs(fileName, ".tsx") || fileExtensionIs(fileName, ".jsx") || fileExtensionIs(fileName, ".js") ? LanguageVariant.JSX : LanguageVariant.Standard; } function initializeState(fileName: string, _sourceText: string, languageVersion: ScriptTarget, isJavaScriptFile: boolean, _syntaxCursor: IncrementalParser.SyntaxCursor) { From add91052bb8dbf011b7170b03dca73d211bd210b Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Mon, 25 Jan 2016 17:08:15 -0800 Subject: [PATCH 079/160] Update version --- package.json | 2 +- src/compiler/program.ts | 2 +- src/services/shims.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 261cdfa64b7..cc74bf2c27c 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "typescript", "author": "Microsoft Corp.", "homepage": "http://typescriptlang.org/", - "version": "1.8.0", + "version": "1.9.0", "license": "Apache-2.0", "description": "TypeScript is a language for application scale JavaScript development", "keywords": [ diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 398ce27ef48..3fed8dcb596 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -12,7 +12,7 @@ namespace ts { const emptyArray: any[] = []; - export const version = "1.8.0"; + export const version = "1.9.0"; export function findConfigFile(searchPath: string, fileExists: (fileName: string) => boolean): string { let fileName = "tsconfig.json"; diff --git a/src/services/shims.ts b/src/services/shims.ts index 9ca3f19244d..e836eeed3e0 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -1057,6 +1057,6 @@ namespace TypeScript.Services { // TODO: it should be moved into a namespace though. /* @internal */ -const toolsVersion = "1.8"; +const toolsVersion = "1.9"; /* tslint:enable:no-unused-variable */ \ No newline at end of file From 3e0c84e43b43bd08ce587cd08882e910a08ce9fc Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Mon, 25 Jan 2016 17:44:07 -0800 Subject: [PATCH 080/160] PR feedback --- src/compiler/checker.ts | 83 +++++++++++++++++++++++++++++++++-------- 1 file changed, 67 insertions(+), 16 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index ca41e509664..c628f254aba 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -376,8 +376,8 @@ namespace ts { const moduleAugmentation = moduleName.parent; if (moduleAugmentation.symbol.valueDeclaration !== moduleAugmentation) { // this is a combined symbol for multiple augmentations within the same file. - // its symbol already has accumulated information for all declarations - // so we need to add it just once - do the work only for first declaration + // its symbol already has accumulated information for all declarations + // so we need to add it just once - do the work only for first declaration Debug.assert(moduleAugmentation.symbol.declarations.length > 1); return; } @@ -386,7 +386,7 @@ namespace ts { mergeSymbolTable(globals, moduleAugmentation.symbol.exports); } else { - // find a module that about to be augmented + // find a module that about to be augmented let mainModule = resolveExternalModuleNameWorker(moduleName, moduleName, Diagnostics.Invalid_module_name_in_augmentation_module_0_cannot_be_found); if (!mainModule) { return; @@ -810,7 +810,7 @@ namespace ts { } // No static member is present. - // Check if we're in an instance method and look for a relevant instance member. + // Check if we're in an instance method and look for a relevant instance member. if (location === container && !(location.flags & NodeFlags.Static)) { const instanceType = (getDeclaredTypeOfSymbol(classSymbol)).thisType; if (getPropertyOfType(instanceType, name)) { @@ -1161,7 +1161,7 @@ namespace ts { return getMergedSymbol(sourceFile.symbol); } if (moduleNotFoundError) { - // report errors only if it was requested + // report errors only if it was requested error(moduleReferenceLiteral, Diagnostics.File_0_is_not_a_module, sourceFile.fileName); } return undefined; @@ -7115,14 +7115,10 @@ namespace ts { return false; } - function isSuperPropertyAccess(node: Node) { - return node.kind === SyntaxKind.PropertyAccessExpression - && (node).expression.kind === SyntaxKind.SuperKeyword; - } - - function isSuperElementAccess(node: Node) { - return node.kind === SyntaxKind.ElementAccessExpression - && (node).expression.kind === SyntaxKind.SuperKeyword; + function isSuperPropertyOrElementAccess(node: Node) { + return (node.kind === SyntaxKind.PropertyAccessExpression + || node.kind === SyntaxKind.ElementAccessExpression) + && (node).expression.kind === SyntaxKind.SuperKeyword; } function checkSuperExpression(node: Node): Type { @@ -7177,8 +7173,63 @@ namespace ts { getNodeLinks(node).flags |= nodeCheckFlag; // Due to how we emit async functions, we need to specialize the emit for an async method that contains a `super` reference. + // This is due to the fact that we emit the body of an async function inside of a generator function. As generator + // functions cannot reference `super`, we emit a helper inside of the method body, but outside of the generator. This helper + // uses an arrow function, which is permitted to reference `super`. + // + // There are two primary ways we can access `super` from within an async method. The first is getting the value of a property + // or indexed access on super, either as part of a right-hand-side expression or call expression. The second is when setting the value + // of a property or indexed access, either as part of an assignment expression or destructuring assignment. + // + // The simplest case is reading a value, in which case we will emit something like the following: + // + // // ts + // ... + // async asyncMethod() { + // let x = await super.asyncMethod(); + // return x; + // } + // ... + // + // // js + // ... + // asyncMethod() { + // const _super = name => super[name]; + // return __awaiter(this, arguments, Promise, function *() { + // let x = yield _super("asyncMethod").call(this); + // return x; + // }); + // } + // ... + // + // The more complex case is when we wish to assign a value, especially as part of a destructuring assignment. As both cases + // are legal in ES6, but also likely less frequent, we emit the same more complex helper for both scenarios: + // + // // ts + // ... + // async asyncMethod(ar: Promise) { + // [super.a, super.b] = await ar; + // } + // ... + // + // // js + // ... + // asyncMethod(ar) { + // const _super = (function (geti, seti) { + // const cache = Object.create(null); + // return name => cache[name] || (cache[name] = { get value() { return geti(name); }, set value(v) { seti(name, v); } }); + // })(name => super[name], (name, value) => super[name] = value); + // return __awaiter(this, arguments, Promise, function *() { + // [_super("a").value, _super("b").value] = yield ar; + // }); + // } + // ... + // + // This helper creates an object with a "value" property that wraps the `super` property or indexed access for both get and set. + // This is required for destructuring assignments, as a call expression cannot be used as the target of a destructuring assignment + // while a property access can. if (container.kind === SyntaxKind.MethodDeclaration && container.flags & NodeFlags.Async) { - if ((isSuperPropertyAccess(node.parent) || isSuperElementAccess(node.parent)) && isAssignmentTarget(node.parent)) { + if (isSuperPropertyOrElementAccess(node.parent) && isAssignmentTarget(node.parent)) { getNodeLinks(container).flags |= NodeCheckFlags.AsyncMethodWithSuperBinding; } else { @@ -14224,10 +14275,10 @@ namespace ts { if (isAmbientExternalModule) { if (isExternalModuleAugmentation(node)) { // body of the augmentation should be checked for consistency only if augmentation was applied to its target (either global scope or module) - // otherwise we'll be swamped in cascading errors. + // otherwise we'll be swamped in cascading errors. // We can detect if augmentation was applied using following rules: // - augmentation for a global scope is always applied - // - augmentation for some external module is applied if symbol for augmentation is merged (it was combined with target module). + // - augmentation for some external module is applied if symbol for augmentation is merged (it was combined with target module). const checkBody = isGlobalAugmentation || (getSymbolOfNode(node).flags & SymbolFlags.Merged); if (checkBody) { // body of ambient external module is always a module block From 910fbba1568c745e94ce32f4a27fe19a54961474 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Tue, 26 Jan 2016 10:16:46 -0800 Subject: [PATCH 081/160] break on 'this' type in hasConstraintReferenceTo --- src/compiler/checker.ts | 2 +- tests/baselines/reference/thisTypeAsConstraint.js | 14 ++++++++++++++ .../reference/thisTypeAsConstraint.symbols | 9 +++++++++ .../baselines/reference/thisTypeAsConstraint.types | 9 +++++++++ tests/cases/compiler/thisTypeAsConstraint.ts | 4 ++++ 5 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 tests/baselines/reference/thisTypeAsConstraint.js create mode 100644 tests/baselines/reference/thisTypeAsConstraint.symbols create mode 100644 tests/baselines/reference/thisTypeAsConstraint.types create mode 100644 tests/cases/compiler/thisTypeAsConstraint.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 645b3835b93..d61cde01451 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -4285,7 +4285,7 @@ namespace ts { function hasConstraintReferenceTo(type: Type, target: TypeParameter): boolean { let checked: Type[]; - while (type && type.flags & TypeFlags.TypeParameter && !contains(checked, type)) { + while (type && !(type.flags & TypeFlags.ThisType) && type.flags & TypeFlags.TypeParameter && !contains(checked, type)) { if (type === target) { return true; } diff --git a/tests/baselines/reference/thisTypeAsConstraint.js b/tests/baselines/reference/thisTypeAsConstraint.js new file mode 100644 index 00000000000..b5a7113549d --- /dev/null +++ b/tests/baselines/reference/thisTypeAsConstraint.js @@ -0,0 +1,14 @@ +//// [thisTypeAsConstraint.ts] +class C { + public m() { + } +} + +//// [thisTypeAsConstraint.js] +var C = (function () { + function C() { + } + C.prototype.m = function () { + }; + return C; +}()); diff --git a/tests/baselines/reference/thisTypeAsConstraint.symbols b/tests/baselines/reference/thisTypeAsConstraint.symbols new file mode 100644 index 00000000000..020dd966cad --- /dev/null +++ b/tests/baselines/reference/thisTypeAsConstraint.symbols @@ -0,0 +1,9 @@ +=== tests/cases/compiler/thisTypeAsConstraint.ts === +class C { +>C : Symbol(C, Decl(thisTypeAsConstraint.ts, 0, 0)) + + public m() { +>m : Symbol(m, Decl(thisTypeAsConstraint.ts, 0, 9)) +>T : Symbol(T, Decl(thisTypeAsConstraint.ts, 1, 11)) + } +} diff --git a/tests/baselines/reference/thisTypeAsConstraint.types b/tests/baselines/reference/thisTypeAsConstraint.types new file mode 100644 index 00000000000..e55fb1f0cca --- /dev/null +++ b/tests/baselines/reference/thisTypeAsConstraint.types @@ -0,0 +1,9 @@ +=== tests/cases/compiler/thisTypeAsConstraint.ts === +class C { +>C : C + + public m() { +>m : () => void +>T : T + } +} diff --git a/tests/cases/compiler/thisTypeAsConstraint.ts b/tests/cases/compiler/thisTypeAsConstraint.ts new file mode 100644 index 00000000000..fcab82bc7cc --- /dev/null +++ b/tests/cases/compiler/thisTypeAsConstraint.ts @@ -0,0 +1,4 @@ +class C { + public m() { + } +} \ No newline at end of file From b00cae87b3f8a49cf6830ca45ea624ba90af779e Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Tue, 26 Jan 2016 11:36:20 -0800 Subject: [PATCH 082/160] Moved isSuperPropertyOrElementAccess to utilities --- src/compiler/checker.ts | 6 ------ src/compiler/emitter.ts | 12 +----------- src/compiler/utilities.ts | 10 ++++++++++ 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index c628f254aba..0cd17debfce 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -7115,12 +7115,6 @@ namespace ts { return false; } - function isSuperPropertyOrElementAccess(node: Node) { - return (node.kind === SyntaxKind.PropertyAccessExpression - || node.kind === SyntaxKind.ElementAccessExpression) - && (node).expression.kind === SyntaxKind.SuperKeyword; - } - function checkSuperExpression(node: Node): Type { const isCallExpression = node.parent.kind === SyntaxKind.CallExpression && (node.parent).expression === node; diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 762b491155b..696ad4a591e 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -2294,16 +2294,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge write(")"); } - function isSuperPropertyAccess(node: Expression): node is PropertyAccessExpression { - return node.kind === SyntaxKind.PropertyAccessExpression - && (node).expression.kind === SyntaxKind.SuperKeyword; - } - - function isSuperElementAccess(node: Expression): node is ElementAccessExpression { - return node.kind === SyntaxKind.ElementAccessExpression - && (node).expression.kind === SyntaxKind.SuperKeyword; - } - function isInAsyncMethodWithSuperInES6(node: Node) { if (languageVersion === ScriptTarget.ES6) { const container = getSuperContainer(node, /*includeFunctions*/ false); @@ -2337,7 +2327,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge superCall = true; } else { - superCall = isSuperPropertyAccess(expression) || isSuperElementAccess(expression); + superCall = isSuperPropertyOrElementAccess(expression); isAsyncMethodWithSuper = superCall && isInAsyncMethodWithSuperInES6(node); emit(expression); } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 4636c8d144c..102364a334b 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -850,6 +850,16 @@ namespace ts { } } + /** + * Determines whether a node is a property or element access expression for super. + */ + export function isSuperPropertyOrElementAccess(node: Node) { + return (node.kind === SyntaxKind.PropertyAccessExpression + || node.kind === SyntaxKind.ElementAccessExpression) + && (node).expression.kind === SyntaxKind.SuperKeyword; + } + + export function getEntityNameFromTypeNode(node: TypeNode): EntityName | Expression { if (node) { switch (node.kind) { From 35044d1293edf8fdec5a406a8a502bf84a860e6b Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Tue, 26 Jan 2016 12:47:53 -0800 Subject: [PATCH 083/160] Added error when return type is not the global Promise --- src/compiler/checker.ts | 57 ++++++++++++++++++---------- src/compiler/diagnosticMessages.json | 4 ++ 2 files changed, 41 insertions(+), 20 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index bc4fcb5aa1e..140099938c8 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -2629,7 +2629,7 @@ namespace ts { } } else if (declaration.kind === SyntaxKind.Parameter) { - // If it's a parameter, see if the parent has a jsdoc comment with an @param + // If it's a parameter, see if the parent has a jsdoc comment with an @param // annotation. const paramTag = getCorrespondingJSDocParameterTag(declaration); if (paramTag && paramTag.typeExpression) { @@ -2644,7 +2644,7 @@ namespace ts { function getTypeForVariableLikeDeclaration(declaration: VariableLikeDeclaration): Type { if (declaration.parserContextFlags & ParserContextFlags.JavaScriptFile) { // If this is a variable in a JavaScript file, then use the JSDoc type (if it has - // one as its type), otherwise fallback to the below standard TS codepaths to + // one as its type), otherwise fallback to the below standard TS codepaths to // try to figure it out. const type = getTypeForVariableLikeDeclarationFromJSDocComment(declaration); if (type && type !== unknownType) { @@ -4069,7 +4069,7 @@ namespace ts { const isJSConstructSignature = isJSDocConstructSignature(declaration); let returnType: Type = undefined; - // If this is a JSDoc construct signature, then skip the first parameter in the + // If this is a JSDoc construct signature, then skip the first parameter in the // parameter list. The first parameter represents the return type of the construct // signature. for (let i = isJSConstructSignature ? 1 : 0, n = declaration.parameters.length; i < n; i++) { @@ -4472,7 +4472,7 @@ namespace ts { } if (symbol.flags & SymbolFlags.Value && node.kind === SyntaxKind.JSDocTypeReference) { - // A JSDocTypeReference may have resolved to a value (as opposed to a type). In + // A JSDocTypeReference may have resolved to a value (as opposed to a type). In // that case, the type of this reference is just the type of the value we resolved // to. return getTypeOfSymbol(symbol); @@ -10479,7 +10479,7 @@ namespace ts { /* *TypeScript Specification 1.0 (6.3) - July 2014 - * An explicitly typed function whose return type isn't the Void type, + * An explicitly typed function whose return type isn't the Void type, * the Any type, or a union type containing the Void or Any type as a constituent * must have at least one return statement somewhere in its body. * An exception to this rule is if the function implementation consists of a single 'throw' statement. @@ -12508,6 +12508,33 @@ namespace ts { } } + /** + * Checks that the return type provided is an instantiation of the global Promise type + * and returns the awaited type of the return type. + */ + function checkCorrectPromiseType(returnType: Type, location: Node) { + if (returnType === unknownType) { + // The return type already had some other error, so we ignore and return + // the unknown type. + return unknownType; + } + + const globalPromiseType = getGlobalPromiseType(); + if (globalPromiseType === emptyGenericType + || globalPromiseType === getTargetType(returnType)) { + // Either we couldn't resolve the global promise type, which would have already + // reported an error, or we could resolve it and the return type is a valid type + // reference to the global type. In either case, we return the awaited type for + // the return type. + return checkAwaitedType(returnType, location, Diagnostics.An_async_function_or_method_must_have_a_valid_awaitable_return_type); + } + + // The promise type was not a valid type reference to the global promise type, so we + // report an error and return the unknown type. + error(location, Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T); + return unknownType; + } + /** * Checks the return type of an async function to ensure it is a compatible * Promise implementation. @@ -12522,6 +12549,11 @@ namespace ts { * callable `then` signature. */ function checkAsyncFunctionReturnType(node: FunctionLikeDeclaration): Type { + if (languageVersion >= ScriptTarget.ES6) { + const returnType = getTypeFromTypeNode(node.type); + return checkCorrectPromiseType(returnType, node.type); + } + const globalPromiseConstructorLikeType = getGlobalPromiseConstructorLikeType(); if (globalPromiseConstructorLikeType === emptyObjectType) { // If we couldn't resolve the global PromiseConstructorLike type we cannot verify @@ -12563,21 +12595,6 @@ namespace ts { return unknownType; } - if (languageVersion >= ScriptTarget.ES6) { - const promisedType = getPromisedType(promiseType); - if (!promisedType) { - error(node, Diagnostics.Type_0_is_not_a_valid_async_function_return_type, typeToString(promiseType)); - return unknownType; - } - - const promiseInstantiation = createPromiseType(promisedType); - if (!checkTypeAssignableTo(promiseInstantiation, promiseType, node.type, Diagnostics.Type_0_is_not_a_valid_async_function_return_type)) { - return unknownType; - } - - return promisedType; - } - const promiseConstructor = getNodeLinks(node.type).resolvedSymbol; if (!promiseConstructor || !symbolIsValue(promiseConstructor)) { const typeName = promiseConstructor diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index b8defa6325b..f5e6254a040 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -195,6 +195,10 @@ "category": "Error", "code": 1063 }, + "The return type of an async function or method must be the global Promise.": { + "category": "Error", + "code": 1064 + }, "In ambient enum declarations member initializer must be constant expression.": { "category": "Error", "code": 1066 From 05803f528549cd5bbf953f71170e978a538a8e8d Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Tue, 26 Jan 2016 12:55:03 -0800 Subject: [PATCH 084/160] Added comments for new flags in types.ts --- src/compiler/types.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 9da409487df..3277e7e7950 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -2058,8 +2058,8 @@ namespace ts { SuperInstance = 0x00000100, // Instance 'super' reference SuperStatic = 0x00000200, // Static 'super' reference ContextChecked = 0x00000400, // Contextual types have been assigned - AsyncMethodWithSuper = 0x00000800, - AsyncMethodWithSuperBinding = 0x00001000, + AsyncMethodWithSuper = 0x00000800, // An async method that reads a value from a member of 'super'. + AsyncMethodWithSuperBinding = 0x00001000, // An async method that assigns a value to a member of 'super'. CaptureArguments = 0x00002000, // Lexical 'arguments' used in body (for async functions) // Values for enum members have been computed, and any errors have been reported for them. From c20a70529ea49574ac929e1eb49fe93ee40d962c Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Tue, 26 Jan 2016 14:51:07 -0800 Subject: [PATCH 085/160] Updated baselines --- .../asyncFunctionDeclaration15_es6.errors.txt | 29 ++++++++++--------- .../asyncImportedPromise_es6.errors.txt | 13 +++++++++ .../reference/asyncImportedPromise_es6.js | 8 ++--- .../asyncImportedPromise_es6.symbols | 20 ------------- .../reference/asyncImportedPromise_es6.types | 20 ------------- .../asyncQualifiedReturnType_es6.errors.txt | 13 +++++++++ .../asyncQualifiedReturnType_es6.symbols | 17 ----------- .../asyncQualifiedReturnType_es6.types | 17 ----------- 8 files changed, 46 insertions(+), 91 deletions(-) create mode 100644 tests/baselines/reference/asyncImportedPromise_es6.errors.txt delete mode 100644 tests/baselines/reference/asyncImportedPromise_es6.symbols delete mode 100644 tests/baselines/reference/asyncImportedPromise_es6.types create mode 100644 tests/baselines/reference/asyncQualifiedReturnType_es6.errors.txt delete mode 100644 tests/baselines/reference/asyncQualifiedReturnType_es6.symbols delete mode 100644 tests/baselines/reference/asyncQualifiedReturnType_es6.types diff --git a/tests/baselines/reference/asyncFunctionDeclaration15_es6.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration15_es6.errors.txt index d014f9eecf3..7b682f9dcde 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration15_es6.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration15_es6.errors.txt @@ -1,30 +1,33 @@ -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(6,16): error TS1055: Type '{}' is not a valid async function return type. -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(7,16): error TS1055: Type 'any' is not a valid async function return type. -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(8,16): error TS1055: Type 'number' is not a valid async function return type. -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(10,16): error TS1055: Type 'Thenable' is not a valid async function return type. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(6,23): error TS1064: The return type of an async function or method must be the global Promise. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(7,23): error TS1064: The return type of an async function or method must be the global Promise. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(8,23): error TS1064: The return type of an async function or method must be the global Promise. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(9,23): error TS1064: The return type of an async function or method must be the global Promise. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(10,23): error TS1064: The return type of an async function or method must be the global Promise. tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(17,16): error TS1059: Return expression in async function does not have a valid callable 'then' member. tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(23,25): error TS1058: Operand for 'await' does not have a valid callable 'then' member. -==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts (6 errors) ==== +==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts (7 errors) ==== declare class Thenable { then(): void; } declare let a: any; declare let obj: { then: string; }; declare let thenable: Thenable; async function fn1() { } // valid: Promise async function fn2(): { } { } // error - ~~~ -!!! error TS1055: Type '{}' is not a valid async function return type. + ~~~ +!!! error TS1064: The return type of an async function or method must be the global Promise. async function fn3(): any { } // error - ~~~ -!!! error TS1055: Type 'any' is not a valid async function return type. + ~~~ +!!! error TS1064: The return type of an async function or method must be the global Promise. async function fn4(): number { } // error - ~~~ -!!! error TS1055: Type 'number' is not a valid async function return type. + ~~~~~~ +!!! error TS1064: The return type of an async function or method must be the global Promise. async function fn5(): PromiseLike { } // error + ~~~~~~~~~~~~~~~~~ +!!! error TS1064: The return type of an async function or method must be the global Promise. async function fn6(): Thenable { } // error - ~~~ -!!! error TS1055: Type 'Thenable' is not a valid async function return type. + ~~~~~~~~ +!!! error TS1064: The return type of an async function or method must be the global Promise. async function fn7() { return; } // valid: Promise async function fn8() { return 1; } // valid: Promise async function fn9() { return null; } // valid: Promise diff --git a/tests/baselines/reference/asyncImportedPromise_es6.errors.txt b/tests/baselines/reference/asyncImportedPromise_es6.errors.txt new file mode 100644 index 00000000000..994445dbedd --- /dev/null +++ b/tests/baselines/reference/asyncImportedPromise_es6.errors.txt @@ -0,0 +1,13 @@ +tests/cases/conformance/async/es6/test.ts(3,25): error TS1064: The return type of an async function or method must be the global Promise. + + +==== tests/cases/conformance/async/es6/task.ts (0 errors) ==== + export class Task extends Promise { } + +==== tests/cases/conformance/async/es6/test.ts (1 errors) ==== + import { Task } from "./task"; + class Test { + async example(): Task { return; } + ~~~~~~~ +!!! error TS1064: The return type of an async function or method must be the global Promise. + } \ No newline at end of file diff --git a/tests/baselines/reference/asyncImportedPromise_es6.js b/tests/baselines/reference/asyncImportedPromise_es6.js index a97d59f7e64..56a41b0283f 100644 --- a/tests/baselines/reference/asyncImportedPromise_es6.js +++ b/tests/baselines/reference/asyncImportedPromise_es6.js @@ -1,12 +1,12 @@ //// [tests/cases/conformance/async/es6/asyncImportedPromise_es6.ts] //// //// [task.ts] -export class Task extends Promise { } +export class Task extends Promise { } //// [test.ts] -import { Task } from "./task"; -class Test { - async example(): Task { return; } +import { Task } from "./task"; +class Test { + async example(): Task { return; } } //// [task.js] diff --git a/tests/baselines/reference/asyncImportedPromise_es6.symbols b/tests/baselines/reference/asyncImportedPromise_es6.symbols deleted file mode 100644 index 45cf47d2b45..00000000000 --- a/tests/baselines/reference/asyncImportedPromise_es6.symbols +++ /dev/null @@ -1,20 +0,0 @@ -=== tests/cases/conformance/async/es6/task.ts === -export class Task extends Promise { } ->Task : Symbol(Task, Decl(task.ts, 0, 0)) ->T : Symbol(T, Decl(task.ts, 0, 18)) ->Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->T : Symbol(T, Decl(task.ts, 0, 18)) - -=== tests/cases/conformance/async/es6/test.ts === -import { Task } from "./task"; ->Task : Symbol(Task, Decl(test.ts, 0, 8)) - -class Test { ->Test : Symbol(Test, Decl(test.ts, 0, 30)) - - async example(): Task { return; } ->example : Symbol(example, Decl(test.ts, 1, 12)) ->T : Symbol(T, Decl(test.ts, 2, 18)) ->Task : Symbol(Task, Decl(test.ts, 0, 8)) ->T : Symbol(T, Decl(test.ts, 2, 18)) -} diff --git a/tests/baselines/reference/asyncImportedPromise_es6.types b/tests/baselines/reference/asyncImportedPromise_es6.types deleted file mode 100644 index 424f14b34d3..00000000000 --- a/tests/baselines/reference/asyncImportedPromise_es6.types +++ /dev/null @@ -1,20 +0,0 @@ -=== tests/cases/conformance/async/es6/task.ts === -export class Task extends Promise { } ->Task : Task ->T : T ->Promise : Promise ->T : T - -=== tests/cases/conformance/async/es6/test.ts === -import { Task } from "./task"; ->Task : typeof Task - -class Test { ->Test : Test - - async example(): Task { return; } ->example : () => Task ->T : T ->Task : Task ->T : T -} diff --git a/tests/baselines/reference/asyncQualifiedReturnType_es6.errors.txt b/tests/baselines/reference/asyncQualifiedReturnType_es6.errors.txt new file mode 100644 index 00000000000..f1d01bb2a7a --- /dev/null +++ b/tests/baselines/reference/asyncQualifiedReturnType_es6.errors.txt @@ -0,0 +1,13 @@ +tests/cases/conformance/async/es6/asyncQualifiedReturnType_es6.ts(6,21): error TS1064: The return type of an async function or method must be the global Promise. + + +==== tests/cases/conformance/async/es6/asyncQualifiedReturnType_es6.ts (1 errors) ==== + namespace X { + export class MyPromise extends Promise { + } + } + + async function f(): X.MyPromise { + ~~~~~~~~~~~~~~~~~ +!!! error TS1064: The return type of an async function or method must be the global Promise. + } \ No newline at end of file diff --git a/tests/baselines/reference/asyncQualifiedReturnType_es6.symbols b/tests/baselines/reference/asyncQualifiedReturnType_es6.symbols deleted file mode 100644 index 5d27d04ea3b..00000000000 --- a/tests/baselines/reference/asyncQualifiedReturnType_es6.symbols +++ /dev/null @@ -1,17 +0,0 @@ -=== tests/cases/conformance/async/es6/asyncQualifiedReturnType_es6.ts === -namespace X { ->X : Symbol(X, Decl(asyncQualifiedReturnType_es6.ts, 0, 0)) - - export class MyPromise extends Promise { ->MyPromise : Symbol(MyPromise, Decl(asyncQualifiedReturnType_es6.ts, 0, 13)) ->T : Symbol(T, Decl(asyncQualifiedReturnType_es6.ts, 1, 27)) ->Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->T : Symbol(T, Decl(asyncQualifiedReturnType_es6.ts, 1, 27)) - } -} - -async function f(): X.MyPromise { ->f : Symbol(f, Decl(asyncQualifiedReturnType_es6.ts, 3, 1)) ->X : Symbol(X, Decl(asyncQualifiedReturnType_es6.ts, 0, 0)) ->MyPromise : Symbol(X.MyPromise, Decl(asyncQualifiedReturnType_es6.ts, 0, 13)) -} diff --git a/tests/baselines/reference/asyncQualifiedReturnType_es6.types b/tests/baselines/reference/asyncQualifiedReturnType_es6.types deleted file mode 100644 index 3b438eb93b6..00000000000 --- a/tests/baselines/reference/asyncQualifiedReturnType_es6.types +++ /dev/null @@ -1,17 +0,0 @@ -=== tests/cases/conformance/async/es6/asyncQualifiedReturnType_es6.ts === -namespace X { ->X : typeof X - - export class MyPromise extends Promise { ->MyPromise : MyPromise ->T : T ->Promise : Promise ->T : T - } -} - -async function f(): X.MyPromise { ->f : () => X.MyPromise ->X : any ->MyPromise : X.MyPromise -} From 39c75fd438ba22371be0072effa9fe89731938ce Mon Sep 17 00:00:00 2001 From: Kanchalai Tanglertsampan Date: Tue, 26 Jan 2016 15:34:53 -0800 Subject: [PATCH 086/160] Simplify giving error message and remove unnecessary error --- src/compiler/checker.ts | 36 +++++++++++++----------------------- 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 927e00faf8c..e52982576b6 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -11471,25 +11471,8 @@ namespace ts { const containingClassSymbol = getSymbolOfNode(containingClassDecl); const containingClassInstanceType = getDeclaredTypeOfSymbol(containingClassSymbol); const baseConstructorType = getBaseConstructorTypeOfClass(containingClassInstanceType); - const statements = (node.body).statements; - let superCallStatement: ExpressionStatement; - let isSuperCallFirstStatment: boolean; - for (const statement of statements) { - if (statement.kind === SyntaxKind.ExpressionStatement && isSuperCallExpression((statement).expression)) { - superCallStatement = statement; - if (isSuperCallFirstStatment === undefined) { - isSuperCallFirstStatment = true; - } - } - else if (isSuperCallFirstStatment === undefined && !isPrologueDirective(statement)) { - isSuperCallFirstStatment = false; - } - } - - // The main different between looping through each statement in constructor and calling containsSuperCall is that, - // containsSuperCall will consider "super" inside computed-property for inner class declaration - if (superCallStatement || containsSuperCall(node.body)) { + if (containsSuperCall(node.body)) { if (baseConstructorType === nullType) { error(node, Diagnostics.A_constructor_cannot_contain_a_super_call_when_its_class_extends_null); } @@ -11506,12 +11489,19 @@ namespace ts { // Skip past any prologue directives to find the first statement // to ensure that it was a super call. if (superCallShouldBeFirst) { - if (!isSuperCallFirstStatment) { - error(superCallStatement, Diagnostics.A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_or_has_parameter_properties); + const statements = (node.body).statements; + let superCallStatement: ExpressionStatement; + for (const statement of statements) { + if (statement.kind === SyntaxKind.ExpressionStatement && isSuperCallExpression((statement).expression)) { + superCallStatement = statement; + break; + } + if (!isPrologueDirective(statement)) { + break; + } } - else { - // In such a required super call, it is a compile-time error for argument expressions to reference this. - markThisReferencesAsErrors(superCallStatement.expression); + if (!superCallStatement) { + error(node, Diagnostics.A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_or_has_parameter_properties); } } } From f4290e1538c21baff189b813dcc0e1c64c3f9a71 Mon Sep 17 00:00:00 2001 From: Kanchalai Tanglertsampan Date: Tue, 26 Jan 2016 15:37:19 -0800 Subject: [PATCH 087/160] Update baselines --- .../baselines/reference/baseCheck.errors.txt | 11 +----- .../reference/classUpdateTests.errors.txt | 18 ++++++--- ...derivedClassParameterProperties.errors.txt | 38 +++++++++++++------ ...rivedClassSuperCallsWithThisArg.errors.txt | 8 +--- .../strictModeInConstructor.errors.txt | 10 +++-- .../thisInInvalidContexts.errors.txt | 5 +-- ...InInvalidContextsExternalModule.errors.txt | 5 +-- .../reference/thisInSuperCall.errors.txt | 8 +--- .../reference/thisInSuperCall1.errors.txt | 5 +-- .../reference/thisInSuperCall2.errors.txt | 5 +-- .../reference/thisInSuperCall3.errors.txt | 5 +-- 11 files changed, 53 insertions(+), 65 deletions(-) diff --git a/tests/baselines/reference/baseCheck.errors.txt b/tests/baselines/reference/baseCheck.errors.txt index d4af255c972..c31ba95476a 100644 --- a/tests/baselines/reference/baseCheck.errors.txt +++ b/tests/baselines/reference/baseCheck.errors.txt @@ -1,18 +1,15 @@ tests/cases/compiler/baseCheck.ts(9,18): error TS2304: Cannot find name 'loc'. tests/cases/compiler/baseCheck.ts(17,53): error TS2346: Supplied parameters do not match any signature of call target. -tests/cases/compiler/baseCheck.ts(17,59): error TS2332: 'this' cannot be referenced in current location. tests/cases/compiler/baseCheck.ts(17,59): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. -tests/cases/compiler/baseCheck.ts(18,62): error TS2332: 'this' cannot be referenced in current location. tests/cases/compiler/baseCheck.ts(18,62): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. tests/cases/compiler/baseCheck.ts(19,59): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. -tests/cases/compiler/baseCheck.ts(19,68): error TS2332: 'this' cannot be referenced in current location. tests/cases/compiler/baseCheck.ts(19,68): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. tests/cases/compiler/baseCheck.ts(22,9): error TS2304: Cannot find name 'x'. tests/cases/compiler/baseCheck.ts(23,7): error TS2304: Cannot find name 'x'. tests/cases/compiler/baseCheck.ts(26,9): error TS2304: Cannot find name 'x'. -==== tests/cases/compiler/baseCheck.ts (12 errors) ==== +==== tests/cases/compiler/baseCheck.ts (9 errors) ==== class C { constructor(x: number, y: number) { } } class ELoc extends C { constructor(x: number) { @@ -35,20 +32,14 @@ tests/cases/compiler/baseCheck.ts(26,9): error TS2304: Cannot find name 'x'. ~~~~~~~~~~~~~ !!! error TS2346: Supplied parameters do not match any signature of call target. ~~~~ -!!! error TS2332: 'this' cannot be referenced in current location. - ~~~~ !!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. class E extends C { constructor(public z: number) { super(0, this.z) } } ~~~~ -!!! error TS2332: 'this' cannot be referenced in current location. - ~~~~ !!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. class F extends C { constructor(public z: number) { super("hello", this.z) } } // first param type ~~~~~~~ !!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. ~~~~ -!!! error TS2332: 'this' cannot be referenced in current location. - ~~~~ !!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. function f() { diff --git a/tests/baselines/reference/classUpdateTests.errors.txt b/tests/baselines/reference/classUpdateTests.errors.txt index 55965756410..59e9bc9ced1 100644 --- a/tests/baselines/reference/classUpdateTests.errors.txt +++ b/tests/baselines/reference/classUpdateTests.errors.txt @@ -1,11 +1,11 @@ tests/cases/compiler/classUpdateTests.ts(34,2): error TS2377: Constructors for derived classes must contain a 'super' call. tests/cases/compiler/classUpdateTests.ts(43,18): error TS2335: 'super' can only be referenced in a derived class. -tests/cases/compiler/classUpdateTests.ts(59,3): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. +tests/cases/compiler/classUpdateTests.ts(57,2): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. tests/cases/compiler/classUpdateTests.ts(63,7): error TS2415: Class 'L' incorrectly extends base class 'G'. Property 'p1' is private in type 'L' but not in type 'G'. tests/cases/compiler/classUpdateTests.ts(69,7): error TS2415: Class 'M' incorrectly extends base class 'G'. Property 'p1' is private in type 'M' but not in type 'G'. -tests/cases/compiler/classUpdateTests.ts(72,3): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. +tests/cases/compiler/classUpdateTests.ts(70,2): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. tests/cases/compiler/classUpdateTests.ts(93,3): error TS1128: Declaration or statement expected. tests/cases/compiler/classUpdateTests.ts(95,1): error TS1128: Declaration or statement expected. tests/cases/compiler/classUpdateTests.ts(99,3): error TS1128: Declaration or statement expected. @@ -80,11 +80,14 @@ tests/cases/compiler/classUpdateTests.ts(113,1): error TS1128: Declaration or st class K extends G { constructor(public p1:number) { // ERROR + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var i = 0; + ~~~~~~~~~~~~ super(); - ~~~~~~~~ -!!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. + ~~~~~~~~~~ } + ~~ +!!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. } class L extends G { @@ -101,11 +104,14 @@ tests/cases/compiler/classUpdateTests.ts(113,1): error TS1128: Declaration or st !!! error TS2415: Class 'M' incorrectly extends base class 'G'. !!! error TS2415: Property 'p1' is private in type 'M' but not in type 'G'. constructor(private p1:number) { // ERROR + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var i = 0; + ~~~~~~~~~~~~ super(); - ~~~~~~~~ -!!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. + ~~~~~~~~~~ } + ~~ +!!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. } // diff --git a/tests/baselines/reference/derivedClassParameterProperties.errors.txt b/tests/baselines/reference/derivedClassParameterProperties.errors.txt index fcaae2ecd22..27bb9af63a1 100644 --- a/tests/baselines/reference/derivedClassParameterProperties.errors.txt +++ b/tests/baselines/reference/derivedClassParameterProperties.errors.txt @@ -1,12 +1,12 @@ -tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(17,9): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. -tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(32,9): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(15,5): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(30,5): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(47,9): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(56,5): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(57,9): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(58,9): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. -tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(59,9): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. +tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(79,5): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(80,9): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(81,9): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. -tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(82,9): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. ==== tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts (9 errors) ==== @@ -25,11 +25,14 @@ tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassP class Derived2 extends Base { constructor(public y: string) { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var a = 1; + ~~~~~~~~~~~~~~~~~~ super(); // error - ~~~~~~~~ -!!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. + ~~~~~~~~~~~~~~~~~~~~~~~~~ } + ~~~~~ +!!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. } class Derived3 extends Base { @@ -42,11 +45,14 @@ tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassP class Derived4 extends Base { a = 1; constructor(y: string) { + ~~~~~~~~~~~~~~~~~~~~~~~~ var b = 2; + ~~~~~~~~~~~~~~~~~~ super(); // error - ~~~~~~~~ -!!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. + ~~~~~~~~~~~~~~~~~~~~~~~~~ } + ~~~~~ +!!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. } class Derived5 extends Base { @@ -72,16 +78,20 @@ tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassP a = 1; b: number; constructor(y: string) { + ~~~~~~~~~~~~~~~~~~~~~~~~ this.a = 3; + ~~~~~~~~~~~~~~~~~~~ ~~~~ !!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. this.b = 3; + ~~~~~~~~~~~~~~~~~~~ ~~~~ !!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. super(); // error - ~~~~~~~~ -!!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. + ~~~~~~~~~~~~~~~~~~~~~~~~~ } + ~~~~~ +!!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. } class Derived8 extends Base { @@ -101,16 +111,20 @@ tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassP a = 1; b: number; constructor(y: string) { + ~~~~~~~~~~~~~~~~~~~~~~~~ this.a = 3; + ~~~~~~~~~~~~~~~~~~~ ~~~~ !!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. this.b = 3; + ~~~~~~~~~~~~~~~~~~~ ~~~~ !!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. super(); // error - ~~~~~~~~ -!!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. + ~~~~~~~~~~~~~~~~~~~~~~~~~ } + ~~~~~ +!!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. } class Derived10 extends Base2 { diff --git a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.errors.txt b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.errors.txt index 450d954289a..d381eff17dc 100644 --- a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.errors.txt +++ b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.errors.txt @@ -1,10 +1,8 @@ tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts(8,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. -tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts(14,15): error TS2332: 'this' cannot be referenced in current location. tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts(14,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. -tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts(20,21): error TS2332: 'this' cannot be referenced in current location. -==== tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts (4 errors) ==== +==== tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts (2 errors) ==== class Base { x: string; constructor(a) { } @@ -22,8 +20,6 @@ tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassS constructor(public a: string) { super(this); // error ~~~~ -!!! error TS2332: 'this' cannot be referenced in current location. - ~~~~ !!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. } } @@ -31,8 +27,6 @@ tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassS class Derived3 extends Base { constructor(public a: string) { super(() => this); // error - ~~~~ -!!! error TS2332: 'this' cannot be referenced in current location. } } diff --git a/tests/baselines/reference/strictModeInConstructor.errors.txt b/tests/baselines/reference/strictModeInConstructor.errors.txt index 3c38530cc12..9a80732842a 100644 --- a/tests/baselines/reference/strictModeInConstructor.errors.txt +++ b/tests/baselines/reference/strictModeInConstructor.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/strictModeInConstructor.ts(29,9): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. +tests/cases/compiler/strictModeInConstructor.ts(27,5): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. ==== tests/cases/compiler/strictModeInConstructor.ts (1 errors) ==== @@ -29,12 +29,16 @@ tests/cases/compiler/strictModeInConstructor.ts(29,9): error TS2376: A 'super' c public s: number = 9; constructor () { + ~~~~~~~~~~~~~~~~ var x = 1; // Error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ super(); - ~~~~~~~~ -!!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. + ~~~~~~~~~~~~~~~~ "use strict"; + ~~~~~~~~~~~~~~~~~~~~~ } + ~~~~~ +!!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. } class Bs extends A { diff --git a/tests/baselines/reference/thisInInvalidContexts.errors.txt b/tests/baselines/reference/thisInInvalidContexts.errors.txt index 6e4f665a782..d33260fa108 100644 --- a/tests/baselines/reference/thisInInvalidContexts.errors.txt +++ b/tests/baselines/reference/thisInInvalidContexts.errors.txt @@ -1,6 +1,5 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(3,16): error TS2334: 'this' cannot be referenced in a static property initializer. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(14,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. -tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(22,15): error TS2332: 'this' cannot be referenced in current location. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(22,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(28,13): error TS2331: 'this' cannot be referenced in a module or namespace body. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(36,13): error TS2526: A 'this' type is available only in a non-static member of a class or interface. @@ -9,7 +8,7 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(44,9): tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(45,9): error TS2332: 'this' cannot be referenced in current location. -==== tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts (9 errors) ==== +==== tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts (8 errors) ==== //'this' in static member initializer class ErrClass1 { static t = this; // Error @@ -37,8 +36,6 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(45,9): constructor() { super(this); // Error ~~~~ -!!! error TS2332: 'this' cannot be referenced in current location. - ~~~~ !!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. } } diff --git a/tests/baselines/reference/thisInInvalidContextsExternalModule.errors.txt b/tests/baselines/reference/thisInInvalidContextsExternalModule.errors.txt index 9c8d4748ed0..6c1a257b5ea 100644 --- a/tests/baselines/reference/thisInInvalidContextsExternalModule.errors.txt +++ b/tests/baselines/reference/thisInInvalidContextsExternalModule.errors.txt @@ -1,6 +1,5 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(3,16): error TS2334: 'this' cannot be referenced in a static property initializer. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(14,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. -tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(22,15): error TS2332: 'this' cannot be referenced in current location. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(22,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(28,13): error TS2331: 'this' cannot be referenced in a module or namespace body. tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(36,13): error TS2526: A 'this' type is available only in a non-static member of a class or interface. @@ -10,7 +9,7 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalMod tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(48,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file. -==== tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts (10 errors) ==== +==== tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts (9 errors) ==== //'this' in static member initializer class ErrClass1 { static t = this; // Error @@ -38,8 +37,6 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalMod constructor() { super(this); // Error ~~~~ -!!! error TS2332: 'this' cannot be referenced in current location. - ~~~~ !!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. } } diff --git a/tests/baselines/reference/thisInSuperCall.errors.txt b/tests/baselines/reference/thisInSuperCall.errors.txt index 37a28513cd4..d1eeb1d2b2b 100644 --- a/tests/baselines/reference/thisInSuperCall.errors.txt +++ b/tests/baselines/reference/thisInSuperCall.errors.txt @@ -1,11 +1,9 @@ tests/cases/compiler/thisInSuperCall.ts(7,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. -tests/cases/compiler/thisInSuperCall.ts(14,15): error TS2332: 'this' cannot be referenced in current location. tests/cases/compiler/thisInSuperCall.ts(14,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. -tests/cases/compiler/thisInSuperCall.ts(20,15): error TS2332: 'this' cannot be referenced in current location. tests/cases/compiler/thisInSuperCall.ts(20,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. -==== tests/cases/compiler/thisInSuperCall.ts (5 errors) ==== +==== tests/cases/compiler/thisInSuperCall.ts (3 errors) ==== class Base { constructor(x: any) {} } @@ -23,8 +21,6 @@ tests/cases/compiler/thisInSuperCall.ts(20,15): error TS17009: 'super' must be c constructor() { super(this); // error ~~~~ -!!! error TS2332: 'this' cannot be referenced in current location. - ~~~~ !!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. } } @@ -33,8 +29,6 @@ tests/cases/compiler/thisInSuperCall.ts(20,15): error TS17009: 'super' must be c constructor(public p) { super(this); // error ~~~~ -!!! error TS2332: 'this' cannot be referenced in current location. - ~~~~ !!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. } } \ No newline at end of file diff --git a/tests/baselines/reference/thisInSuperCall1.errors.txt b/tests/baselines/reference/thisInSuperCall1.errors.txt index 752b0d5c0dc..20bc502ab79 100644 --- a/tests/baselines/reference/thisInSuperCall1.errors.txt +++ b/tests/baselines/reference/thisInSuperCall1.errors.txt @@ -1,8 +1,7 @@ -tests/cases/compiler/thisInSuperCall1.ts(7,15): error TS2332: 'this' cannot be referenced in current location. tests/cases/compiler/thisInSuperCall1.ts(7,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. -==== tests/cases/compiler/thisInSuperCall1.ts (2 errors) ==== +==== tests/cases/compiler/thisInSuperCall1.ts (1 errors) ==== class Base { constructor(a: any) {} } @@ -11,8 +10,6 @@ tests/cases/compiler/thisInSuperCall1.ts(7,15): error TS17009: 'super' must be c constructor(public x: number) { super(this); ~~~~ -!!! error TS2332: 'this' cannot be referenced in current location. - ~~~~ !!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. } } diff --git a/tests/baselines/reference/thisInSuperCall2.errors.txt b/tests/baselines/reference/thisInSuperCall2.errors.txt index 8e7d49aa7b9..4e4e9b50a8e 100644 --- a/tests/baselines/reference/thisInSuperCall2.errors.txt +++ b/tests/baselines/reference/thisInSuperCall2.errors.txt @@ -1,9 +1,8 @@ tests/cases/compiler/thisInSuperCall2.ts(8,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. -tests/cases/compiler/thisInSuperCall2.ts(16,15): error TS2332: 'this' cannot be referenced in current location. tests/cases/compiler/thisInSuperCall2.ts(16,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. -==== tests/cases/compiler/thisInSuperCall2.ts (3 errors) ==== +==== tests/cases/compiler/thisInSuperCall2.ts (2 errors) ==== class Base { constructor(a: any) {} } @@ -23,8 +22,6 @@ tests/cases/compiler/thisInSuperCall2.ts(16,15): error TS17009: 'super' must be constructor() { super(this); // error ~~~~ -!!! error TS2332: 'this' cannot be referenced in current location. - ~~~~ !!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. } } diff --git a/tests/baselines/reference/thisInSuperCall3.errors.txt b/tests/baselines/reference/thisInSuperCall3.errors.txt index dd54d689562..27a7dc8b25d 100644 --- a/tests/baselines/reference/thisInSuperCall3.errors.txt +++ b/tests/baselines/reference/thisInSuperCall3.errors.txt @@ -1,8 +1,7 @@ -tests/cases/compiler/thisInSuperCall3.ts(9,15): error TS2332: 'this' cannot be referenced in current location. tests/cases/compiler/thisInSuperCall3.ts(9,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. -==== tests/cases/compiler/thisInSuperCall3.ts (2 errors) ==== +==== tests/cases/compiler/thisInSuperCall3.ts (1 errors) ==== class Base { constructor(a: any) {} } @@ -13,8 +12,6 @@ tests/cases/compiler/thisInSuperCall3.ts(9,15): error TS17009: 'super' must be c constructor() { super(this); ~~~~ -!!! error TS2332: 'this' cannot be referenced in current location. - ~~~~ !!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. } } From 655d5c934c2bf258393457551698c7377e3f1faa Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Tue, 26 Jan 2016 16:04:40 -0800 Subject: [PATCH 088/160] Comments and messages --- src/compiler/checker.ts | 5 ++++- src/compiler/diagnosticMessages.json | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 140099938c8..c7de964cdbd 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -12511,6 +12511,9 @@ namespace ts { /** * Checks that the return type provided is an instantiation of the global Promise type * and returns the awaited type of the return type. + * + * @param returnType The return type of a FunctionLikeDeclaration + * @param location The node on which to report the error. */ function checkCorrectPromiseType(returnType: Type, location: Node) { if (returnType === unknownType) { @@ -12967,7 +12970,7 @@ namespace ts { // In case of variable declaration, node.parent is variable statement so look at the variable statement's parent const parent = getDeclarationContainer(node); if (parent.kind === SyntaxKind.SourceFile && isExternalOrCommonJsModule(parent) && parent.flags & NodeFlags.HasAsyncFunctions) { - // If the declaration happens to be in external module, report error that require and exports are reserved keywords + // If the declaration happens to be in external module, report error that Promise is a reserved identifier. error(name, Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions, declarationNameToString(name), declarationNameToString(name)); } diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index f5e6254a040..27ce11f5286 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -195,7 +195,7 @@ "category": "Error", "code": 1063 }, - "The return type of an async function or method must be the global Promise.": { + "The return type of an async function or method must be the global Promise type.": { "category": "Error", "code": 1064 }, From e4ab2db9fb88520e81427e2c6f252fdbb717dcf8 Mon Sep 17 00:00:00 2001 From: zhengbli Date: Tue, 26 Jan 2016 10:51:10 -0800 Subject: [PATCH 089/160] Fix find all references for salsa --- src/compiler/checker.ts | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 645b3835b93..a3052d1f124 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -376,8 +376,8 @@ namespace ts { const moduleAugmentation = moduleName.parent; if (moduleAugmentation.symbol.valueDeclaration !== moduleAugmentation) { // this is a combined symbol for multiple augmentations within the same file. - // its symbol already has accumulated information for all declarations - // so we need to add it just once - do the work only for first declaration + // its symbol already has accumulated information for all declarations + // so we need to add it just once - do the work only for first declaration Debug.assert(moduleAugmentation.symbol.declarations.length > 1); return; } @@ -386,7 +386,7 @@ namespace ts { mergeSymbolTable(globals, moduleAugmentation.symbol.exports); } else { - // find a module that about to be augmented + // find a module that about to be augmented let mainModule = resolveExternalModuleNameWorker(moduleName, moduleName, Diagnostics.Invalid_module_name_in_augmentation_module_0_cannot_be_found); if (!mainModule) { return; @@ -812,7 +812,7 @@ namespace ts { } // No static member is present. - // Check if we're in an instance method and look for a relevant instance member. + // Check if we're in an instance method and look for a relevant instance member. if (location === container && !(location.flags & NodeFlags.Static)) { const instanceType = (getDeclaredTypeOfSymbol(classSymbol)).thisType; if (getPropertyOfType(instanceType, name)) { @@ -1163,7 +1163,7 @@ namespace ts { return getMergedSymbol(sourceFile.symbol); } if (moduleNotFoundError) { - // report errors only if it was requested + // report errors only if it was requested error(moduleReferenceLiteral, Diagnostics.File_0_is_not_a_module, sourceFile.fileName); } return undefined; @@ -2618,7 +2618,7 @@ namespace ts { } } else if (declaration.kind === SyntaxKind.Parameter) { - // If it's a parameter, see if the parent has a jsdoc comment with an @param + // If it's a parameter, see if the parent has a jsdoc comment with an @param // annotation. const paramTag = getCorrespondingJSDocParameterTag(declaration); if (paramTag && paramTag.typeExpression) { @@ -2633,7 +2633,7 @@ namespace ts { function getTypeForVariableLikeDeclaration(declaration: VariableLikeDeclaration): Type { if (declaration.parserContextFlags & ParserContextFlags.JavaScriptFile) { // If this is a variable in a JavaScript file, then use the JSDoc type (if it has - // one as its type), otherwise fallback to the below standard TS codepaths to + // one as its type), otherwise fallback to the below standard TS codepaths to // try to figure it out. const type = getTypeForVariableLikeDeclarationFromJSDocComment(declaration); if (type && type !== unknownType) { @@ -4058,7 +4058,7 @@ namespace ts { const isJSConstructSignature = isJSDocConstructSignature(declaration); let returnType: Type = undefined; - // If this is a JSDoc construct signature, then skip the first parameter in the + // If this is a JSDoc construct signature, then skip the first parameter in the // parameter list. The first parameter represents the return type of the construct // signature. for (let i = isJSConstructSignature ? 1 : 0, n = declaration.parameters.length; i < n; i++) { @@ -4461,7 +4461,7 @@ namespace ts { } if (symbol.flags & SymbolFlags.Value && node.kind === SyntaxKind.JSDocTypeReference) { - // A JSDocTypeReference may have resolved to a value (as opposed to a type). In + // A JSDocTypeReference may have resolved to a value (as opposed to a type). In // that case, the type of this reference is just the type of the value we resolved // to. return getTypeOfSymbol(symbol); @@ -10404,7 +10404,7 @@ namespace ts { /* *TypeScript Specification 1.0 (6.3) - July 2014 - * An explicitly typed function whose return type isn't the Void type, + * An explicitly typed function whose return type isn't the Void type, * the Any type, or a union type containing the Void or Any type as a constituent * must have at least one return statement somewhere in its body. * An exception to this rule is if the function implementation consists of a single 'throw' statement. @@ -14426,10 +14426,10 @@ namespace ts { if (isAmbientExternalModule) { if (isExternalModuleAugmentation(node)) { // body of the augmentation should be checked for consistency only if augmentation was applied to its target (either global scope or module) - // otherwise we'll be swamped in cascading errors. + // otherwise we'll be swamped in cascading errors. // We can detect if augmentation was applied using following rules: // - augmentation for a global scope is always applied - // - augmentation for some external module is applied if symbol for augmentation is merged (it was combined with target module). + // - augmentation for some external module is applied if symbol for augmentation is merged (it was combined with target module). const checkBody = isGlobalAugmentation || (getSymbolOfNode(node).flags & SymbolFlags.Merged); if (checkBody) { // body of ambient external module is always a module block @@ -15200,6 +15200,18 @@ namespace ts { return getSymbolOfNode(entityName.parent); } + if (isInJavaScriptFile(entityName) && entityName.parent.kind === SyntaxKind.PropertyAccessExpression) { + const specialPropertyAssignmentKind = getSpecialPropertyAssignmentKind(entityName.parent.parent); + switch (specialPropertyAssignmentKind) { + case SpecialPropertyAssignmentKind.ExportsProperty: + case SpecialPropertyAssignmentKind.ThisProperty: + case SpecialPropertyAssignmentKind.PrototypeProperty: + return getSymbolOfNode(entityName.parent); + case SpecialPropertyAssignmentKind.ModuleExports: + return getSymbolOfNode(entityName.parent.parent); + } + } + if (entityName.parent.kind === SyntaxKind.ExportAssignment) { return resolveEntityName(entityName, /*all meanings*/ SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace | SymbolFlags.Alias); From e4c0c0028704f637a6417b67879132343532a261 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Tue, 26 Jan 2016 17:34:30 -0800 Subject: [PATCH 090/160] Fixed typo in diagnostic message name --- src/compiler/checker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index c7de964cdbd..5b5196e1210 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -12534,7 +12534,7 @@ namespace ts { // The promise type was not a valid type reference to the global promise type, so we // report an error and return the unknown type. - error(location, Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T); + error(location, Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type); return unknownType; } From adacad326a3d023f82f076b2aa5f92334610226b Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Tue, 26 Jan 2016 21:38:12 -0800 Subject: [PATCH 091/160] addressed PR feedback --- src/compiler/commandLineParser.ts | 2 +- src/compiler/diagnosticMessages.json | 26 +++++++++++--------------- src/compiler/program.ts | 8 -------- 3 files changed, 12 insertions(+), 24 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 99a1c52913c..d5bf95a6405 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -258,7 +258,7 @@ namespace ts { "classic": ModuleResolutionKind.Classic, }, description: Diagnostics.Specifies_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6, - error: Diagnostics.Argument_for_moduleResolution_option_must_be_node_classic_or_baseUrl, + error: Diagnostics.Argument_for_moduleResolution_option_must_be_node_or_classic, }, { name: "allowUnusedLabels", diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 3bb5fb31750..2d677c90e7c 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -2367,7 +2367,7 @@ "category": "Error", "code": 6062 }, - "Argument for '--moduleResolution' option must be 'node', 'classic' or 'baseUrl'.": { + "Argument for '--moduleResolution' option must be 'node' or 'classic'.": { "category": "Error", "code": 6063 }, @@ -2515,49 +2515,45 @@ "category": "Message", "code": 6101 }, - "Module name '{0}' contains '!' character.": { + "Allow javascript files to be compiled.": { "category": "Message", "code": 6102 }, - "Allow javascript files to be compiled.": { - "category": "Message", - "code": 6103 - }, "Option '{0}' should have array of strings as a value.": { "category": "Error", - "code": 6104 + "code": 6103 }, "Checking if '{0}' is the longest matching prefix for '{1}' - '{2}'.": { "category": "Message", - "code": 6105 + "code": 6104 }, "Expected type of 'typings' field in 'package.json' to be 'string', got '{0}'.": { "category": "Message", - "code": 6106 + "code": 6105 }, "'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'": { "category": "Message", - "code": 6107 + "code": 6106 }, "'rootDirs' option is set, using it to resolve relative module name '{0}'": { "category": "Message", - "code": 6108 + "code": 6107 }, "Longest matching prefix for '{0}' is '{1}'": { "category": "Message", - "code": 6109 + "code": 6108 }, "Loading '{0}' from the root dir '{1}', candidate location '{2}'": { "category": "Message", - "code": 6110 + "code": 6109 }, "Trying other entries in 'rootDirs'": { "category": "Message", - "code": 6111 + "code": 6110 }, "Module resolution using 'rootDirs' has failed": { "category": "Message", - "code": 6112 + "code": 6111 }, "Variable '{0}' implicitly has an '{1}' type.": { "category": "Error", diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 910525aa8d2..90517ab3189 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -527,14 +527,6 @@ namespace ts { return createResolvedModule(resolvedFileName, /*isExternalLibraryImport*/false, failedLookupLocations); } - // module names that contain '!' are used to reference resources and are not resolved to actual files on disk - if (moduleName.indexOf("!") != -1) { - if (traceEnabled) { - trace(host, Diagnostics.Module_name_0_contains_character, moduleName); - } - return { resolvedModule: undefined, failedLookupLocations: [] }; - } - let referencedSourceFile: string; while (true) { const searchName = normalizePath(combinePaths(containingDirectory, moduleName)); From a116b4c996aa75964bfb0009f4ad456ff0d3ec16 Mon Sep 17 00:00:00 2001 From: Noj Vek Date: Tue, 26 Jan 2016 22:59:34 -0800 Subject: [PATCH 092/160] pretty output for react jsx --- src/compiler/emitter.ts | 46 ++-- tests/baselines/reference/tsxReactEmit1.js | 6 +- tests/baselines/reference/tsxReactEmit3.js | 10 +- .../reference/tsxReactEmitNesting.js | 64 ++++++ .../reference/tsxReactEmitNesting.symbols | 139 ++++++++++++ .../reference/tsxReactEmitNesting.types | 208 ++++++++++++++++++ .../reference/tsxReactEmitWhitespace.js | 6 +- .../reference/tsxReactEmitWhitespace2.js | 16 +- .../conformance/jsx/tsxReactEmitNesting.tsx | 37 ++++ 9 files changed, 507 insertions(+), 25 deletions(-) create mode 100644 tests/baselines/reference/tsxReactEmitNesting.js create mode 100644 tests/baselines/reference/tsxReactEmitNesting.symbols create mode 100644 tests/baselines/reference/tsxReactEmitNesting.types create mode 100644 tests/cases/conformance/jsx/tsxReactEmitNesting.tsx diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 44cb0ea3ccf..86378036d65 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -1257,26 +1257,20 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge // Children if (children) { - for (let i = 0; i < children.length; i++) { - // Don't emit empty expressions - if (children[i].kind === SyntaxKind.JsxExpression && !((children[i]).expression)) { - continue; - } - - // Don't emit empty strings - if (children[i].kind === SyntaxKind.JsxText) { - const text = getTextToEmit(children[i]); - if (text !== undefined) { - write(", \""); - write(text); - write("\""); - } - } - else { + // build list of valid emittable jsx children + const emittableChildren = children.filter(isJsxChildEmittable); + if (emittableChildren.length > 0) { + // If the only child is non-jsx element, don't put it on a new line + if (emittableChildren.length == 1 && emittableChildren[0].kind !== SyntaxKind.JsxElement && emittableChildren[0].kind !== SyntaxKind.JsxSelfClosingElement) { write(", "); - emit(children[i]); + emit(emittableChildren[0]); + } + // Otherwise build a indented comma separated list + else { + increaseIndent(); + emitList(emittableChildren, 0, emittableChildren.length, /*multiLine*/ true, /*trailingComma*/ false, /*leadingComma*/ true); + decreaseIndent(); } - } } @@ -7251,7 +7245,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge return result; } - function getTextToEmit(node: JsxText) { + function isJsxChildEmittable(child: JsxChild): boolean { + if (child.kind === SyntaxKind.JsxExpression) { + // Don't emit empty expressions + return !!(child).expression; + + } + else if (child.kind === SyntaxKind.JsxText) { + // Don't emit empty strings + return !!getTextToEmit(child); + } + + return true; + }; + + function getTextToEmit(node: JsxText): string { switch (compilerOptions.jsx) { case JsxEmit.React: let text = trimReactWhitespaceAndApplyEntities(node); diff --git a/tests/baselines/reference/tsxReactEmit1.js b/tests/baselines/reference/tsxReactEmit1.js index 05781ab8530..a6eac7f4824 100644 --- a/tests/baselines/reference/tsxReactEmit1.js +++ b/tests/baselines/reference/tsxReactEmit1.js @@ -70,5 +70,9 @@ var SomeClass = (function () { return SomeClass; }()); var whitespace1 = React.createElement("div", null, " "); -var whitespace2 = React.createElement("div", null, " ", p, " "); +var whitespace2 = React.createElement("div", null, + " ", + p, + " " +); var whitespace3 = React.createElement("div", null, p); diff --git a/tests/baselines/reference/tsxReactEmit3.js b/tests/baselines/reference/tsxReactEmit3.js index bd42177e187..2163a310fc8 100644 --- a/tests/baselines/reference/tsxReactEmit3.js +++ b/tests/baselines/reference/tsxReactEmit3.js @@ -8,4 +8,12 @@ declare var Foo, Bar, baz; q s ; //// [test.js] -React.createElement(Foo, null, " ", React.createElement(Bar, null, " q "), " ", React.createElement(Bar, null), " s ", React.createElement(Bar, null), React.createElement(Bar, null)); +React.createElement(Foo, null, + " ", + React.createElement(Bar, null, " q "), + " ", + React.createElement(Bar, null), + " s ", + React.createElement(Bar, null), + React.createElement(Bar, null) +); diff --git a/tests/baselines/reference/tsxReactEmitNesting.js b/tests/baselines/reference/tsxReactEmitNesting.js new file mode 100644 index 00000000000..3f12715b98c --- /dev/null +++ b/tests/baselines/reference/tsxReactEmitNesting.js @@ -0,0 +1,64 @@ +//// [file.tsx] + +declare var vdom: any; +declare var ctrl: any; +declare var model: any; + +// A simple render function with nesting and control statements +let render = (ctrl, model) => +

+
+

todos <x>

+ +
+
+ +
    + {model.filteredTodos.map((todo) => +
  • +
    + {(!todo.editable) ? + + : null + } + + +
    +
    +
    +
    +
  • + )} +
+
+
+ + + +//// [file.js] +// A simple render function with nesting and control statements +var render = function (ctrl, model) { + return vdom.createElement("section", {class: "todoapp"}, + vdom.createElement("header", {class: "header"}, + vdom.createElement("h1", null, "todos "), + vdom.createElement("input", {class: "new-todo", autofocus: true, autocomplete: "off", placeholder: "What needs to be done?", value: model.newTodo, onKeyup: ctrl.addTodo.bind(ctrl, model)}) + ), + vdom.createElement("section", {class: "main", style: { display: (model.todos && model.todos.length) ? "block" : "none" }}, + vdom.createElement("input", {class: "toggle-all", type: "checkbox", onChange: ctrl.toggleAll.bind(ctrl)}), + vdom.createElement("ul", {class: "todo-list"}, model.filteredTodos.map(function (todo) { + return vdom.createElement("li", {class: { todo: true, completed: todo.completed, editing: todo == model.editedTodo }}, + vdom.createElement("div", {class: "view"}, + (!todo.editable) ? + vdom.createElement("input", {class: "toggle", type: "checkbox"}) + : null, + vdom.createElement("label", {onDoubleClick: function () { ctrl.editTodo(todo); }}, todo.title), + vdom.createElement("button", {class: "destroy", onClick: ctrl.removeTodo.bind(ctrl, todo)}), + vdom.createElement("div", {class: "iconBorder"}, + vdom.createElement("div", {class: "icon"}) + ) + ) + ); + })) + ) + ); +}; diff --git a/tests/baselines/reference/tsxReactEmitNesting.symbols b/tests/baselines/reference/tsxReactEmitNesting.symbols new file mode 100644 index 00000000000..efccb602747 --- /dev/null +++ b/tests/baselines/reference/tsxReactEmitNesting.symbols @@ -0,0 +1,139 @@ +=== tests/cases/conformance/jsx/file.tsx === + +declare var vdom: any; +>vdom : Symbol(vdom, Decl(file.tsx, 1, 11)) + +declare var ctrl: any; +>ctrl : Symbol(ctrl, Decl(file.tsx, 2, 11)) + +declare var model: any; +>model : Symbol(model, Decl(file.tsx, 3, 11)) + +// A simple render function with nesting and control statements +let render = (ctrl, model) => +>render : Symbol(render, Decl(file.tsx, 6, 3)) +>ctrl : Symbol(ctrl, Decl(file.tsx, 6, 14)) +>model : Symbol(model, Decl(file.tsx, 6, 19)) + +
+>section : Symbol(unknown) +>class : Symbol(unknown) + +
+>header : Symbol(unknown) +>class : Symbol(unknown) + +

todos <x>

+>h1 : Symbol(unknown) +>h1 : Symbol(unknown) + + +>input : Symbol(unknown) +>class : Symbol(unknown) +>autofocus : Symbol(unknown) +>autocomplete : Symbol(unknown) +>placeholder : Symbol(unknown) +>value : Symbol(unknown) +>model : Symbol(model, Decl(file.tsx, 6, 19)) +>onKeyup : Symbol(unknown) +>ctrl : Symbol(ctrl, Decl(file.tsx, 6, 14)) +>ctrl : Symbol(ctrl, Decl(file.tsx, 6, 14)) +>model : Symbol(model, Decl(file.tsx, 6, 19)) + +
+>header : Symbol(unknown) + +
+>section : Symbol(unknown) +>class : Symbol(unknown) +>style : Symbol(unknown) +>display : Symbol(display, Decl(file.tsx, 12, 38)) +>model : Symbol(model, Decl(file.tsx, 6, 19)) +>model : Symbol(model, Decl(file.tsx, 6, 19)) + + +>input : Symbol(unknown) +>class : Symbol(unknown) +>type : Symbol(unknown) +>onChange : Symbol(unknown) +>ctrl : Symbol(ctrl, Decl(file.tsx, 6, 14)) +>ctrl : Symbol(ctrl, Decl(file.tsx, 6, 14)) + +
    +>ul : Symbol(unknown) +>class : Symbol(unknown) + + {model.filteredTodos.map((todo) => +>model : Symbol(model, Decl(file.tsx, 6, 19)) +>todo : Symbol(todo, Decl(file.tsx, 15, 42)) + +
  • +>li : Symbol(unknown) +>class : Symbol(unknown) +>todo : Symbol(todo, Decl(file.tsx, 16, 32)) +>completed : Symbol(completed, Decl(file.tsx, 16, 43)) +>todo : Symbol(todo, Decl(file.tsx, 15, 42)) +>editing : Symbol(editing, Decl(file.tsx, 16, 70)) +>todo : Symbol(todo, Decl(file.tsx, 15, 42)) +>model : Symbol(model, Decl(file.tsx, 6, 19)) + +
    +>div : Symbol(unknown) +>class : Symbol(unknown) + + {(!todo.editable) ? +>todo : Symbol(todo, Decl(file.tsx, 15, 42)) + + +>input : Symbol(unknown) +>class : Symbol(unknown) +>type : Symbol(unknown) +>input : Symbol(unknown) + + : null + } + +>label : Symbol(unknown) +>onDoubleClick : Symbol(unknown) +>ctrl : Symbol(ctrl, Decl(file.tsx, 6, 14)) +>todo : Symbol(todo, Decl(file.tsx, 15, 42)) +>todo : Symbol(todo, Decl(file.tsx, 15, 42)) +>label : Symbol(unknown) + + +>button : Symbol(unknown) +>class : Symbol(unknown) +>onClick : Symbol(unknown) +>ctrl : Symbol(ctrl, Decl(file.tsx, 6, 14)) +>ctrl : Symbol(ctrl, Decl(file.tsx, 6, 14)) +>todo : Symbol(todo, Decl(file.tsx, 15, 42)) +>button : Symbol(unknown) + +
    +>div : Symbol(unknown) +>class : Symbol(unknown) + +
    +>div : Symbol(unknown) +>class : Symbol(unknown) + +
    +>div : Symbol(unknown) + +
    +>div : Symbol(unknown) + +
  • +>li : Symbol(unknown) + + )} +
+>ul : Symbol(unknown) + +
+>section : Symbol(unknown) + +
+>section : Symbol(unknown) + + diff --git a/tests/baselines/reference/tsxReactEmitNesting.types b/tests/baselines/reference/tsxReactEmitNesting.types new file mode 100644 index 00000000000..fff29c11525 --- /dev/null +++ b/tests/baselines/reference/tsxReactEmitNesting.types @@ -0,0 +1,208 @@ +=== tests/cases/conformance/jsx/file.tsx === + +declare var vdom: any; +>vdom : any + +declare var ctrl: any; +>ctrl : any + +declare var model: any; +>model : any + +// A simple render function with nesting and control statements +let render = (ctrl, model) => +>render : (ctrl: any, model: any) => any +>(ctrl, model) =>

todos <x>

    {model.filteredTodos.map((todo) =>
  • {(!todo.editable) ? : null }
  • )}
: (ctrl: any, model: any) => any +>ctrl : any +>model : any + +
+>

todos <x>

    {model.filteredTodos.map((todo) =>
  • {(!todo.editable) ? : null }
  • )}
: any +>section : any +>class : any + +
+>

todos <x>

: any +>header : any +>class : any + +

todos <x>

+>

todos <x>

: any +>h1 : any +>h1 : any + + +> : any +>input : any +>class : any +>autofocus : any +>autocomplete : any +>placeholder : any +>value : any +>model.newTodo : any +>model : any +>newTodo : any +>onKeyup : any +>ctrl.addTodo.bind(ctrl, model) : any +>ctrl.addTodo.bind : any +>ctrl.addTodo : any +>ctrl : any +>addTodo : any +>bind : any +>ctrl : any +>model : any + +
+>header : any + +
+>
    {model.filteredTodos.map((todo) =>
  • {(!todo.editable) ? : null }
  • )}
: any +>section : any +>class : any +>style : any +>{display:(model.todos && model.todos.length) ? "block" : "none"} : { display: string; } +>display : string +>(model.todos && model.todos.length) ? "block" : "none" : string +>(model.todos && model.todos.length) : any +>model.todos && model.todos.length : any +>model.todos : any +>model : any +>todos : any +>model.todos.length : any +>model.todos : any +>model : any +>todos : any +>length : any +>"block" : string +>"none" : string + + +> : any +>input : any +>class : any +>type : any +>onChange : any +>ctrl.toggleAll.bind(ctrl) : any +>ctrl.toggleAll.bind : any +>ctrl.toggleAll : any +>ctrl : any +>toggleAll : any +>bind : any +>ctrl : any + +
    +>
      {model.filteredTodos.map((todo) =>
    • {(!todo.editable) ? : null }
    • )}
    : any +>ul : any +>class : any + + {model.filteredTodos.map((todo) => +>model.filteredTodos.map((todo) =>
  • {(!todo.editable) ? : null }
  • ) : any +>model.filteredTodos.map : any +>model.filteredTodos : any +>model : any +>filteredTodos : any +>map : any +>(todo) =>
  • {(!todo.editable) ? : null }
  • : (todo: any) => any +>todo : any + +
  • +>
  • {(!todo.editable) ? : null }
  • : any +>li : any +>class : any +>{todo: true, completed: todo.completed, editing: todo == model.editedTodo} : { todo: boolean; completed: any; editing: boolean; } +>todo : boolean +>true : boolean +>completed : any +>todo.completed : any +>todo : any +>completed : any +>editing : boolean +>todo == model.editedTodo : boolean +>todo : any +>model.editedTodo : any +>model : any +>editedTodo : any + +
    +>
    {(!todo.editable) ? : null }
    : any +>div : any +>class : any + + {(!todo.editable) ? +>(!todo.editable) ? : null : any +>(!todo.editable) : boolean +>!todo.editable : boolean +>todo.editable : any +>todo : any +>editable : any + + +> : any +>input : any +>class : any +>type : any +>input : any + + : null +>null : null + } + +> : any +>label : any +>onDoubleClick : any +>()=>{ctrl.editTodo(todo)} : () => void +>ctrl.editTodo(todo) : any +>ctrl.editTodo : any +>ctrl : any +>editTodo : any +>todo : any +>todo.title : any +>todo : any +>title : any +>label : any + + +> : any +>button : any +>class : any +>onClick : any +>ctrl.removeTodo.bind(ctrl,todo) : any +>ctrl.removeTodo.bind : any +>ctrl.removeTodo : any +>ctrl : any +>removeTodo : any +>bind : any +>ctrl : any +>todo : any +>button : any + +
    +>
    : any +>div : any +>class : any + +
    +>
    : any +>div : any +>class : any + +
    +>div : any + +
    +>div : any + + +>li : any + + )} +
+>ul : any + +
+>section : any + +
+>section : any + + diff --git a/tests/baselines/reference/tsxReactEmitWhitespace.js b/tests/baselines/reference/tsxReactEmitWhitespace.js index 9614cbf2f2c..5db92bb33a4 100644 --- a/tests/baselines/reference/tsxReactEmitWhitespace.js +++ b/tests/baselines/reference/tsxReactEmitWhitespace.js @@ -59,7 +59,11 @@ var p = 0; // Emit " " React.createElement("div", null, " "); // Emit " ", p, " " -React.createElement("div", null, " ", p, " "); +React.createElement("div", null, + " ", + p, + " " +); // Emit only p React.createElement("div", null, p); // Emit only p diff --git a/tests/baselines/reference/tsxReactEmitWhitespace2.js b/tests/baselines/reference/tsxReactEmitWhitespace2.js index f649ca43ebd..61e7805fb3d 100644 --- a/tests/baselines/reference/tsxReactEmitWhitespace2.js +++ b/tests/baselines/reference/tsxReactEmitWhitespace2.js @@ -18,8 +18,18 @@ declare var React: any; //// [file.js] // Emit ' word' in the last string -React.createElement("div", null, "word ", React.createElement("code", null, "code"), " word"); +React.createElement("div", null, + "word ", + React.createElement("code", null, "code"), + " word" +); // Same here -React.createElement("div", null, React.createElement("code", null, "code"), " word"); +React.createElement("div", null, + React.createElement("code", null, "code"), + " word" +); // And here -React.createElement("div", null, React.createElement("code", null), " word"); +React.createElement("div", null, + React.createElement("code", null), + " word" +); diff --git a/tests/cases/conformance/jsx/tsxReactEmitNesting.tsx b/tests/cases/conformance/jsx/tsxReactEmitNesting.tsx new file mode 100644 index 00000000000..6c56ed781a6 --- /dev/null +++ b/tests/cases/conformance/jsx/tsxReactEmitNesting.tsx @@ -0,0 +1,37 @@ +//@filename: file.tsx +//@jsx: react +//@reactNamespace: vdom + +declare var vdom: any; +declare var ctrl: any; +declare var model: any; + +// A simple render function with nesting and control statements +let render = (ctrl, model) => +
+
+

todos <x>

+ +
+
+ +
    + {model.filteredTodos.map((todo) => +
  • +
    + {(!todo.editable) ? + + : null + } + + +
    +
    +
    +
    +
  • + )} +
+
+
+ From 5282cad1007113b495c70c4114a19ec25bdd6954 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Wed, 27 Jan 2016 09:56:20 -0800 Subject: [PATCH 093/160] pin mocha version to 2.3.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cc74bf2c27c..48203b2c230 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ }, "devDependencies": { "jake": "latest", - "mocha": "latest", + "mocha": "2.3.4", "chai": "latest", "browserify": "latest", "istanbul": "latest", From cbb195b047b53e472acf919159b7db413a129576 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Wed, 27 Jan 2016 10:25:51 -0800 Subject: [PATCH 094/160] Renumbering NodeFlags to start at 1 << 0 --- src/compiler/types.ts | 52 +++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 61de5f49fcc..6fd935f7ae3 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -371,32 +371,32 @@ namespace ts { export const enum NodeFlags { None = 0, - Export = 1 << 1, // Declarations - Ambient = 1 << 2, // Declarations - Public = 1 << 3, // Property/Method - Private = 1 << 4, // Property/Method - Protected = 1 << 5, // Property/Method - Static = 1 << 6, // Property/Method - Readonly = 1 << 7, // Property/Method - Abstract = 1 << 8, // Class/Method/ConstructSignature - Async = 1 << 9, // Property/Method/Function - Default = 1 << 10, // Function/Class (export default declaration) - MultiLine = 1 << 11, // Multi-line array or object literal - Synthetic = 1 << 12, // Synthetic node (for full fidelity) - DeclarationFile = 1 << 13, // Node is a .d.ts file - Let = 1 << 14, // Variable declaration - Const = 1 << 15, // Variable declaration - OctalLiteral = 1 << 16, // Octal numeric literal - Namespace = 1 << 17, // Namespace declaration - ExportContext = 1 << 18, // Export context (initialized by binding) - ContainsThis = 1 << 19, // Interface contains references to "this" - HasImplicitReturn = 1 << 20, // If function implicitly returns on one of codepaths (initialized by binding) - HasExplicitReturn = 1 << 21, // If function has explicit reachable return on one of codepaths (initialized by binding) - GlobalAugmentation = 1 << 22, // Set if module declaration is an augmentation for the global scope - HasClassExtends = 1 << 23, // If the file has a non-ambient class with an extends clause in ES5 or lower (initialized by binding) - HasDecorators = 1 << 24, // If the file has decorators (initialized by binding) - HasParamDecorators = 1 << 25, // If the file has parameter decorators (initialized by binding) - HasAsyncFunctions = 1 << 26, // If the file has async functions (initialized by binding) + Export = 1 << 0, // Declarations + Ambient = 1 << 1, // Declarations + Public = 1 << 2, // Property/Method + Private = 1 << 3, // Property/Method + Protected = 1 << 4, // Property/Method + Static = 1 << 5, // Property/Method + Readonly = 1 << 6, // Property/Method + Abstract = 1 << 7, // Class/Method/ConstructSignature + Async = 1 << 8, // Property/Method/Function + Default = 1 << 9, // Function/Class (export default declaration) + MultiLine = 1 << 10, // Multi-line array or object literal + Synthetic = 1 << 11, // Synthetic node (for full fidelity) + DeclarationFile = 1 << 12, // Node is a .d.ts file + Let = 1 << 13, // Variable declaration + Const = 1 << 14, // Variable declaration + OctalLiteral = 1 << 15, // Octal numeric literal + Namespace = 1 << 16, // Namespace declaration + ExportContext = 1 << 17, // Export context (initialized by binding) + ContainsThis = 1 << 18, // Interface contains references to "this" + HasImplicitReturn = 1 << 19, // If function implicitly returns on one of codepaths (initialized by binding) + HasExplicitReturn = 1 << 20, // If function has explicit reachable return on one of codepaths (initialized by binding) + GlobalAugmentation = 1 << 21, // Set if module declaration is an augmentation for the global scope + HasClassExtends = 1 << 22, // If the file has a non-ambient class with an extends clause in ES5 or lower (initialized by binding) + HasDecorators = 1 << 23, // If the file has decorators (initialized by binding) + HasParamDecorators = 1 << 24, // If the file has parameter decorators (initialized by binding) + HasAsyncFunctions = 1 << 25, // If the file has async functions (initialized by binding) Modifier = Export | Ambient | Public | Private | Protected | Static | Abstract | Default | Async, AccessibilityModifier = Public | Private | Protected, From b389e9c61984f1ac303e3382b2d3ceaa9a8e0b84 Mon Sep 17 00:00:00 2001 From: zhengbli Date: Wed, 27 Jan 2016 12:43:31 -0800 Subject: [PATCH 095/160] Fix for thisProperty --- src/compiler/checker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index a3052d1f124..d590f715ed5 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -15204,9 +15204,9 @@ namespace ts { const specialPropertyAssignmentKind = getSpecialPropertyAssignmentKind(entityName.parent.parent); switch (specialPropertyAssignmentKind) { case SpecialPropertyAssignmentKind.ExportsProperty: - case SpecialPropertyAssignmentKind.ThisProperty: case SpecialPropertyAssignmentKind.PrototypeProperty: return getSymbolOfNode(entityName.parent); + case SpecialPropertyAssignmentKind.ThisProperty: case SpecialPropertyAssignmentKind.ModuleExports: return getSymbolOfNode(entityName.parent.parent); } From 9a6815f3c7887c757cbe5a56dc6f6b4e67f6d2bc Mon Sep 17 00:00:00 2001 From: zhengbli Date: Wed, 27 Jan 2016 13:26:41 -0800 Subject: [PATCH 096/160] add tests --- tests/cases/fourslash/renameJsExports.ts | 12 ++++++++++++ tests/cases/fourslash/renameJsPrototypeProperty.ts | 12 ++++++++++++ tests/cases/fourslash/renameJsThisProperty.ts | 12 ++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 tests/cases/fourslash/renameJsExports.ts create mode 100644 tests/cases/fourslash/renameJsPrototypeProperty.ts create mode 100644 tests/cases/fourslash/renameJsThisProperty.ts diff --git a/tests/cases/fourslash/renameJsExports.ts b/tests/cases/fourslash/renameJsExports.ts new file mode 100644 index 00000000000..227eebe4a0d --- /dev/null +++ b/tests/cases/fourslash/renameJsExports.ts @@ -0,0 +1,12 @@ +/// + +// @allowJs: true +// @Filename: a.js +////exports.[|area|] = function (r) { return r * r; } + +// @Filename: b.js +////var mod = require('./a'); +////var t = mod./**/[|area|](10); + +goTo.marker(); +verify.renameLocations(false, false); \ No newline at end of file diff --git a/tests/cases/fourslash/renameJsPrototypeProperty.ts b/tests/cases/fourslash/renameJsPrototypeProperty.ts new file mode 100644 index 00000000000..651514859cc --- /dev/null +++ b/tests/cases/fourslash/renameJsPrototypeProperty.ts @@ -0,0 +1,12 @@ +/// + +// @allowJs: true +// @Filename: a.js +////function bar() { +////} +////bar.prototype.[|x|] = 10; +////var t = new bar(); +////t./**/[|x|] = 11; + +goTo.marker(); +verify.renameLocations(false, false); \ No newline at end of file diff --git a/tests/cases/fourslash/renameJsThisProperty.ts b/tests/cases/fourslash/renameJsThisProperty.ts new file mode 100644 index 00000000000..aed59d298b1 --- /dev/null +++ b/tests/cases/fourslash/renameJsThisProperty.ts @@ -0,0 +1,12 @@ +/// + +// @allowJs: true +// @Filename: a.js +////function bar() { +//// this.[|x|] = 10; +////} +////var t = new bar(); +////t./**/[|x|] = 11; + +goTo.marker(); +verify.renameLocations(false, false); \ No newline at end of file From 646e46e022cddbfe31655ce5f0a40b7603dcca0b Mon Sep 17 00:00:00 2001 From: zhengbli Date: Wed, 27 Jan 2016 13:38:42 -0800 Subject: [PATCH 097/160] Fix build error --- .../asyncFunctionDeclaration15_es6.errors.txt | 20 +++++++++---------- .../asyncImportedPromise_es6.errors.txt | 2 +- .../asyncQualifiedReturnType_es6.errors.txt | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/baselines/reference/asyncFunctionDeclaration15_es6.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration15_es6.errors.txt index 7b682f9dcde..e8d3e7d79b1 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration15_es6.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration15_es6.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(6,23): error TS1064: The return type of an async function or method must be the global Promise. -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(7,23): error TS1064: The return type of an async function or method must be the global Promise. -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(8,23): error TS1064: The return type of an async function or method must be the global Promise. -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(9,23): error TS1064: The return type of an async function or method must be the global Promise. -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(10,23): error TS1064: The return type of an async function or method must be the global Promise. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(6,23): error TS1064: The return type of an async function or method must be the global Promise type. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(7,23): error TS1064: The return type of an async function or method must be the global Promise type. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(8,23): error TS1064: The return type of an async function or method must be the global Promise type. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(9,23): error TS1064: The return type of an async function or method must be the global Promise type. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(10,23): error TS1064: The return type of an async function or method must be the global Promise type. tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(17,16): error TS1059: Return expression in async function does not have a valid callable 'then' member. tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(23,25): error TS1058: Operand for 'await' does not have a valid callable 'then' member. @@ -15,19 +15,19 @@ tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration1 async function fn1() { } // valid: Promise async function fn2(): { } { } // error ~~~ -!!! error TS1064: The return type of an async function or method must be the global Promise. +!!! error TS1064: The return type of an async function or method must be the global Promise type. async function fn3(): any { } // error ~~~ -!!! error TS1064: The return type of an async function or method must be the global Promise. +!!! error TS1064: The return type of an async function or method must be the global Promise type. async function fn4(): number { } // error ~~~~~~ -!!! error TS1064: The return type of an async function or method must be the global Promise. +!!! error TS1064: The return type of an async function or method must be the global Promise type. async function fn5(): PromiseLike { } // error ~~~~~~~~~~~~~~~~~ -!!! error TS1064: The return type of an async function or method must be the global Promise. +!!! error TS1064: The return type of an async function or method must be the global Promise type. async function fn6(): Thenable { } // error ~~~~~~~~ -!!! error TS1064: The return type of an async function or method must be the global Promise. +!!! error TS1064: The return type of an async function or method must be the global Promise type. async function fn7() { return; } // valid: Promise async function fn8() { return 1; } // valid: Promise async function fn9() { return null; } // valid: Promise diff --git a/tests/baselines/reference/asyncImportedPromise_es6.errors.txt b/tests/baselines/reference/asyncImportedPromise_es6.errors.txt index 994445dbedd..881b36704a5 100644 --- a/tests/baselines/reference/asyncImportedPromise_es6.errors.txt +++ b/tests/baselines/reference/asyncImportedPromise_es6.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/async/es6/test.ts(3,25): error TS1064: The return type of an async function or method must be the global Promise. +tests/cases/conformance/async/es6/test.ts(3,25): error TS1064: The return type of an async function or method must be the global Promise type. ==== tests/cases/conformance/async/es6/task.ts (0 errors) ==== diff --git a/tests/baselines/reference/asyncQualifiedReturnType_es6.errors.txt b/tests/baselines/reference/asyncQualifiedReturnType_es6.errors.txt index f1d01bb2a7a..205ea016736 100644 --- a/tests/baselines/reference/asyncQualifiedReturnType_es6.errors.txt +++ b/tests/baselines/reference/asyncQualifiedReturnType_es6.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/async/es6/asyncQualifiedReturnType_es6.ts(6,21): error TS1064: The return type of an async function or method must be the global Promise. +tests/cases/conformance/async/es6/asyncQualifiedReturnType_es6.ts(6,21): error TS1064: The return type of an async function or method must be the global Promise type. ==== tests/cases/conformance/async/es6/asyncQualifiedReturnType_es6.ts (1 errors) ==== @@ -9,5 +9,5 @@ tests/cases/conformance/async/es6/asyncQualifiedReturnType_es6.ts(6,21): error T async function f(): X.MyPromise { ~~~~~~~~~~~~~~~~~ -!!! error TS1064: The return type of an async function or method must be the global Promise. +!!! error TS1064: The return type of an async function or method must be the global Promise type. } \ No newline at end of file From 7259b9fd4aa29ffb83acfffd14f55e6bee8c5d87 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Wed, 27 Jan 2016 14:00:33 -0800 Subject: [PATCH 098/160] Allow multiple 'this' property assignments in Salsa Fixes issue #6645 --- src/compiler/binder.ts | 3 ++- .../getJavaScriptSemanticDiagnostics23.ts | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 tests/cases/fourslash/getJavaScriptSemanticDiagnostics23.ts diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 88a1a62ce4c..dbfe3a5195b 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -1435,7 +1435,8 @@ namespace ts { // Declare a 'member' in case it turns out the container was an ES5 class if (container.kind === SyntaxKind.FunctionExpression || container.kind === SyntaxKind.FunctionDeclaration) { container.symbol.members = container.symbol.members || {}; - declareSymbol(container.symbol.members, container.symbol, node, SymbolFlags.Property, SymbolFlags.PropertyExcludes); + // It's acceptable for multiple 'this' assignments of the same identifier to occur + declareSymbol(container.symbol.members, container.symbol, node, SymbolFlags.Property, SymbolFlags.PropertyExcludes & ~SymbolFlags.Property); } } diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics23.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics23.ts new file mode 100644 index 00000000000..2524e50e668 --- /dev/null +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics23.ts @@ -0,0 +1,14 @@ +/// + +// @allowJs: true +// @Filename: a.js +//// function Person(age) { +//// if (age >= 18) { +//// this.canVote = true; +//// } else { +//// this.canVote = false; +//// } +//// } + +verify.getSyntacticDiagnostics(`[]`); +verify.getSemanticDiagnostics(`[]`); From 1b282cda1de630186e9ad4aa20f30dfd66bb9c9b Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Wed, 27 Jan 2016 14:07:32 -0800 Subject: [PATCH 099/160] Parse JSDoc comments for ES6 class constructors and methods Fixes #6646 --- src/compiler/parser.ts | 4 ++-- .../fourslash/getJavaScriptCompletions16.ts | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 tests/cases/fourslash/getJavaScriptCompletions16.ts diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 57bd9860d12..1ee74603825 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -4778,7 +4778,7 @@ namespace ts { parseExpected(SyntaxKind.ConstructorKeyword); fillSignature(SyntaxKind.ColonToken, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, node); node.body = parseFunctionBlockOrSemicolon(/*isGenerator*/ false, /*isAsync*/ false, Diagnostics.or_expected); - return finishNode(node); + return addJSDocComment(finishNode(node)); } function parseMethodDeclaration(fullStart: number, decorators: NodeArray, modifiers: ModifiersArray, asteriskToken: Node, name: PropertyName, questionToken: Node, diagnosticMessage?: DiagnosticMessage): MethodDeclaration { @@ -4792,7 +4792,7 @@ namespace ts { const isAsync = !!(method.flags & NodeFlags.Async); fillSignature(SyntaxKind.ColonToken, /*yieldContext*/ isGenerator, /*awaitContext*/ isAsync, /*requireCompleteParameterList*/ false, method); method.body = parseFunctionBlockOrSemicolon(isGenerator, isAsync, diagnosticMessage); - return finishNode(method); + return addJSDocComment(finishNode(method)); } function parsePropertyDeclaration(fullStart: number, decorators: NodeArray, modifiers: ModifiersArray, name: PropertyName, questionToken: Node): ClassElement { diff --git a/tests/cases/fourslash/getJavaScriptCompletions16.ts b/tests/cases/fourslash/getJavaScriptCompletions16.ts new file mode 100644 index 00000000000..07c50d3f892 --- /dev/null +++ b/tests/cases/fourslash/getJavaScriptCompletions16.ts @@ -0,0 +1,18 @@ +/// + +// @allowNonTsExtensions: true +// @Filename: file.js +//// "use strict"; +//// +//// class Something { +//// +//// /** +//// * @param {number} a +//// */ +//// constructor(a, b) { +//// a./**/ +//// } +//// } + +goTo.marker(); +verify.completionListContains('toFixed', undefined, undefined, 'method'); From 6648403a8ee56efad0bb47617fd40cee91130d02 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Wed, 27 Jan 2016 14:31:21 -0800 Subject: [PATCH 100/160] Updated test baselines --- .../asyncFunctionDeclaration15_es6.errors.txt | 20 +++++++++---------- .../asyncImportedPromise_es6.errors.txt | 4 ++-- .../asyncQualifiedReturnType_es6.errors.txt | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tests/baselines/reference/asyncFunctionDeclaration15_es6.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration15_es6.errors.txt index 7b682f9dcde..e8d3e7d79b1 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration15_es6.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration15_es6.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(6,23): error TS1064: The return type of an async function or method must be the global Promise. -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(7,23): error TS1064: The return type of an async function or method must be the global Promise. -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(8,23): error TS1064: The return type of an async function or method must be the global Promise. -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(9,23): error TS1064: The return type of an async function or method must be the global Promise. -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(10,23): error TS1064: The return type of an async function or method must be the global Promise. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(6,23): error TS1064: The return type of an async function or method must be the global Promise type. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(7,23): error TS1064: The return type of an async function or method must be the global Promise type. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(8,23): error TS1064: The return type of an async function or method must be the global Promise type. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(9,23): error TS1064: The return type of an async function or method must be the global Promise type. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(10,23): error TS1064: The return type of an async function or method must be the global Promise type. tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(17,16): error TS1059: Return expression in async function does not have a valid callable 'then' member. tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(23,25): error TS1058: Operand for 'await' does not have a valid callable 'then' member. @@ -15,19 +15,19 @@ tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration1 async function fn1() { } // valid: Promise async function fn2(): { } { } // error ~~~ -!!! error TS1064: The return type of an async function or method must be the global Promise. +!!! error TS1064: The return type of an async function or method must be the global Promise type. async function fn3(): any { } // error ~~~ -!!! error TS1064: The return type of an async function or method must be the global Promise. +!!! error TS1064: The return type of an async function or method must be the global Promise type. async function fn4(): number { } // error ~~~~~~ -!!! error TS1064: The return type of an async function or method must be the global Promise. +!!! error TS1064: The return type of an async function or method must be the global Promise type. async function fn5(): PromiseLike { } // error ~~~~~~~~~~~~~~~~~ -!!! error TS1064: The return type of an async function or method must be the global Promise. +!!! error TS1064: The return type of an async function or method must be the global Promise type. async function fn6(): Thenable { } // error ~~~~~~~~ -!!! error TS1064: The return type of an async function or method must be the global Promise. +!!! error TS1064: The return type of an async function or method must be the global Promise type. async function fn7() { return; } // valid: Promise async function fn8() { return 1; } // valid: Promise async function fn9() { return null; } // valid: Promise diff --git a/tests/baselines/reference/asyncImportedPromise_es6.errors.txt b/tests/baselines/reference/asyncImportedPromise_es6.errors.txt index 994445dbedd..43b45482644 100644 --- a/tests/baselines/reference/asyncImportedPromise_es6.errors.txt +++ b/tests/baselines/reference/asyncImportedPromise_es6.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/async/es6/test.ts(3,25): error TS1064: The return type of an async function or method must be the global Promise. +tests/cases/conformance/async/es6/test.ts(3,25): error TS1064: The return type of an async function or method must be the global Promise type. ==== tests/cases/conformance/async/es6/task.ts (0 errors) ==== @@ -9,5 +9,5 @@ tests/cases/conformance/async/es6/test.ts(3,25): error TS1064: The return type o class Test { async example(): Task { return; } ~~~~~~~ -!!! error TS1064: The return type of an async function or method must be the global Promise. +!!! error TS1064: The return type of an async function or method must be the global Promise type. } \ No newline at end of file diff --git a/tests/baselines/reference/asyncQualifiedReturnType_es6.errors.txt b/tests/baselines/reference/asyncQualifiedReturnType_es6.errors.txt index f1d01bb2a7a..205ea016736 100644 --- a/tests/baselines/reference/asyncQualifiedReturnType_es6.errors.txt +++ b/tests/baselines/reference/asyncQualifiedReturnType_es6.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/async/es6/asyncQualifiedReturnType_es6.ts(6,21): error TS1064: The return type of an async function or method must be the global Promise. +tests/cases/conformance/async/es6/asyncQualifiedReturnType_es6.ts(6,21): error TS1064: The return type of an async function or method must be the global Promise type. ==== tests/cases/conformance/async/es6/asyncQualifiedReturnType_es6.ts (1 errors) ==== @@ -9,5 +9,5 @@ tests/cases/conformance/async/es6/asyncQualifiedReturnType_es6.ts(6,21): error T async function f(): X.MyPromise { ~~~~~~~~~~~~~~~~~ -!!! error TS1064: The return type of an async function or method must be the global Promise. +!!! error TS1064: The return type of an async function or method must be the global Promise type. } \ No newline at end of file From 5b68d6559a8e126fac23388e199be29c3dab9a97 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Wed, 27 Jan 2016 15:27:11 -0800 Subject: [PATCH 101/160] strip quotes from module names during deduplication --- src/compiler/emitter.ts | 14 ++++++-- .../deduplicateImportsInSystem.errors.txt | 32 ++++++++++++++++++ .../reference/deduplicateImportsInSystem.js | 33 +++++++++++++++++++ .../compiler/deduplicateImportsInSystem.ts | 9 +++++ 4 files changed, 85 insertions(+), 3 deletions(-) create mode 100644 tests/baselines/reference/deduplicateImportsInSystem.errors.txt create mode 100644 tests/baselines/reference/deduplicateImportsInSystem.js create mode 100644 tests/cases/compiler/deduplicateImportsInSystem.ts diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 0a40047f686..4d771bd2538 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -7068,14 +7068,22 @@ const _super = (function (geti, seti) { for (let i = 0; i < externalImports.length; i++) { const text = getExternalModuleNameText(externalImports[i], emitRelativePathAsModuleName); - if (hasProperty(groupIndices, text)) { + if (text === undefined) { + continue; + } + + // text should be quoted string + // for deduplication purposes in key remove leading and trailing quotes so 'a' and "a" will be considered the same + const key = text.substr(1, text.length - 2); + + if (hasProperty(groupIndices, key)) { // deduplicate/group entries in dependency list by the dependency name - const groupIndex = groupIndices[text]; + const groupIndex = groupIndices[key]; dependencyGroups[groupIndex].push(externalImports[i]); continue; } else { - groupIndices[text] = dependencyGroups.length; + groupIndices[key] = dependencyGroups.length; dependencyGroups.push([externalImports[i]]); } diff --git a/tests/baselines/reference/deduplicateImportsInSystem.errors.txt b/tests/baselines/reference/deduplicateImportsInSystem.errors.txt new file mode 100644 index 00000000000..d1bfe88160e --- /dev/null +++ b/tests/baselines/reference/deduplicateImportsInSystem.errors.txt @@ -0,0 +1,32 @@ +tests/cases/compiler/deduplicateImportsInSystem.ts(1,17): error TS2307: Cannot find module 'f1'. +tests/cases/compiler/deduplicateImportsInSystem.ts(2,17): error TS2307: Cannot find module 'f2'. +tests/cases/compiler/deduplicateImportsInSystem.ts(3,17): error TS2307: Cannot find module 'f3'. +tests/cases/compiler/deduplicateImportsInSystem.ts(4,17): error TS2307: Cannot find module 'f2'. +tests/cases/compiler/deduplicateImportsInSystem.ts(5,17): error TS2307: Cannot find module 'f2'. +tests/cases/compiler/deduplicateImportsInSystem.ts(6,17): error TS2307: Cannot find module 'f1'. +tests/cases/compiler/deduplicateImportsInSystem.ts(8,1): error TS2304: Cannot find name 'console'. + + +==== tests/cases/compiler/deduplicateImportsInSystem.ts (7 errors) ==== + import {A} from "f1"; + ~~~~ +!!! error TS2307: Cannot find module 'f1'. + import {B} from "f2"; + ~~~~ +!!! error TS2307: Cannot find module 'f2'. + import {C} from "f3"; + ~~~~ +!!! error TS2307: Cannot find module 'f3'. + import {D} from 'f2'; + ~~~~ +!!! error TS2307: Cannot find module 'f2'. + import {E} from "f2"; + ~~~~ +!!! error TS2307: Cannot find module 'f2'. + import {F} from 'f1'; + ~~~~ +!!! error TS2307: Cannot find module 'f1'. + + console.log(A + B + C + D + E + F) + ~~~~~~~ +!!! error TS2304: Cannot find name 'console'. \ No newline at end of file diff --git a/tests/baselines/reference/deduplicateImportsInSystem.js b/tests/baselines/reference/deduplicateImportsInSystem.js new file mode 100644 index 00000000000..956d293cad1 --- /dev/null +++ b/tests/baselines/reference/deduplicateImportsInSystem.js @@ -0,0 +1,33 @@ +//// [deduplicateImportsInSystem.ts] +import {A} from "f1"; +import {B} from "f2"; +import {C} from "f3"; +import {D} from 'f2'; +import {E} from "f2"; +import {F} from 'f1'; + +console.log(A + B + C + D + E + F) + +//// [deduplicateImportsInSystem.js] +System.register(["f1", "f2", "f3"], function(exports_1) { + "use strict"; + var f1_1, f2_1, f3_1, f2_2, f2_3, f1_2; + return { + setters:[ + function (f1_1_1) { + f1_1 = f1_1_1; + f1_2 = f1_1_1; + }, + function (f2_1_1) { + f2_1 = f2_1_1; + f2_2 = f2_1_1; + f2_3 = f2_1_1; + }, + function (f3_1_1) { + f3_1 = f3_1_1; + }], + execute: function() { + console.log(f1_1.A + f2_1.B + f3_1.C + f2_2.D + f2_3.E + f1_2.F); + } + } +}); diff --git a/tests/cases/compiler/deduplicateImportsInSystem.ts b/tests/cases/compiler/deduplicateImportsInSystem.ts new file mode 100644 index 00000000000..2fcbc16be05 --- /dev/null +++ b/tests/cases/compiler/deduplicateImportsInSystem.ts @@ -0,0 +1,9 @@ +// @module: system +import {A} from "f1"; +import {B} from "f2"; +import {C} from "f3"; +import {D} from 'f2'; +import {E} from "f2"; +import {F} from 'f1'; + +console.log(A + B + C + D + E + F) \ No newline at end of file From 1bb96555da2d6cfd0a0b5d7e6357ea50ce5c95d1 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Wed, 27 Jan 2016 16:13:51 -0800 Subject: [PATCH 102/160] Creates a class body scoped alias to the class to avoid class name double binding. Fixes #5386. --- src/compiler/checker.ts | 28 ++- src/compiler/emitter.ts | 180 ++++++++++++------ src/compiler/types.ts | 6 +- .../decoratedClassFromExternalModule.js | 2 +- .../decoratedDefaultExportsGetExportedAmd.js | 2 +- ...oratedDefaultExportsGetExportedCommonjs.js | 2 +- ...ecoratedDefaultExportsGetExportedSystem.js | 2 +- .../decoratedDefaultExportsGetExportedUmd.js | 2 +- .../reference/decoratorOnClass1.es6.js | 22 +++ .../reference/decoratorOnClass1.es6.symbols | 19 ++ .../reference/decoratorOnClass1.es6.types | 20 ++ .../reference/decoratorOnClass2.es6.js | 22 +++ .../reference/decoratorOnClass2.es6.symbols | 19 ++ .../reference/decoratorOnClass2.es6.types | 20 ++ .../reference/decoratorOnClass3.es6.js | 23 +++ .../reference/decoratorOnClass3.es6.symbols | 19 ++ .../reference/decoratorOnClass3.es6.types | 20 ++ .../reference/decoratorOnClass4.es6.js | 20 ++ .../reference/decoratorOnClass4.es6.symbols | 13 ++ .../reference/decoratorOnClass4.es6.types | 13 ++ .../reference/decoratorOnClass5.es6.js | 27 +++ .../reference/decoratorOnClass5.es6.symbols | 28 +++ .../reference/decoratorOnClass5.es6.types | 30 +++ .../reference/decoratorOnClass6.es6.js | 27 +++ .../reference/decoratorOnClass6.es6.symbols | 28 +++ .../reference/decoratorOnClass6.es6.types | 30 +++ .../reference/decoratorOnClass7.es6.js | 28 +++ .../reference/decoratorOnClass7.es6.symbols | 28 +++ .../reference/decoratorOnClass7.es6.types | 30 +++ .../reference/decoratorOnClass8.es6.js | 22 +++ .../reference/decoratorOnClass8.es6.symbols | 15 ++ .../reference/decoratorOnClass8.es6.types | 16 ++ .../reference/generatorTypeCheck39.js | 2 +- .../reference/generatorTypeCheck61.js | 2 +- .../decorators/class/decoratorOnClass1.es6.ts | 9 + .../decorators/class/decoratorOnClass2.es6.ts | 9 + .../decorators/class/decoratorOnClass3.es6.ts | 9 + .../decorators/class/decoratorOnClass4.es6.ts | 7 + .../decorators/class/decoratorOnClass5.es6.ts | 11 ++ .../decorators/class/decoratorOnClass6.es6.ts | 11 ++ .../decorators/class/decoratorOnClass7.es6.ts | 11 ++ .../decorators/class/decoratorOnClass8.es6.ts | 8 + 42 files changed, 771 insertions(+), 71 deletions(-) create mode 100644 tests/baselines/reference/decoratorOnClass1.es6.js create mode 100644 tests/baselines/reference/decoratorOnClass1.es6.symbols create mode 100644 tests/baselines/reference/decoratorOnClass1.es6.types create mode 100644 tests/baselines/reference/decoratorOnClass2.es6.js create mode 100644 tests/baselines/reference/decoratorOnClass2.es6.symbols create mode 100644 tests/baselines/reference/decoratorOnClass2.es6.types create mode 100644 tests/baselines/reference/decoratorOnClass3.es6.js create mode 100644 tests/baselines/reference/decoratorOnClass3.es6.symbols create mode 100644 tests/baselines/reference/decoratorOnClass3.es6.types create mode 100644 tests/baselines/reference/decoratorOnClass4.es6.js create mode 100644 tests/baselines/reference/decoratorOnClass4.es6.symbols create mode 100644 tests/baselines/reference/decoratorOnClass4.es6.types create mode 100644 tests/baselines/reference/decoratorOnClass5.es6.js create mode 100644 tests/baselines/reference/decoratorOnClass5.es6.symbols create mode 100644 tests/baselines/reference/decoratorOnClass5.es6.types create mode 100644 tests/baselines/reference/decoratorOnClass6.es6.js create mode 100644 tests/baselines/reference/decoratorOnClass6.es6.symbols create mode 100644 tests/baselines/reference/decoratorOnClass6.es6.types create mode 100644 tests/baselines/reference/decoratorOnClass7.es6.js create mode 100644 tests/baselines/reference/decoratorOnClass7.es6.symbols create mode 100644 tests/baselines/reference/decoratorOnClass7.es6.types create mode 100644 tests/baselines/reference/decoratorOnClass8.es6.js create mode 100644 tests/baselines/reference/decoratorOnClass8.es6.symbols create mode 100644 tests/baselines/reference/decoratorOnClass8.es6.types create mode 100644 tests/cases/conformance/es6/decorators/class/decoratorOnClass1.es6.ts create mode 100644 tests/cases/conformance/es6/decorators/class/decoratorOnClass2.es6.ts create mode 100644 tests/cases/conformance/es6/decorators/class/decoratorOnClass3.es6.ts create mode 100644 tests/cases/conformance/es6/decorators/class/decoratorOnClass4.es6.ts create mode 100644 tests/cases/conformance/es6/decorators/class/decoratorOnClass5.es6.ts create mode 100644 tests/cases/conformance/es6/decorators/class/decoratorOnClass6.es6.ts create mode 100644 tests/cases/conformance/es6/decorators/class/decoratorOnClass7.es6.ts create mode 100644 tests/cases/conformance/es6/decorators/class/decoratorOnClass8.es6.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index e9211bb3e7e..2494d0db260 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -7192,11 +7192,33 @@ namespace ts { markAliasSymbolAsReferenced(symbol); } + const localSymbol = getExportSymbolOfValueSymbolIfExported(symbol); + + // Due to the emit for class decorators, any reference to the class from inside of the class body + // must instead be rewritten to point to a temporary variable to avoid issues with the double-bind + // behavior of class names in ES6. + if (languageVersion === ScriptTarget.ES6 + && localSymbol + && localSymbol.valueDeclaration + && localSymbol.valueDeclaration.kind === SyntaxKind.ClassDeclaration + && nodeIsDecorated(localSymbol.valueDeclaration)) { + let container = getContainingClass(node); + while (container !== undefined) { + if (container === localSymbol.valueDeclaration && container.name !== node) { + getNodeLinks(container).flags |= NodeCheckFlags.ClassWithBodyScopedClassBinding; + getNodeLinks(node).flags |= NodeCheckFlags.BodyScopedClassBinding; + break; + } + + container = getContainingClass(container); + } + } + checkCollisionWithCapturedSuperVariable(node, node); checkCollisionWithCapturedThisVariable(node, node); checkNestedBlockScopedBinding(node, symbol); - return getNarrowedTypeOfSymbol(getExportSymbolOfValueSymbolIfExported(symbol), node); + return getNarrowedTypeOfSymbol(localSymbol, node); } function isInsideFunction(node: Node, threshold: Node): boolean { @@ -7238,7 +7260,7 @@ namespace ts { if (containedInIterationStatement) { if (usedInFunction) { - // mark iteration statement as containing block-scoped binding captured in some function + // mark iteration statement as containing block-scoped binding captured in some function getNodeLinks(current).flags |= NodeCheckFlags.LoopWithCapturedBlockScopedBinding; } // set 'declared inside loop' bit on the block-scoped binding @@ -15734,7 +15756,7 @@ namespace ts { // - binding is not top level - top level bindings never collide with anything // AND // - binding is not declared in loop, should be renamed to avoid name reuse across siblings - // let a, b + // let a, b // { let x = 1; a = () => x; } // { let x = 100; b = () => x; } // console.log(a()); // should print '1' diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 0a40047f686..a3dcf7d630e 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -481,6 +481,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge let generatedNameSet: Map; let nodeToGeneratedName: string[]; let computedPropertyNamesToGeneratedNames: string[]; + let decoratedClassAliases: string[]; let convertedLoopState: ConvertedLoopState; @@ -531,6 +532,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge sourceMap.initialize(jsFilePath, sourceMapFilePath, sourceFiles, isBundledEmit); generatedNameSet = {}; nodeToGeneratedName = []; + decoratedClassAliases = []; isOwnFileEmit = !isBundledEmit; // Emit helpers from all the files @@ -559,6 +561,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge exportFunctionForFile = undefined; generatedNameSet = undefined; nodeToGeneratedName = undefined; + decoratedClassAliases = undefined; computedPropertyNamesToGeneratedNames = undefined; convertedLoopState = undefined; extendsEmitted = false; @@ -1529,13 +1532,26 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge } } - if (languageVersion !== ScriptTarget.ES6) { + if (languageVersion < ScriptTarget.ES6) { const declaration = resolver.getReferencedDeclarationWithCollidingName(node); if (declaration) { write(getGeneratedNameForNode(declaration.name)); return; } } + else if (resolver.getNodeCheckFlags(node) & NodeCheckFlags.BodyScopedClassBinding) { + // Due to the emit for class decorators, any reference to the class from inside of the class body + // must instead be rewritten to point to a temporary variable to avoid issues with the double-bind + // behavior of class names in ES6. + const declaration = resolver.getReferencedValueDeclaration(node); + if (declaration && declaration.kind === SyntaxKind.ClassDeclaration) { + const classAlias = decoratedClassAliases[getNodeId(declaration)]; + if (classAlias !== undefined) { + write(classAlias); + return; + } + } + } } if (nodeIsSynthesized(node)) { @@ -4067,7 +4083,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge let initializer = node.initializer; if (!initializer && languageVersion < ScriptTarget.ES6 && - // for names - binding patterns that lack initializer there is no point to emit explicit initializer + // for names - binding patterns that lack initializer there is no point to emit explicit initializer // since downlevel codegen for destructuring will fail in the absence of initializer so all binding elements will say uninitialized node.name.kind === SyntaxKind.Identifier) { @@ -4088,11 +4104,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge // explicitly initialized. One particular case: non-captured binding declared inside loop body (but not in loop initializer) // let x; // for (;;) { - // let x; + // let x; // } // in downlevel codegen inner 'x' will be renamed so it won't collide with outer 'x' however it will should be reset on every iteration - // as if it was declared anew. - // * Why non-captured binding - because if loop contains block scoped binding captured in some function then loop body will be rewritten + // as if it was declared anew. + // * Why non-captured binding - because if loop contains block scoped binding captured in some function then loop body will be rewritten // to have a fresh scope on every iteration so everything will just work. // * Why loop initializer is excluded - since we've introduced a fresh name it already will be undefined. const isCapturedInFunction = flags & NodeCheckFlags.CapturedBlockScopedBinding; @@ -5106,64 +5122,114 @@ const _super = (function (geti, seti) { } function emitClassLikeDeclarationForES6AndHigher(node: ClassLikeDeclaration) { + let decoratedClassAlias: string; const thisNodeIsDecorated = nodeIsDecorated(node); if (node.kind === SyntaxKind.ClassDeclaration) { if (thisNodeIsDecorated) { - // To preserve the correct runtime semantics when decorators are applied to the class, - // the emit needs to follow one of the following rules: + // When we emit an ES6 class that has a class decorator, we must tailor the + // emit to certain specific cases. // - // * For a local class declaration: + // In the simplest case, we emit the class declaration as a let declaration, and + // evaluate decorators after the close of the class body: // - // @dec class C { - // } + // TypeScript | Javascript + // --------------------------------|------------------------------------ + // @dec | let C = class C { + // class C { | } + // } | C = __decorate([dec], C); + // --------------------------------|------------------------------------ + // @dec | export let C = class C { + // export class C { | } + // } | C = __decorate([dec], C); + // --------------------------------------------------------------------- + // [Example 1] // - // The emit should be: + // If a class declaration contains a reference to itself *inside* of the class body, + // this introduces two bindings to the class: One outside of the class body, and one + // inside of the class body. If we apply decorators as in [Example 1] above, there + // is the possibility that the decorator `dec` will return a new value for the + // constructor, which would result in the binding inside of the class no longer + // pointing to the same reference as the binding outside of the class. // - // let C = class { - // }; - // C = __decorate([dec], C); + // As a result, we must instead rewrite all references to the class *inside* of the + // class body to instead point to a local temporary alias for the class: // - // * For an exported class declaration: + // TypeScript | Javascript + // --------------------------------|------------------------------------ + // @dec | let C_1; + // class C { | let C = C_1 = class C { + // static x() { return C.y; } | static x() { return C_1.y; } + // static y = 1; | } + // } | C.y = 1; + // | C = C_1 = __decorate([dec], C); + // --------------------------------|------------------------------------ + // @dec | let C_1; + // export class C { | export let C = C_1 = class C { + // static x() { return C.y; } | static x() { return C_1.y; } + // static y = 1; | } + // } | C.y = 1; + // | C = C_1 = __decorate([dec], C); + // --------------------------------------------------------------------- + // [Example 2] // - // @dec export class C { - // } + // If a class declaration is the default export of a module, we instead emit + // the export after the decorated declaration: // - // The emit should be: + // TypeScript | Javascript + // --------------------------------|------------------------------------ + // @dec | let default_1 = class { + // export default class { | } + // } | default_1 = __decorate([dec], default_1); + // | export default default_1; + // --------------------------------|------------------------------------ + // @dec | let C = class C { + // export default class { | } + // } | C = __decorate([dec], C); + // | export default C; + // --------------------------------------------------------------------- + // [Example 3] // - // export let C = class { - // }; - // C = __decorate([dec], C); + // If the class declaration is the default export and a reference to itself + // inside of the class body, we must emit both an alias for the class *and* + // move the export after the declaration: // - // * For a default export of a class declaration with a name: - // - // @dec default export class C { - // } - // - // The emit should be: - // - // let C = class { - // } - // C = __decorate([dec], C); - // export default C; - // - // * For a default export of a class declaration without a name: - // - // @dec default export class { - // } - // - // The emit should be: - // - // let _default = class { - // } - // _default = __decorate([dec], _default); - // export default _default; + // TypeScript | Javascript + // --------------------------------|------------------------------------ + // @dec | let default_1 = class { + // export default class { | static x() { return default_1.y; } + // static x() { return C.y; } | } + // static y = 1; | default_1.y = 1; + // } | default_1 = __decorate([dec], default_1); + // | export default default_1; + // --------------------------------|------------------------------------ + // @dec | let C_1; + // export default class C { | let C = C_1 = class C { + // static x() { return C.y; } | static x() { return C_1.y; } + // static y = 1; | } + // } | C.y = 1; + // | C = C_1 = __decorate([dec], C); + // | export default C; + // --------------------------------------------------------------------- + // [Example 4] // + + if (resolver.getNodeCheckFlags(node) & NodeCheckFlags.ClassWithBodyScopedClassBinding) { + decoratedClassAlias = unescapeIdentifier(makeUniqueName(node.name ? node.name.text : "default")); + decoratedClassAliases[getNodeId(node)] = decoratedClassAlias; + write(`let ${decoratedClassAlias};`); + writeLine(); + } + if (isES6ExportedDeclaration(node) && !(node.flags & NodeFlags.Default)) { write("export "); } write("let "); emitDeclarationName(node); + if (decoratedClassAlias !== undefined) { + write(` = ${decoratedClassAlias}`); + } + write(" = "); } else if (isES6ExportedDeclaration(node)) { @@ -5202,7 +5268,7 @@ const _super = (function (geti, seti) { // emit name if // - node has a name // - this is default export with static initializers - if ((node.name || (node.flags & NodeFlags.Default && (staticProperties.length > 0 || modulekind !== ModuleKind.ES6))) && !thisNodeIsDecorated) { + if (node.name || (node.flags & NodeFlags.Default && (staticProperties.length > 0 || modulekind !== ModuleKind.ES6) && !thisNodeIsDecorated)) { write(" "); emitDeclarationName(node); } @@ -5222,16 +5288,8 @@ const _super = (function (geti, seti) { writeLine(); emitToken(SyntaxKind.CloseBraceToken, node.members.end); - // TODO(rbuckton): Need to go back to `let _a = class C {}` approach, removing the defineProperty call for now. - - // For a decorated class, we need to assign its name (if it has one). This is because we emit - // the class as a class expression to avoid the double-binding of the identifier: - // - // let C = class { - // } - // Object.defineProperty(C, "name", { value: "C", configurable: true }); - // if (thisNodeIsDecorated) { + decoratedClassAliases[getNodeId(node)] = undefined; write(";"); } @@ -5256,7 +5314,7 @@ const _super = (function (geti, seti) { else { writeLine(); emitPropertyDeclarations(node, staticProperties); - emitDecoratorsOfClass(node); + emitDecoratorsOfClass(node, decoratedClassAlias); } if (!(node.flags & NodeFlags.Export)) { @@ -5330,7 +5388,7 @@ const _super = (function (geti, seti) { emitMemberFunctionsForES5AndLower(node); emitPropertyDeclarations(node, getInitializedProperties(node, /*isStatic*/ true)); writeLine(); - emitDecoratorsOfClass(node); + emitDecoratorsOfClass(node, /*decoratedClassAlias*/ undefined); writeLine(); emitToken(SyntaxKind.CloseBraceToken, node.members.end, () => { write("return "); @@ -5372,13 +5430,13 @@ const _super = (function (geti, seti) { } } - function emitDecoratorsOfClass(node: ClassLikeDeclaration) { + function emitDecoratorsOfClass(node: ClassLikeDeclaration, decoratedClassAlias: string) { emitDecoratorsOfMembers(node, /*staticFlag*/ 0); emitDecoratorsOfMembers(node, NodeFlags.Static); - emitDecoratorsOfConstructor(node); + emitDecoratorsOfConstructor(node, decoratedClassAlias); } - function emitDecoratorsOfConstructor(node: ClassLikeDeclaration) { + function emitDecoratorsOfConstructor(node: ClassLikeDeclaration, decoratedClassAlias: string) { const decorators = node.decorators; const constructor = getFirstConstructorWithBody(node); const firstParameterDecorator = constructor && forEach(constructor.parameters, parameter => parameter.decorators); @@ -5402,6 +5460,10 @@ const _super = (function (geti, seti) { writeLine(); emitStart(node.decorators || firstParameterDecorator); emitDeclarationName(node); + if (decoratedClassAlias !== undefined) { + write(` = ${decoratedClassAlias}`); + } + write(" = __decorate(["); increaseIndent(); writeLine(); diff --git a/src/compiler/types.ts b/src/compiler/types.ts index ef6ae0168b1..cb48d9a3a8a 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -2068,8 +2068,10 @@ namespace ts { EnumValuesComputed = 0x00004000, LexicalModuleMergesWithClass = 0x00008000, // Instantiated lexical module declaration is merged with a previous class declaration. LoopWithCapturedBlockScopedBinding = 0x00010000, // Loop that contains block scoped variable captured in closure - CapturedBlockScopedBinding = 0x00020000, // Block-scoped binding that is captured in some function - BlockScopedBindingInLoop = 0x00040000, // Block-scoped binding with declaration nested inside iteration statement + CapturedBlockScopedBinding = 0x00020000, // Block-scoped binding that is captured in some function + BlockScopedBindingInLoop = 0x00040000, // Block-scoped binding with declaration nested inside iteration statement + ClassWithBodyScopedClassBinding = 0x00080000, // Decorated class that contains a binding to itself inside of the class body. + BodyScopedClassBinding = 0x00100000, // Binding to a decorated class inside of the class's body. } /* @internal */ diff --git a/tests/baselines/reference/decoratedClassFromExternalModule.js b/tests/baselines/reference/decoratedClassFromExternalModule.js index 000fe2f37d6..ce397323d9c 100644 --- a/tests/baselines/reference/decoratedClassFromExternalModule.js +++ b/tests/baselines/reference/decoratedClassFromExternalModule.js @@ -17,7 +17,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, return c > 3 && r && Object.defineProperty(target, key, r), r; }; function decorate(target) { } -let Decorated = class { +let Decorated = class Decorated { }; Decorated = __decorate([ decorate diff --git a/tests/baselines/reference/decoratedDefaultExportsGetExportedAmd.js b/tests/baselines/reference/decoratedDefaultExportsGetExportedAmd.js index dbbe72ba52c..14ede865a2f 100644 --- a/tests/baselines/reference/decoratedDefaultExportsGetExportedAmd.js +++ b/tests/baselines/reference/decoratedDefaultExportsGetExportedAmd.js @@ -23,7 +23,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, define(["require", "exports"], function (require, exports) { "use strict"; var decorator; - let Foo = class { + let Foo = class Foo { }; Foo = __decorate([ decorator diff --git a/tests/baselines/reference/decoratedDefaultExportsGetExportedCommonjs.js b/tests/baselines/reference/decoratedDefaultExportsGetExportedCommonjs.js index ab518d73cb9..ecc04859234 100644 --- a/tests/baselines/reference/decoratedDefaultExportsGetExportedCommonjs.js +++ b/tests/baselines/reference/decoratedDefaultExportsGetExportedCommonjs.js @@ -22,7 +22,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, return c > 3 && r && Object.defineProperty(target, key, r), r; }; var decorator; -let Foo = class { +let Foo = class Foo { }; Foo = __decorate([ decorator diff --git a/tests/baselines/reference/decoratedDefaultExportsGetExportedSystem.js b/tests/baselines/reference/decoratedDefaultExportsGetExportedSystem.js index ed322374799..eb5d9074651 100644 --- a/tests/baselines/reference/decoratedDefaultExportsGetExportedSystem.js +++ b/tests/baselines/reference/decoratedDefaultExportsGetExportedSystem.js @@ -25,7 +25,7 @@ System.register([], function(exports_1) { return { setters:[], execute: function() { - let Foo = class { + let Foo = class Foo { }; Foo = __decorate([ decorator diff --git a/tests/baselines/reference/decoratedDefaultExportsGetExportedUmd.js b/tests/baselines/reference/decoratedDefaultExportsGetExportedUmd.js index f8cb770f1d2..c7b59d01469 100644 --- a/tests/baselines/reference/decoratedDefaultExportsGetExportedUmd.js +++ b/tests/baselines/reference/decoratedDefaultExportsGetExportedUmd.js @@ -30,7 +30,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, })(function (require, exports) { "use strict"; var decorator; - let Foo = class { + let Foo = class Foo { }; Foo = __decorate([ decorator diff --git a/tests/baselines/reference/decoratorOnClass1.es6.js b/tests/baselines/reference/decoratorOnClass1.es6.js new file mode 100644 index 00000000000..7a02b9f5cd8 --- /dev/null +++ b/tests/baselines/reference/decoratorOnClass1.es6.js @@ -0,0 +1,22 @@ +//// [decoratorOnClass1.es6.ts] +declare function dec(target: T): T; + +@dec +class C { +} + +let c = new C(); + +//// [decoratorOnClass1.es6.js] +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +let C = class C { +}; +C = __decorate([ + dec +], C); +let c = new C(); diff --git a/tests/baselines/reference/decoratorOnClass1.es6.symbols b/tests/baselines/reference/decoratorOnClass1.es6.symbols new file mode 100644 index 00000000000..aac2535d9cf --- /dev/null +++ b/tests/baselines/reference/decoratorOnClass1.es6.symbols @@ -0,0 +1,19 @@ +=== tests/cases/conformance/es6/decorators/class/decoratorOnClass1.es6.ts === +declare function dec(target: T): T; +>dec : Symbol(dec, Decl(decoratorOnClass1.es6.ts, 0, 0)) +>T : Symbol(T, Decl(decoratorOnClass1.es6.ts, 0, 21)) +>target : Symbol(target, Decl(decoratorOnClass1.es6.ts, 0, 24)) +>T : Symbol(T, Decl(decoratorOnClass1.es6.ts, 0, 21)) +>T : Symbol(T, Decl(decoratorOnClass1.es6.ts, 0, 21)) + +@dec +>dec : Symbol(dec, Decl(decoratorOnClass1.es6.ts, 0, 0)) + +class C { +>C : Symbol(C, Decl(decoratorOnClass1.es6.ts, 0, 38)) +} + +let c = new C(); +>c : Symbol(c, Decl(decoratorOnClass1.es6.ts, 6, 3)) +>C : Symbol(C, Decl(decoratorOnClass1.es6.ts, 0, 38)) + diff --git a/tests/baselines/reference/decoratorOnClass1.es6.types b/tests/baselines/reference/decoratorOnClass1.es6.types new file mode 100644 index 00000000000..fe7ef79ea62 --- /dev/null +++ b/tests/baselines/reference/decoratorOnClass1.es6.types @@ -0,0 +1,20 @@ +=== tests/cases/conformance/es6/decorators/class/decoratorOnClass1.es6.ts === +declare function dec(target: T): T; +>dec : (target: T) => T +>T : T +>target : T +>T : T +>T : T + +@dec +>dec : (target: T) => T + +class C { +>C : C +} + +let c = new C(); +>c : C +>new C() : C +>C : typeof C + diff --git a/tests/baselines/reference/decoratorOnClass2.es6.js b/tests/baselines/reference/decoratorOnClass2.es6.js new file mode 100644 index 00000000000..872f241bc9c --- /dev/null +++ b/tests/baselines/reference/decoratorOnClass2.es6.js @@ -0,0 +1,22 @@ +//// [decoratorOnClass2.es6.ts] +declare function dec(target: T): T; + +@dec +export class C { +} + +let c = new C(); + +//// [decoratorOnClass2.es6.js] +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +export let C = class C { +}; +C = __decorate([ + dec +], C); +let c = new C(); diff --git a/tests/baselines/reference/decoratorOnClass2.es6.symbols b/tests/baselines/reference/decoratorOnClass2.es6.symbols new file mode 100644 index 00000000000..af0dc7c1fad --- /dev/null +++ b/tests/baselines/reference/decoratorOnClass2.es6.symbols @@ -0,0 +1,19 @@ +=== tests/cases/conformance/es6/decorators/class/decoratorOnClass2.es6.ts === +declare function dec(target: T): T; +>dec : Symbol(dec, Decl(decoratorOnClass2.es6.ts, 0, 0)) +>T : Symbol(T, Decl(decoratorOnClass2.es6.ts, 0, 21)) +>target : Symbol(target, Decl(decoratorOnClass2.es6.ts, 0, 24)) +>T : Symbol(T, Decl(decoratorOnClass2.es6.ts, 0, 21)) +>T : Symbol(T, Decl(decoratorOnClass2.es6.ts, 0, 21)) + +@dec +>dec : Symbol(dec, Decl(decoratorOnClass2.es6.ts, 0, 0)) + +export class C { +>C : Symbol(C, Decl(decoratorOnClass2.es6.ts, 0, 38)) +} + +let c = new C(); +>c : Symbol(c, Decl(decoratorOnClass2.es6.ts, 6, 3)) +>C : Symbol(C, Decl(decoratorOnClass2.es6.ts, 0, 38)) + diff --git a/tests/baselines/reference/decoratorOnClass2.es6.types b/tests/baselines/reference/decoratorOnClass2.es6.types new file mode 100644 index 00000000000..2845ab1b977 --- /dev/null +++ b/tests/baselines/reference/decoratorOnClass2.es6.types @@ -0,0 +1,20 @@ +=== tests/cases/conformance/es6/decorators/class/decoratorOnClass2.es6.ts === +declare function dec(target: T): T; +>dec : (target: T) => T +>T : T +>target : T +>T : T +>T : T + +@dec +>dec : (target: T) => T + +export class C { +>C : C +} + +let c = new C(); +>c : C +>new C() : C +>C : typeof C + diff --git a/tests/baselines/reference/decoratorOnClass3.es6.js b/tests/baselines/reference/decoratorOnClass3.es6.js new file mode 100644 index 00000000000..a6b1d6e2589 --- /dev/null +++ b/tests/baselines/reference/decoratorOnClass3.es6.js @@ -0,0 +1,23 @@ +//// [decoratorOnClass3.es6.ts] +declare function dec(target: T): T; + +@dec +export default class C { +} + +let c = new C(); + +//// [decoratorOnClass3.es6.js] +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +let C = class C { +}; +C = __decorate([ + dec +], C); +export default C; +let c = new C(); diff --git a/tests/baselines/reference/decoratorOnClass3.es6.symbols b/tests/baselines/reference/decoratorOnClass3.es6.symbols new file mode 100644 index 00000000000..d769d1c97a1 --- /dev/null +++ b/tests/baselines/reference/decoratorOnClass3.es6.symbols @@ -0,0 +1,19 @@ +=== tests/cases/conformance/es6/decorators/class/decoratorOnClass3.es6.ts === +declare function dec(target: T): T; +>dec : Symbol(dec, Decl(decoratorOnClass3.es6.ts, 0, 0)) +>T : Symbol(T, Decl(decoratorOnClass3.es6.ts, 0, 21)) +>target : Symbol(target, Decl(decoratorOnClass3.es6.ts, 0, 24)) +>T : Symbol(T, Decl(decoratorOnClass3.es6.ts, 0, 21)) +>T : Symbol(T, Decl(decoratorOnClass3.es6.ts, 0, 21)) + +@dec +>dec : Symbol(dec, Decl(decoratorOnClass3.es6.ts, 0, 0)) + +export default class C { +>C : Symbol(C, Decl(decoratorOnClass3.es6.ts, 0, 38)) +} + +let c = new C(); +>c : Symbol(c, Decl(decoratorOnClass3.es6.ts, 6, 3)) +>C : Symbol(C, Decl(decoratorOnClass3.es6.ts, 0, 38)) + diff --git a/tests/baselines/reference/decoratorOnClass3.es6.types b/tests/baselines/reference/decoratorOnClass3.es6.types new file mode 100644 index 00000000000..7b19c4bad8e --- /dev/null +++ b/tests/baselines/reference/decoratorOnClass3.es6.types @@ -0,0 +1,20 @@ +=== tests/cases/conformance/es6/decorators/class/decoratorOnClass3.es6.ts === +declare function dec(target: T): T; +>dec : (target: T) => T +>T : T +>target : T +>T : T +>T : T + +@dec +>dec : (target: T) => T + +export default class C { +>C : C +} + +let c = new C(); +>c : C +>new C() : C +>C : typeof C + diff --git a/tests/baselines/reference/decoratorOnClass4.es6.js b/tests/baselines/reference/decoratorOnClass4.es6.js new file mode 100644 index 00000000000..0435c822da6 --- /dev/null +++ b/tests/baselines/reference/decoratorOnClass4.es6.js @@ -0,0 +1,20 @@ +//// [decoratorOnClass4.es6.ts] +declare function dec(target: T): T; + +@dec +export default class { +} + +//// [decoratorOnClass4.es6.js] +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +let default_1 = class { +}; +default_1 = __decorate([ + dec +], default_1); +export default default_1; diff --git a/tests/baselines/reference/decoratorOnClass4.es6.symbols b/tests/baselines/reference/decoratorOnClass4.es6.symbols new file mode 100644 index 00000000000..fff39c72f1c --- /dev/null +++ b/tests/baselines/reference/decoratorOnClass4.es6.symbols @@ -0,0 +1,13 @@ +=== tests/cases/conformance/es6/decorators/class/decoratorOnClass4.es6.ts === +declare function dec(target: T): T; +>dec : Symbol(dec, Decl(decoratorOnClass4.es6.ts, 0, 0)) +>T : Symbol(T, Decl(decoratorOnClass4.es6.ts, 0, 21)) +>target : Symbol(target, Decl(decoratorOnClass4.es6.ts, 0, 24)) +>T : Symbol(T, Decl(decoratorOnClass4.es6.ts, 0, 21)) +>T : Symbol(T, Decl(decoratorOnClass4.es6.ts, 0, 21)) + +@dec +>dec : Symbol(dec, Decl(decoratorOnClass4.es6.ts, 0, 0)) + +export default class { +} diff --git a/tests/baselines/reference/decoratorOnClass4.es6.types b/tests/baselines/reference/decoratorOnClass4.es6.types new file mode 100644 index 00000000000..7dfce858076 --- /dev/null +++ b/tests/baselines/reference/decoratorOnClass4.es6.types @@ -0,0 +1,13 @@ +=== tests/cases/conformance/es6/decorators/class/decoratorOnClass4.es6.ts === +declare function dec(target: T): T; +>dec : (target: T) => T +>T : T +>target : T +>T : T +>T : T + +@dec +>dec : (target: T) => T + +export default class { +} diff --git a/tests/baselines/reference/decoratorOnClass5.es6.js b/tests/baselines/reference/decoratorOnClass5.es6.js new file mode 100644 index 00000000000..58c5f0d4f29 --- /dev/null +++ b/tests/baselines/reference/decoratorOnClass5.es6.js @@ -0,0 +1,27 @@ +//// [decoratorOnClass5.es6.ts] +declare function dec(target: T): T; + +@dec +class C { + static x() { return C.y; } + static y = 1; +} + +let c = new C(); + +//// [decoratorOnClass5.es6.js] +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +let C_1; +let C = C_1 = class C { + static x() { return C_1.y; } +}; +C.y = 1; +C = C_1 = __decorate([ + dec +], C); +let c = new C(); diff --git a/tests/baselines/reference/decoratorOnClass5.es6.symbols b/tests/baselines/reference/decoratorOnClass5.es6.symbols new file mode 100644 index 00000000000..aa62a593019 --- /dev/null +++ b/tests/baselines/reference/decoratorOnClass5.es6.symbols @@ -0,0 +1,28 @@ +=== tests/cases/conformance/es6/decorators/class/decoratorOnClass5.es6.ts === +declare function dec(target: T): T; +>dec : Symbol(dec, Decl(decoratorOnClass5.es6.ts, 0, 0)) +>T : Symbol(T, Decl(decoratorOnClass5.es6.ts, 0, 21)) +>target : Symbol(target, Decl(decoratorOnClass5.es6.ts, 0, 24)) +>T : Symbol(T, Decl(decoratorOnClass5.es6.ts, 0, 21)) +>T : Symbol(T, Decl(decoratorOnClass5.es6.ts, 0, 21)) + +@dec +>dec : Symbol(dec, Decl(decoratorOnClass5.es6.ts, 0, 0)) + +class C { +>C : Symbol(C, Decl(decoratorOnClass5.es6.ts, 0, 38)) + + static x() { return C.y; } +>x : Symbol(C.x, Decl(decoratorOnClass5.es6.ts, 3, 9)) +>C.y : Symbol(C.y, Decl(decoratorOnClass5.es6.ts, 4, 30)) +>C : Symbol(C, Decl(decoratorOnClass5.es6.ts, 0, 38)) +>y : Symbol(C.y, Decl(decoratorOnClass5.es6.ts, 4, 30)) + + static y = 1; +>y : Symbol(C.y, Decl(decoratorOnClass5.es6.ts, 4, 30)) +} + +let c = new C(); +>c : Symbol(c, Decl(decoratorOnClass5.es6.ts, 8, 3)) +>C : Symbol(C, Decl(decoratorOnClass5.es6.ts, 0, 38)) + diff --git a/tests/baselines/reference/decoratorOnClass5.es6.types b/tests/baselines/reference/decoratorOnClass5.es6.types new file mode 100644 index 00000000000..5532c50fe52 --- /dev/null +++ b/tests/baselines/reference/decoratorOnClass5.es6.types @@ -0,0 +1,30 @@ +=== tests/cases/conformance/es6/decorators/class/decoratorOnClass5.es6.ts === +declare function dec(target: T): T; +>dec : (target: T) => T +>T : T +>target : T +>T : T +>T : T + +@dec +>dec : (target: T) => T + +class C { +>C : C + + static x() { return C.y; } +>x : () => number +>C.y : number +>C : typeof C +>y : number + + static y = 1; +>y : number +>1 : number +} + +let c = new C(); +>c : C +>new C() : C +>C : typeof C + diff --git a/tests/baselines/reference/decoratorOnClass6.es6.js b/tests/baselines/reference/decoratorOnClass6.es6.js new file mode 100644 index 00000000000..03b8ace2b5b --- /dev/null +++ b/tests/baselines/reference/decoratorOnClass6.es6.js @@ -0,0 +1,27 @@ +//// [decoratorOnClass6.es6.ts] +declare function dec(target: T): T; + +@dec +export class C { + static x() { return C.y; } + static y = 1; +} + +let c = new C(); + +//// [decoratorOnClass6.es6.js] +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +let C_1; +export let C = C_1 = class C { + static x() { return C_1.y; } +}; +C.y = 1; +C = C_1 = __decorate([ + dec +], C); +let c = new C(); diff --git a/tests/baselines/reference/decoratorOnClass6.es6.symbols b/tests/baselines/reference/decoratorOnClass6.es6.symbols new file mode 100644 index 00000000000..f778128e40b --- /dev/null +++ b/tests/baselines/reference/decoratorOnClass6.es6.symbols @@ -0,0 +1,28 @@ +=== tests/cases/conformance/es6/decorators/class/decoratorOnClass6.es6.ts === +declare function dec(target: T): T; +>dec : Symbol(dec, Decl(decoratorOnClass6.es6.ts, 0, 0)) +>T : Symbol(T, Decl(decoratorOnClass6.es6.ts, 0, 21)) +>target : Symbol(target, Decl(decoratorOnClass6.es6.ts, 0, 24)) +>T : Symbol(T, Decl(decoratorOnClass6.es6.ts, 0, 21)) +>T : Symbol(T, Decl(decoratorOnClass6.es6.ts, 0, 21)) + +@dec +>dec : Symbol(dec, Decl(decoratorOnClass6.es6.ts, 0, 0)) + +export class C { +>C : Symbol(C, Decl(decoratorOnClass6.es6.ts, 0, 38)) + + static x() { return C.y; } +>x : Symbol(C.x, Decl(decoratorOnClass6.es6.ts, 3, 16)) +>C.y : Symbol(C.y, Decl(decoratorOnClass6.es6.ts, 4, 30)) +>C : Symbol(C, Decl(decoratorOnClass6.es6.ts, 0, 38)) +>y : Symbol(C.y, Decl(decoratorOnClass6.es6.ts, 4, 30)) + + static y = 1; +>y : Symbol(C.y, Decl(decoratorOnClass6.es6.ts, 4, 30)) +} + +let c = new C(); +>c : Symbol(c, Decl(decoratorOnClass6.es6.ts, 8, 3)) +>C : Symbol(C, Decl(decoratorOnClass6.es6.ts, 0, 38)) + diff --git a/tests/baselines/reference/decoratorOnClass6.es6.types b/tests/baselines/reference/decoratorOnClass6.es6.types new file mode 100644 index 00000000000..0b335558400 --- /dev/null +++ b/tests/baselines/reference/decoratorOnClass6.es6.types @@ -0,0 +1,30 @@ +=== tests/cases/conformance/es6/decorators/class/decoratorOnClass6.es6.ts === +declare function dec(target: T): T; +>dec : (target: T) => T +>T : T +>target : T +>T : T +>T : T + +@dec +>dec : (target: T) => T + +export class C { +>C : C + + static x() { return C.y; } +>x : () => number +>C.y : number +>C : typeof C +>y : number + + static y = 1; +>y : number +>1 : number +} + +let c = new C(); +>c : C +>new C() : C +>C : typeof C + diff --git a/tests/baselines/reference/decoratorOnClass7.es6.js b/tests/baselines/reference/decoratorOnClass7.es6.js new file mode 100644 index 00000000000..3ffd0f1574f --- /dev/null +++ b/tests/baselines/reference/decoratorOnClass7.es6.js @@ -0,0 +1,28 @@ +//// [decoratorOnClass7.es6.ts] +declare function dec(target: T): T; + +@dec +export default class C { + static x() { return C.y; } + static y = 1; +} + +let c = new C(); + +//// [decoratorOnClass7.es6.js] +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +let C_1; +let C = C_1 = class C { + static x() { return C_1.y; } +}; +C.y = 1; +C = C_1 = __decorate([ + dec +], C); +export default C; +let c = new C(); diff --git a/tests/baselines/reference/decoratorOnClass7.es6.symbols b/tests/baselines/reference/decoratorOnClass7.es6.symbols new file mode 100644 index 00000000000..d010757a9df --- /dev/null +++ b/tests/baselines/reference/decoratorOnClass7.es6.symbols @@ -0,0 +1,28 @@ +=== tests/cases/conformance/es6/decorators/class/decoratorOnClass7.es6.ts === +declare function dec(target: T): T; +>dec : Symbol(dec, Decl(decoratorOnClass7.es6.ts, 0, 0)) +>T : Symbol(T, Decl(decoratorOnClass7.es6.ts, 0, 21)) +>target : Symbol(target, Decl(decoratorOnClass7.es6.ts, 0, 24)) +>T : Symbol(T, Decl(decoratorOnClass7.es6.ts, 0, 21)) +>T : Symbol(T, Decl(decoratorOnClass7.es6.ts, 0, 21)) + +@dec +>dec : Symbol(dec, Decl(decoratorOnClass7.es6.ts, 0, 0)) + +export default class C { +>C : Symbol(C, Decl(decoratorOnClass7.es6.ts, 0, 38)) + + static x() { return C.y; } +>x : Symbol(C.x, Decl(decoratorOnClass7.es6.ts, 3, 24)) +>C.y : Symbol(C.y, Decl(decoratorOnClass7.es6.ts, 4, 30)) +>C : Symbol(C, Decl(decoratorOnClass7.es6.ts, 0, 38)) +>y : Symbol(C.y, Decl(decoratorOnClass7.es6.ts, 4, 30)) + + static y = 1; +>y : Symbol(C.y, Decl(decoratorOnClass7.es6.ts, 4, 30)) +} + +let c = new C(); +>c : Symbol(c, Decl(decoratorOnClass7.es6.ts, 8, 3)) +>C : Symbol(C, Decl(decoratorOnClass7.es6.ts, 0, 38)) + diff --git a/tests/baselines/reference/decoratorOnClass7.es6.types b/tests/baselines/reference/decoratorOnClass7.es6.types new file mode 100644 index 00000000000..af7ae0516e3 --- /dev/null +++ b/tests/baselines/reference/decoratorOnClass7.es6.types @@ -0,0 +1,30 @@ +=== tests/cases/conformance/es6/decorators/class/decoratorOnClass7.es6.ts === +declare function dec(target: T): T; +>dec : (target: T) => T +>T : T +>target : T +>T : T +>T : T + +@dec +>dec : (target: T) => T + +export default class C { +>C : C + + static x() { return C.y; } +>x : () => number +>C.y : number +>C : typeof C +>y : number + + static y = 1; +>y : number +>1 : number +} + +let c = new C(); +>c : C +>new C() : C +>C : typeof C + diff --git a/tests/baselines/reference/decoratorOnClass8.es6.js b/tests/baselines/reference/decoratorOnClass8.es6.js new file mode 100644 index 00000000000..7104098a5f5 --- /dev/null +++ b/tests/baselines/reference/decoratorOnClass8.es6.js @@ -0,0 +1,22 @@ +//// [decoratorOnClass8.es6.ts] +declare function dec(target: T): T; + +@dec +export default class { + static y = 1; +} + +//// [decoratorOnClass8.es6.js] +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +let default_1 = class { +}; +default_1.y = 1; +default_1 = __decorate([ + dec +], default_1); +export default default_1; diff --git a/tests/baselines/reference/decoratorOnClass8.es6.symbols b/tests/baselines/reference/decoratorOnClass8.es6.symbols new file mode 100644 index 00000000000..b219f50ff3d --- /dev/null +++ b/tests/baselines/reference/decoratorOnClass8.es6.symbols @@ -0,0 +1,15 @@ +=== tests/cases/conformance/es6/decorators/class/decoratorOnClass8.es6.ts === +declare function dec(target: T): T; +>dec : Symbol(dec, Decl(decoratorOnClass8.es6.ts, 0, 0)) +>T : Symbol(T, Decl(decoratorOnClass8.es6.ts, 0, 21)) +>target : Symbol(target, Decl(decoratorOnClass8.es6.ts, 0, 24)) +>T : Symbol(T, Decl(decoratorOnClass8.es6.ts, 0, 21)) +>T : Symbol(T, Decl(decoratorOnClass8.es6.ts, 0, 21)) + +@dec +>dec : Symbol(dec, Decl(decoratorOnClass8.es6.ts, 0, 0)) + +export default class { + static y = 1; +>y : Symbol(default.y, Decl(decoratorOnClass8.es6.ts, 3, 22)) +} diff --git a/tests/baselines/reference/decoratorOnClass8.es6.types b/tests/baselines/reference/decoratorOnClass8.es6.types new file mode 100644 index 00000000000..045b036e335 --- /dev/null +++ b/tests/baselines/reference/decoratorOnClass8.es6.types @@ -0,0 +1,16 @@ +=== tests/cases/conformance/es6/decorators/class/decoratorOnClass8.es6.ts === +declare function dec(target: T): T; +>dec : (target: T) => T +>T : T +>target : T +>T : T +>T : T + +@dec +>dec : (target: T) => T + +export default class { + static y = 1; +>y : number +>1 : number +} diff --git a/tests/baselines/reference/generatorTypeCheck39.js b/tests/baselines/reference/generatorTypeCheck39.js index 43df3b8e205..1e0009d24ed 100644 --- a/tests/baselines/reference/generatorTypeCheck39.js +++ b/tests/baselines/reference/generatorTypeCheck39.js @@ -20,7 +20,7 @@ function decorator(x) { return y => { }; } function* g() { - let C = class { + let C = class C { constructor() { this.x = yield 0; } diff --git a/tests/baselines/reference/generatorTypeCheck61.js b/tests/baselines/reference/generatorTypeCheck61.js index b2434ee590c..9cc157f2684 100644 --- a/tests/baselines/reference/generatorTypeCheck61.js +++ b/tests/baselines/reference/generatorTypeCheck61.js @@ -12,7 +12,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, return c > 3 && r && Object.defineProperty(target, key, r), r; }; function* g() { - let C = class { + let C = class C { }; C = __decorate([ (yield 0) diff --git a/tests/cases/conformance/es6/decorators/class/decoratorOnClass1.es6.ts b/tests/cases/conformance/es6/decorators/class/decoratorOnClass1.es6.ts new file mode 100644 index 00000000000..7dccedc5d1f --- /dev/null +++ b/tests/cases/conformance/es6/decorators/class/decoratorOnClass1.es6.ts @@ -0,0 +1,9 @@ +// @target:es6 +// @experimentaldecorators: true +declare function dec(target: T): T; + +@dec +class C { +} + +let c = new C(); \ No newline at end of file diff --git a/tests/cases/conformance/es6/decorators/class/decoratorOnClass2.es6.ts b/tests/cases/conformance/es6/decorators/class/decoratorOnClass2.es6.ts new file mode 100644 index 00000000000..62d6a15d0bc --- /dev/null +++ b/tests/cases/conformance/es6/decorators/class/decoratorOnClass2.es6.ts @@ -0,0 +1,9 @@ +// @target:es6 +// @experimentaldecorators: true +declare function dec(target: T): T; + +@dec +export class C { +} + +let c = new C(); \ No newline at end of file diff --git a/tests/cases/conformance/es6/decorators/class/decoratorOnClass3.es6.ts b/tests/cases/conformance/es6/decorators/class/decoratorOnClass3.es6.ts new file mode 100644 index 00000000000..cc62befe2d8 --- /dev/null +++ b/tests/cases/conformance/es6/decorators/class/decoratorOnClass3.es6.ts @@ -0,0 +1,9 @@ +// @target:es6 +// @experimentaldecorators: true +declare function dec(target: T): T; + +@dec +export default class C { +} + +let c = new C(); \ No newline at end of file diff --git a/tests/cases/conformance/es6/decorators/class/decoratorOnClass4.es6.ts b/tests/cases/conformance/es6/decorators/class/decoratorOnClass4.es6.ts new file mode 100644 index 00000000000..050c8ae15fc --- /dev/null +++ b/tests/cases/conformance/es6/decorators/class/decoratorOnClass4.es6.ts @@ -0,0 +1,7 @@ +// @target:es6 +// @experimentaldecorators: true +declare function dec(target: T): T; + +@dec +export default class { +} \ No newline at end of file diff --git a/tests/cases/conformance/es6/decorators/class/decoratorOnClass5.es6.ts b/tests/cases/conformance/es6/decorators/class/decoratorOnClass5.es6.ts new file mode 100644 index 00000000000..daa21330c2b --- /dev/null +++ b/tests/cases/conformance/es6/decorators/class/decoratorOnClass5.es6.ts @@ -0,0 +1,11 @@ +// @target:es6 +// @experimentaldecorators: true +declare function dec(target: T): T; + +@dec +class C { + static x() { return C.y; } + static y = 1; +} + +let c = new C(); \ No newline at end of file diff --git a/tests/cases/conformance/es6/decorators/class/decoratorOnClass6.es6.ts b/tests/cases/conformance/es6/decorators/class/decoratorOnClass6.es6.ts new file mode 100644 index 00000000000..b28f8918495 --- /dev/null +++ b/tests/cases/conformance/es6/decorators/class/decoratorOnClass6.es6.ts @@ -0,0 +1,11 @@ +// @target:es6 +// @experimentaldecorators: true +declare function dec(target: T): T; + +@dec +export class C { + static x() { return C.y; } + static y = 1; +} + +let c = new C(); \ No newline at end of file diff --git a/tests/cases/conformance/es6/decorators/class/decoratorOnClass7.es6.ts b/tests/cases/conformance/es6/decorators/class/decoratorOnClass7.es6.ts new file mode 100644 index 00000000000..a69b7556d97 --- /dev/null +++ b/tests/cases/conformance/es6/decorators/class/decoratorOnClass7.es6.ts @@ -0,0 +1,11 @@ +// @target:es6 +// @experimentaldecorators: true +declare function dec(target: T): T; + +@dec +export default class C { + static x() { return C.y; } + static y = 1; +} + +let c = new C(); \ No newline at end of file diff --git a/tests/cases/conformance/es6/decorators/class/decoratorOnClass8.es6.ts b/tests/cases/conformance/es6/decorators/class/decoratorOnClass8.es6.ts new file mode 100644 index 00000000000..2e85fc801f2 --- /dev/null +++ b/tests/cases/conformance/es6/decorators/class/decoratorOnClass8.es6.ts @@ -0,0 +1,8 @@ +// @target:es6 +// @experimentaldecorators: true +declare function dec(target: T): T; + +@dec +export default class { + static y = 1; +} \ No newline at end of file From 098d59c954d3ba4c48abaae5708a85246cc264e0 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Wed, 27 Jan 2016 16:33:45 -0800 Subject: [PATCH 103/160] Cleaned up variable names and conditions in checkIdentifier --- src/compiler/checker.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 2494d0db260..11f550bad5b 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -7192,19 +7192,18 @@ namespace ts { markAliasSymbolAsReferenced(symbol); } - const localSymbol = getExportSymbolOfValueSymbolIfExported(symbol); + const localOrExportSymbol = getExportSymbolOfValueSymbolIfExported(symbol); // Due to the emit for class decorators, any reference to the class from inside of the class body // must instead be rewritten to point to a temporary variable to avoid issues with the double-bind // behavior of class names in ES6. if (languageVersion === ScriptTarget.ES6 - && localSymbol - && localSymbol.valueDeclaration - && localSymbol.valueDeclaration.kind === SyntaxKind.ClassDeclaration - && nodeIsDecorated(localSymbol.valueDeclaration)) { + && localOrExportSymbol.flags & SymbolFlags.Class + && localOrExportSymbol.valueDeclaration.kind === SyntaxKind.ClassDeclaration + && nodeIsDecorated(localOrExportSymbol.valueDeclaration)) { let container = getContainingClass(node); while (container !== undefined) { - if (container === localSymbol.valueDeclaration && container.name !== node) { + if (container === localOrExportSymbol.valueDeclaration && container.name !== node) { getNodeLinks(container).flags |= NodeCheckFlags.ClassWithBodyScopedClassBinding; getNodeLinks(node).flags |= NodeCheckFlags.BodyScopedClassBinding; break; @@ -7218,7 +7217,7 @@ namespace ts { checkCollisionWithCapturedThisVariable(node, node); checkNestedBlockScopedBinding(node, symbol); - return getNarrowedTypeOfSymbol(localSymbol, node); + return getNarrowedTypeOfSymbol(localOrExportSymbol, node); } function isInsideFunction(node: Node, threshold: Node): boolean { From c353252c8e7d914dbf23539633f07951213a1026 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Wed, 27 Jan 2016 19:51:43 -0800 Subject: [PATCH 104/160] Update authors for release 1.8 --- AUTHORS.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/AUTHORS.md b/AUTHORS.md index 486a15bf47f..0501514d758 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -2,9 +2,11 @@ TypeScript is authored by: * Adam Freidin * Ahmad Farid +* Akshar Patel * Anders Hejlsberg * Arnav Singh * Arthur Ozga +* Asad Saeeduddin * Basarat Ali Syed * Ben Duffield * Bill Ticehurst @@ -15,30 +17,39 @@ TypeScript is authored by: * Colby Russell * Colin Snover * Cyrus Najmabadi +* Dan Corder * Dan Quirk * Daniel Rosenwasser +* @dashaus * David Li * Denis Nedelyaev * Dick van den Brink * Dirk Bäumer +* Dirk Holtwick * Eyas Sharaiha +* @falsandtru * Frank Wallis * Gabriel Isenberg * Gilad Peleg * Graeme Wicksted * Guillaume Salles +* Guy Bedford * Harald Niesche +* Iain Monro * Ingvar Stepanyan * Ivo Gabe de Wolff * James Whitney * Jason Freeman +* Jason Killian * Jason Ramsay * Jed Mao +* Jeffrey Morlan * Johannes Rieken * John Vilk * Jonathan Bond-Caron * Jonathan Park * Jonathan Turner +* Jonathon Smith * Josh Kalderimis * Julian Williams * Kagami Sascha Rosylight @@ -46,21 +57,27 @@ TypeScript is authored by: * Ken Howard * Kenji Imamula * Lorant Pinter +* Lucien Greathouse * Martin Všetička * Masahiro Wakame +* Mattias Buelens * Max Deepfield * Micah Zoltu * Mohamed Hegazy * Nathan Shively-Sanders +* Nathan Yee * Oleg Mihailik * Oleksandr Chekhovskyi * Paul van Brenk +* @pcbro * Pedro Maltez * Philip Bulley * piloopin * @progre * Punya Biswal +* Richard Sentino * Ron Buckton +* Rowan Wyborn * Ryan Cavanaugh * Ryohei Ikegami * Sébastien Arod @@ -71,7 +88,9 @@ TypeScript is authored by: * Solal Pirelli * Stan Thomas * Steve Lucco +* Thomas Loubiou * Tien Hoanhtien +* Tim Perry * Tingan Ho * togru * Tomas Grubliauskas @@ -81,5 +100,6 @@ TypeScript is authored by: * Wesley Wigham * York Yao * Yui Tanglertsampan +* Yuichi Nukiyama * Zev Spitz * Zhengbo Li From 301901709336b23ee3a4762855cd516a7229b6d6 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Thu, 28 Jan 2016 10:39:54 -0800 Subject: [PATCH 105/160] Emit readonly in declaration files --- src/compiler/declarationEmitter.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/compiler/declarationEmitter.ts b/src/compiler/declarationEmitter.ts index 9a57b4b1a37..7a8db9f90ed 100644 --- a/src/compiler/declarationEmitter.ts +++ b/src/compiler/declarationEmitter.ts @@ -648,6 +648,9 @@ namespace ts { if (node.flags & NodeFlags.Static) { write("static "); } + if (node.flags & NodeFlags.Readonly) { + write("readonly "); + } if (node.flags & NodeFlags.Abstract) { write("abstract "); } @@ -1342,15 +1345,17 @@ namespace ts { const prevEnclosingDeclaration = enclosingDeclaration; enclosingDeclaration = node; - // Construct signature or constructor type write new Signature - if (node.kind === SyntaxKind.ConstructSignature || node.kind === SyntaxKind.ConstructorType) { - write("new "); - } - emitTypeParameters(node.typeParameters); if (node.kind === SyntaxKind.IndexSignature) { + // Index signature can have readonly modifier + emitClassMemberDeclarationFlags(node); write("["); } else { + // Construct signature or constructor type write new Signature + if (node.kind === SyntaxKind.ConstructSignature || node.kind === SyntaxKind.ConstructorType) { + write("new "); + } + emitTypeParameters(node.typeParameters); write("("); } From 371811ab5b795ce0abb2a0c81e96098c09768652 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Thu, 28 Jan 2016 10:40:08 -0800 Subject: [PATCH 106/160] Adding test --- .../reference/readonlyInDeclarationFile.js | 83 +++++++++++++++++++ .../readonlyInDeclarationFile.symbols | 76 +++++++++++++++++ .../reference/readonlyInDeclarationFile.types | 83 +++++++++++++++++++ .../compiler/readonlyInDeclarationFile.ts | 36 ++++++++ 4 files changed, 278 insertions(+) create mode 100644 tests/baselines/reference/readonlyInDeclarationFile.js create mode 100644 tests/baselines/reference/readonlyInDeclarationFile.symbols create mode 100644 tests/baselines/reference/readonlyInDeclarationFile.types create mode 100644 tests/cases/compiler/readonlyInDeclarationFile.ts diff --git a/tests/baselines/reference/readonlyInDeclarationFile.js b/tests/baselines/reference/readonlyInDeclarationFile.js new file mode 100644 index 00000000000..d2a20280e0f --- /dev/null +++ b/tests/baselines/reference/readonlyInDeclarationFile.js @@ -0,0 +1,83 @@ +//// [readonlyInDeclarationFile.ts] + +interface Foo { + readonly x: number; + readonly [x: string]: Object; +} + +class C { + protected readonly y: number; + readonly [x: string]: Object; + private static readonly a = "foo"; + protected static readonly b = "foo"; + public static readonly c = "foo"; +} + +var z: { + readonly a: string; + readonly [x: string]: Object; +} + +function f() { + return { + get x() { return 1; }, + get y() { return 1; }, + set y(value) { } + } +} + +function g() { + var x: { + readonly a: string; + readonly [x: string]: Object; + } + return x; +} + +//// [readonlyInDeclarationFile.js] +var C = (function () { + function C() { + } + C.a = "foo"; + C.b = "foo"; + C.c = "foo"; + return C; +}()); +var z; +function f() { + return { + get x() { return 1; }, + get y() { return 1; }, + set y(value) { } + }; +} +function g() { + var x; + return x; +} + + +//// [readonlyInDeclarationFile.d.ts] +interface Foo { + readonly x: number; + readonly [x: string]: Object; +} +declare class C { + protected readonly y: number; + readonly [x: string]: Object; + private static readonly a; + protected static readonly b: string; + static readonly c: string; +} +declare var z: { + readonly a: string; + readonly [x: string]: Object; +}; +declare function f(): { + readonly x: number; + y: number; +}; +declare function g(): { + readonly [x: string]: Object; + readonly a: string; +}; diff --git a/tests/baselines/reference/readonlyInDeclarationFile.symbols b/tests/baselines/reference/readonlyInDeclarationFile.symbols new file mode 100644 index 00000000000..f7bbf19a0ae --- /dev/null +++ b/tests/baselines/reference/readonlyInDeclarationFile.symbols @@ -0,0 +1,76 @@ +=== tests/cases/compiler/readonlyInDeclarationFile.ts === + +interface Foo { +>Foo : Symbol(Foo, Decl(readonlyInDeclarationFile.ts, 0, 0)) + + readonly x: number; +>x : Symbol(x, Decl(readonlyInDeclarationFile.ts, 1, 15)) + + readonly [x: string]: Object; +>x : Symbol(x, Decl(readonlyInDeclarationFile.ts, 3, 14)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +} + +class C { +>C : Symbol(C, Decl(readonlyInDeclarationFile.ts, 4, 1)) + + protected readonly y: number; +>y : Symbol(y, Decl(readonlyInDeclarationFile.ts, 6, 9)) + + readonly [x: string]: Object; +>x : Symbol(x, Decl(readonlyInDeclarationFile.ts, 8, 14)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) + + private static readonly a = "foo"; +>a : Symbol(C.a, Decl(readonlyInDeclarationFile.ts, 8, 33)) + + protected static readonly b = "foo"; +>b : Symbol(C.b, Decl(readonlyInDeclarationFile.ts, 9, 38)) + + public static readonly c = "foo"; +>c : Symbol(C.c, Decl(readonlyInDeclarationFile.ts, 10, 40)) +} + +var z: { +>z : Symbol(z, Decl(readonlyInDeclarationFile.ts, 14, 3)) + + readonly a: string; +>a : Symbol(a, Decl(readonlyInDeclarationFile.ts, 14, 8)) + + readonly [x: string]: Object; +>x : Symbol(x, Decl(readonlyInDeclarationFile.ts, 16, 14)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +} + +function f() { +>f : Symbol(f, Decl(readonlyInDeclarationFile.ts, 17, 1)) + + return { + get x() { return 1; }, +>x : Symbol(x, Decl(readonlyInDeclarationFile.ts, 20, 12)) + + get y() { return 1; }, +>y : Symbol(y, Decl(readonlyInDeclarationFile.ts, 21, 30), Decl(readonlyInDeclarationFile.ts, 22, 30)) + + set y(value) { } +>y : Symbol(y, Decl(readonlyInDeclarationFile.ts, 21, 30), Decl(readonlyInDeclarationFile.ts, 22, 30)) +>value : Symbol(value, Decl(readonlyInDeclarationFile.ts, 23, 14)) + } +} + +function g() { +>g : Symbol(g, Decl(readonlyInDeclarationFile.ts, 25, 1)) + + var x: { +>x : Symbol(x, Decl(readonlyInDeclarationFile.ts, 28, 7)) + + readonly a: string; +>a : Symbol(a, Decl(readonlyInDeclarationFile.ts, 28, 12)) + + readonly [x: string]: Object; +>x : Symbol(x, Decl(readonlyInDeclarationFile.ts, 30, 18)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) + } + return x; +>x : Symbol(x, Decl(readonlyInDeclarationFile.ts, 28, 7)) +} diff --git a/tests/baselines/reference/readonlyInDeclarationFile.types b/tests/baselines/reference/readonlyInDeclarationFile.types new file mode 100644 index 00000000000..9b2f9d51d99 --- /dev/null +++ b/tests/baselines/reference/readonlyInDeclarationFile.types @@ -0,0 +1,83 @@ +=== tests/cases/compiler/readonlyInDeclarationFile.ts === + +interface Foo { +>Foo : Foo + + readonly x: number; +>x : number + + readonly [x: string]: Object; +>x : string +>Object : Object +} + +class C { +>C : C + + protected readonly y: number; +>y : number + + readonly [x: string]: Object; +>x : string +>Object : Object + + private static readonly a = "foo"; +>a : string +>"foo" : string + + protected static readonly b = "foo"; +>b : string +>"foo" : string + + public static readonly c = "foo"; +>c : string +>"foo" : string +} + +var z: { +>z : { readonly [x: string]: Object; readonly a: string; } + + readonly a: string; +>a : string + + readonly [x: string]: Object; +>x : string +>Object : Object +} + +function f() { +>f : () => { readonly x: number; y: number; } + + return { +>{ get x() { return 1; }, get y() { return 1; }, set y(value) { } } : { readonly x: number; y: number; } + + get x() { return 1; }, +>x : number +>1 : number + + get y() { return 1; }, +>y : number +>1 : number + + set y(value) { } +>y : number +>value : number + } +} + +function g() { +>g : () => { readonly [x: string]: Object; readonly a: string; } + + var x: { +>x : { readonly [x: string]: Object; readonly a: string; } + + readonly a: string; +>a : string + + readonly [x: string]: Object; +>x : string +>Object : Object + } + return x; +>x : { readonly [x: string]: Object; readonly a: string; } +} diff --git a/tests/cases/compiler/readonlyInDeclarationFile.ts b/tests/cases/compiler/readonlyInDeclarationFile.ts new file mode 100644 index 00000000000..99241b8c0c0 --- /dev/null +++ b/tests/cases/compiler/readonlyInDeclarationFile.ts @@ -0,0 +1,36 @@ +// @target: es5 +// @declaration: true + +interface Foo { + readonly x: number; + readonly [x: string]: Object; +} + +class C { + protected readonly y: number; + readonly [x: string]: Object; + private static readonly a = "foo"; + protected static readonly b = "foo"; + public static readonly c = "foo"; +} + +var z: { + readonly a: string; + readonly [x: string]: Object; +} + +function f() { + return { + get x() { return 1; }, + get y() { return 1; }, + set y(value) { } + } +} + +function g() { + var x: { + readonly a: string; + readonly [x: string]: Object; + } + return x; +} \ No newline at end of file From 364b08854bc1face5c9b38301bb83c7346f1ccce Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Thu, 28 Jan 2016 11:02:49 -0800 Subject: [PATCH 107/160] Recognize the RHS of assignments as the JSDoc target expression Fixes #6552 --- src/compiler/parser.ts | 6 +++--- src/compiler/utilities.ts | 14 ++++++++++++- .../fourslash/getJavaScriptCompletions18.ts | 21 +++++++++++++++++++ 3 files changed, 37 insertions(+), 4 deletions(-) create mode 100644 tests/cases/fourslash/getJavaScriptCompletions18.ts diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 57bd9860d12..7806df795d2 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -4051,7 +4051,7 @@ namespace ts { setDecoratorContext(/*val*/ true); } - return finishNode(node); + return addJSDocComment(finishNode(node)); } function parseOptionalIdentifier() { @@ -4335,13 +4335,13 @@ namespace ts { const labeledStatement = createNode(SyntaxKind.LabeledStatement, fullStart); labeledStatement.label = expression; labeledStatement.statement = parseStatement(); - return finishNode(labeledStatement); + return addJSDocComment(finishNode(labeledStatement)); } else { const expressionStatement = createNode(SyntaxKind.ExpressionStatement, fullStart); expressionStatement.expression = expression; parseSemicolon(); - return finishNode(expressionStatement); + return addJSDocComment(finishNode(expressionStatement)); } } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 4bf1422e888..0856cb55477 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -1186,7 +1186,19 @@ namespace ts { node.parent.parent.parent.kind === SyntaxKind.VariableStatement; const variableStatementNode = isInitializerOfVariableDeclarationInStatement ? node.parent.parent.parent : undefined; - return variableStatementNode && variableStatementNode.jsDocComment; + if (variableStatementNode) { + return variableStatementNode.jsDocComment; + } + + // Also recognize when the node is the RHS of an assignment expression + const isSourceOfAssignmentExpressionStatement = + node.parent && node.parent.parent && + node.parent.kind === SyntaxKind.BinaryExpression && + (node.parent as BinaryExpression).operatorToken.kind === SyntaxKind.EqualsToken && + node.parent.parent.kind === SyntaxKind.ExpressionStatement; + if (isSourceOfAssignmentExpressionStatement) { + return node.parent.parent.jsDocComment; + } } return undefined; diff --git a/tests/cases/fourslash/getJavaScriptCompletions18.ts b/tests/cases/fourslash/getJavaScriptCompletions18.ts new file mode 100644 index 00000000000..a30d4943f4f --- /dev/null +++ b/tests/cases/fourslash/getJavaScriptCompletions18.ts @@ -0,0 +1,21 @@ +/// + +// @allowNonTsExtensions: true +// @Filename: file.js +//// /** +//// * @param {number} a +//// * @param {string} b +//// */ +//// exports.foo = function(a, b) { +//// a/*a*/; +//// b/*b*/ +//// }; + +goTo.marker('a'); +edit.insert('.'); +verify.completionListContains('toFixed', undefined, undefined, 'method'); + + +goTo.marker('b'); +edit.insert('.'); +verify.completionListContains('substr', undefined, undefined, 'method'); From bf897c29393e7e7ee92a71e123e502ca3d0ba12f Mon Sep 17 00:00:00 2001 From: zhengbli Date: Thu, 28 Jan 2016 11:26:32 -0800 Subject: [PATCH 108/160] Add more tests and comments --- src/compiler/checker.ts | 2 ++ tests/cases/fourslash/renameCrossJsTs01.ts | 12 ++++++++++++ tests/cases/fourslash/renameCrossJsTs02.ts | 12 ++++++++++++ .../{renameJsExports.ts => renameJsExports01.ts} | 2 +- tests/cases/fourslash/renameJsExports02.ts | 12 ++++++++++++ ...ypeProperty.ts => renameJsPrototypeProperty01.ts} | 2 +- tests/cases/fourslash/renameJsPrototypeProperty02.ts | 12 ++++++++++++ ...meJsThisProperty.ts => renameJsThisProperty01.ts} | 2 +- tests/cases/fourslash/renameJsThisProperty02.ts | 12 ++++++++++++ 9 files changed, 65 insertions(+), 3 deletions(-) create mode 100644 tests/cases/fourslash/renameCrossJsTs01.ts create mode 100644 tests/cases/fourslash/renameCrossJsTs02.ts rename tests/cases/fourslash/{renameJsExports.ts => renameJsExports01.ts} (72%) create mode 100644 tests/cases/fourslash/renameJsExports02.ts rename tests/cases/fourslash/{renameJsPrototypeProperty.ts => renameJsPrototypeProperty01.ts} (69%) create mode 100644 tests/cases/fourslash/renameJsPrototypeProperty02.ts rename tests/cases/fourslash/{renameJsThisProperty.ts => renameJsThisProperty01.ts} (68%) create mode 100644 tests/cases/fourslash/renameJsThisProperty02.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index b3792a97988..758c5bbb4ad 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -15367,6 +15367,8 @@ namespace ts { case SpecialPropertyAssignmentKind.ThisProperty: case SpecialPropertyAssignmentKind.ModuleExports: return getSymbolOfNode(entityName.parent.parent); + default: + // Fall through if it is not a special property assignment } } diff --git a/tests/cases/fourslash/renameCrossJsTs01.ts b/tests/cases/fourslash/renameCrossJsTs01.ts new file mode 100644 index 00000000000..52cb4c587d1 --- /dev/null +++ b/tests/cases/fourslash/renameCrossJsTs01.ts @@ -0,0 +1,12 @@ +/// + +// @allowJs: true +// @Filename: a.js +////exports.[|area|] = function (r) { return r * r; } + +// @Filename: b.ts +////import { [|area|] } from './a'; +////var t = /**/[|area|](10); + +goTo.marker(); +verify.renameLocations( /*findInStrings*/ false, /*findInComments*/ false); \ No newline at end of file diff --git a/tests/cases/fourslash/renameCrossJsTs02.ts b/tests/cases/fourslash/renameCrossJsTs02.ts new file mode 100644 index 00000000000..7ff1ae96ff3 --- /dev/null +++ b/tests/cases/fourslash/renameCrossJsTs02.ts @@ -0,0 +1,12 @@ +/// + +// @allowJs: true +// @Filename: a.js +////exports./**/[|area|] = function (r) { return r * r; } + +// @Filename: b.ts +////import { [|area|] } from './a'; +////var t = [|area|](10); + +goTo.marker(); +verify.renameLocations( /*findInStrings*/ false, /*findInComments*/ false); \ No newline at end of file diff --git a/tests/cases/fourslash/renameJsExports.ts b/tests/cases/fourslash/renameJsExports01.ts similarity index 72% rename from tests/cases/fourslash/renameJsExports.ts rename to tests/cases/fourslash/renameJsExports01.ts index 227eebe4a0d..923d30eedf9 100644 --- a/tests/cases/fourslash/renameJsExports.ts +++ b/tests/cases/fourslash/renameJsExports01.ts @@ -9,4 +9,4 @@ ////var t = mod./**/[|area|](10); goTo.marker(); -verify.renameLocations(false, false); \ No newline at end of file +verify.renameLocations( /*findInStrings*/ false, /*findInComments*/ false); \ No newline at end of file diff --git a/tests/cases/fourslash/renameJsExports02.ts b/tests/cases/fourslash/renameJsExports02.ts new file mode 100644 index 00000000000..86b0471dc1f --- /dev/null +++ b/tests/cases/fourslash/renameJsExports02.ts @@ -0,0 +1,12 @@ +/// + +// @allowJs: true +// @Filename: a.js +////exports./**/[|area|] = function (r) { return r * r; } + +// @Filename: b.js +////var mod = require('./a'); +////var t = mod.[|area|](10); + +goTo.marker(); +verify.renameLocations( /*findInStrings*/ false, /*findInComments*/ false); \ No newline at end of file diff --git a/tests/cases/fourslash/renameJsPrototypeProperty.ts b/tests/cases/fourslash/renameJsPrototypeProperty01.ts similarity index 69% rename from tests/cases/fourslash/renameJsPrototypeProperty.ts rename to tests/cases/fourslash/renameJsPrototypeProperty01.ts index 651514859cc..f756f57edbf 100644 --- a/tests/cases/fourslash/renameJsPrototypeProperty.ts +++ b/tests/cases/fourslash/renameJsPrototypeProperty01.ts @@ -9,4 +9,4 @@ ////t./**/[|x|] = 11; goTo.marker(); -verify.renameLocations(false, false); \ No newline at end of file +verify.renameLocations( /*findInStrings*/ false, /*findInComments*/ false); \ No newline at end of file diff --git a/tests/cases/fourslash/renameJsPrototypeProperty02.ts b/tests/cases/fourslash/renameJsPrototypeProperty02.ts new file mode 100644 index 00000000000..721dc312eb6 --- /dev/null +++ b/tests/cases/fourslash/renameJsPrototypeProperty02.ts @@ -0,0 +1,12 @@ +/// + +// @allowJs: true +// @Filename: a.js +////function bar() { +////} +////bar.prototype./**/[|x|] = 10; +////var t = new bar(); +////t.[|x|] = 11; + +goTo.marker(); +verify.renameLocations( /*findInStrings*/ false, /*findInComments*/ false); \ No newline at end of file diff --git a/tests/cases/fourslash/renameJsThisProperty.ts b/tests/cases/fourslash/renameJsThisProperty01.ts similarity index 68% rename from tests/cases/fourslash/renameJsThisProperty.ts rename to tests/cases/fourslash/renameJsThisProperty01.ts index aed59d298b1..91338e0431d 100644 --- a/tests/cases/fourslash/renameJsThisProperty.ts +++ b/tests/cases/fourslash/renameJsThisProperty01.ts @@ -9,4 +9,4 @@ ////t./**/[|x|] = 11; goTo.marker(); -verify.renameLocations(false, false); \ No newline at end of file +verify.renameLocations( /*findInStrings*/ false, /*findInComments*/ false); \ No newline at end of file diff --git a/tests/cases/fourslash/renameJsThisProperty02.ts b/tests/cases/fourslash/renameJsThisProperty02.ts new file mode 100644 index 00000000000..8398507c9ca --- /dev/null +++ b/tests/cases/fourslash/renameJsThisProperty02.ts @@ -0,0 +1,12 @@ +/// + +// @allowJs: true +// @Filename: a.js +////function bar() { +//// this./**/[|x|] = 10; +////} +////var t = new bar(); +////t.[|x|] = 11; + +goTo.marker(); +verify.renameLocations( /*findInStrings*/ false, /*findInComments*/ false); \ No newline at end of file From da6e82f639a7cc96887fde34391a9c8c654fa301 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Thu, 28 Jan 2016 11:39:19 -0800 Subject: [PATCH 109/160] Use union types in the return type of functions in the error case Fixes #6663 --- src/compiler/checker.ts | 3 ++- .../fourslash/getJavaScriptCompletions19.ts | 25 +++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 tests/cases/fourslash/getJavaScriptCompletions19.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 61c05d7688c..55587ca683c 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -10390,7 +10390,8 @@ namespace ts { } else { error(func, Diagnostics.No_best_common_type_exists_among_return_expressions); - return unknownType; + // Defer to unioning the return types so we get a) downstream errors earlier and b) better Salsa experience + return getUnionType(types); } } diff --git a/tests/cases/fourslash/getJavaScriptCompletions19.ts b/tests/cases/fourslash/getJavaScriptCompletions19.ts new file mode 100644 index 00000000000..5a361930e86 --- /dev/null +++ b/tests/cases/fourslash/getJavaScriptCompletions19.ts @@ -0,0 +1,25 @@ +/// + +// @allowNonTsExtensions: true +// @Filename: file.js +//// function fn() { +//// if (foo) { +//// return 0; +//// } else { +//// return '0'; +//// } +//// } +//// let x = fn(); +//// if(typeof x === 'string') { +//// x/*str*/ +//// } else { +//// x/*num*/ +//// } + +goTo.marker('str'); +edit.insert('.'); +verify.completionListContains('substr', undefined, undefined, 'method'); + +goTo.marker('num'); +edit.insert('.'); +verify.completionListContains('toFixed', undefined, undefined, 'method'); From a88ff9c2ad9a2476ede5148b67b20d70684e3af8 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Thu, 28 Jan 2016 13:28:49 -0800 Subject: [PATCH 110/160] Emit readonly in declaration file for get-only accessors in classes --- src/compiler/declarationEmitter.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/compiler/declarationEmitter.ts b/src/compiler/declarationEmitter.ts index 7a8db9f90ed..ab0b16947fc 100644 --- a/src/compiler/declarationEmitter.ts +++ b/src/compiler/declarationEmitter.ts @@ -637,21 +637,21 @@ namespace ts { } } - function emitClassMemberDeclarationFlags(node: Declaration) { - if (node.flags & NodeFlags.Private) { + function emitClassMemberDeclarationFlags(flags: NodeFlags) { + if (flags & NodeFlags.Private) { write("private "); } - else if (node.flags & NodeFlags.Protected) { + else if (flags & NodeFlags.Protected) { write("protected "); } - if (node.flags & NodeFlags.Static) { + if (flags & NodeFlags.Static) { write("static "); } - if (node.flags & NodeFlags.Readonly) { + if (flags & NodeFlags.Readonly) { write("readonly "); } - if (node.flags & NodeFlags.Abstract) { + if (flags & NodeFlags.Abstract) { write("abstract "); } } @@ -1077,7 +1077,7 @@ namespace ts { } emitJsDocComments(node); - emitClassMemberDeclarationFlags(node); + emitClassMemberDeclarationFlags(node.flags); emitVariableDeclaration(node); write(";"); writeLine(); @@ -1230,7 +1230,7 @@ namespace ts { if (node === accessors.firstAccessor) { emitJsDocComments(accessors.getAccessor); emitJsDocComments(accessors.setAccessor); - emitClassMemberDeclarationFlags(node); + emitClassMemberDeclarationFlags(node.flags | (accessors.setAccessor ? 0 : NodeFlags.Readonly)); writeTextOfNode(currentText, node.name); if (!(node.flags & NodeFlags.Private)) { accessorWithTypeAnnotation = node; @@ -1317,7 +1317,7 @@ namespace ts { emitModuleElementDeclarationFlags(node); } else if (node.kind === SyntaxKind.MethodDeclaration) { - emitClassMemberDeclarationFlags(node); + emitClassMemberDeclarationFlags(node.flags); } if (node.kind === SyntaxKind.FunctionDeclaration) { write("function "); @@ -1347,7 +1347,7 @@ namespace ts { if (node.kind === SyntaxKind.IndexSignature) { // Index signature can have readonly modifier - emitClassMemberDeclarationFlags(node); + emitClassMemberDeclarationFlags(node.flags); write("["); } else { From 898797fceef1b9a5653c01091ee3647faad53977 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Thu, 28 Jan 2016 13:29:20 -0800 Subject: [PATCH 111/160] Adding more test cases --- .../compiler/readonlyInDeclarationFile.ts | 28 ++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/tests/cases/compiler/readonlyInDeclarationFile.ts b/tests/cases/compiler/readonlyInDeclarationFile.ts index 99241b8c0c0..03e643782f0 100644 --- a/tests/cases/compiler/readonlyInDeclarationFile.ts +++ b/tests/cases/compiler/readonlyInDeclarationFile.ts @@ -7,11 +7,31 @@ interface Foo { } class C { - protected readonly y: number; readonly [x: string]: Object; - private static readonly a = "foo"; - protected static readonly b = "foo"; - public static readonly c = "foo"; + private readonly a1: number; + protected readonly a2: number; + public readonly a3: number; + private get b1() { return 1 } + protected get b2() { return 1 } + public get b3() { return 1 } + private get c1() { return 1 } + private set c1(value) { } + protected get c2() { return 1 } + protected set c2(value) { } + public get c3() { return 1 } + public set c3(value) { } + private static readonly s1: number; + protected static readonly s2: number; + public static readonly s3: number; + private static get t1() { return 1 } + protected static get t2() { return 1 } + public static get t3() { return 1 } + private static get u1() { return 1 } + private static set u1(value) { } + protected static get u2() { return 1 } + protected static set u2(value) { } + public static get u3() { return 1 } + public static set u3(value) { } } var z: { From c00d239c00e3785f5cd1ac3f75b26242ff3e60ba Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Thu, 28 Jan 2016 13:29:58 -0800 Subject: [PATCH 112/160] Accepting new baselines --- tests/baselines/reference/classdecl.js | 4 +- .../reference/commentsClassMembers.js | 4 +- .../reference/commentsInheritance.js | 12 +- .../baselines/reference/declFileAccessors.js | 4 +- .../reference/declFilePrivateStatic.js | 4 +- .../declarationEmit_protectedMembers.js | 4 +- tests/baselines/reference/giant.js | 24 ++-- .../isDeclarationVisibleNodeKinds.js | 2 +- tests/baselines/reference/moduledecl.js | 4 +- .../reference/readonlyInDeclarationFile.js | 119 ++++++++++++++++-- .../readonlyInDeclarationFile.symbols | 112 +++++++++++++---- .../reference/readonlyInDeclarationFile.types | 99 +++++++++++++-- .../reference/symbolDeclarationEmit13.js | 2 +- .../reference/symbolDeclarationEmit14.js | 4 +- .../reference/typeGuardOfFormThisMember.js | 2 +- .../typeGuardOfFormThisMemberErrors.js | 2 +- 16 files changed, 320 insertions(+), 82 deletions(-) diff --git a/tests/baselines/reference/classdecl.js b/tests/baselines/reference/classdecl.js index 710c5166d30..a8a440fa17d 100644 --- a/tests/baselines/reference/classdecl.js +++ b/tests/baselines/reference/classdecl.js @@ -211,12 +211,12 @@ declare class a { pgF(): void; pv: any; d: number; - static p2: { + static readonly p2: { x: number; y: number; }; private static d2(); - private static p3; + private static readonly p3; private pv3; private foo(n); private foo(s); diff --git a/tests/baselines/reference/commentsClassMembers.js b/tests/baselines/reference/commentsClassMembers.js index fe2dc0a63d0..dacbde7a276 100644 --- a/tests/baselines/reference/commentsClassMembers.js +++ b/tests/baselines/reference/commentsClassMembers.js @@ -568,8 +568,8 @@ declare var i1_c: typeof c1; declare class cProperties { private val; /** getter only property*/ - p1: number; - nc_p1: number; + readonly p1: number; + readonly nc_p1: number; /**setter only property*/ p2: number; nc_p2: number; diff --git a/tests/baselines/reference/commentsInheritance.js b/tests/baselines/reference/commentsInheritance.js index b9d84b2475a..42df3cca389 100644 --- a/tests/baselines/reference/commentsInheritance.js +++ b/tests/baselines/reference/commentsInheritance.js @@ -316,19 +316,19 @@ declare class c2 { /** c2 c2_f1*/ c2_f1(): void; /** c2 c2_prop*/ - c2_prop: number; + readonly c2_prop: number; c2_nc_p1: number; c2_nc_f1(): void; - c2_nc_prop: number; + readonly c2_nc_prop: number; /** c2 p1*/ p1: number; /** c2 f1*/ f1(): void; /** c2 prop*/ - prop: number; + readonly prop: number; nc_p1: number; nc_f1(): void; - nc_prop: number; + readonly nc_prop: number; /** c2 constructor*/ constructor(a: number); } @@ -339,10 +339,10 @@ declare class c3 extends c2 { /** c3 f1*/ f1(): void; /** c3 prop*/ - prop: number; + readonly prop: number; nc_p1: number; nc_f1(): void; - nc_prop: number; + readonly nc_prop: number; } declare var c2_i: c2; declare var c3_i: c3; diff --git a/tests/baselines/reference/declFileAccessors.js b/tests/baselines/reference/declFileAccessors.js index e3616c79e38..2bd51bfbfb2 100644 --- a/tests/baselines/reference/declFileAccessors.js +++ b/tests/baselines/reference/declFileAccessors.js @@ -284,7 +284,7 @@ export declare class c1 { nc_p3: number; private nc_pp3; static nc_s3: string; - onlyGetter: number; + readonly onlyGetter: number; onlySetter: number; } //// [declFileAccessors_1.d.ts] @@ -302,6 +302,6 @@ declare class c2 { nc_p3: number; private nc_pp3; static nc_s3: string; - onlyGetter: number; + readonly onlyGetter: number; onlySetter: number; } diff --git a/tests/baselines/reference/declFilePrivateStatic.js b/tests/baselines/reference/declFilePrivateStatic.js index dd81d94b3c5..30cd85444cf 100644 --- a/tests/baselines/reference/declFilePrivateStatic.js +++ b/tests/baselines/reference/declFilePrivateStatic.js @@ -52,8 +52,8 @@ declare class C { static y: number; private static a(); static b(): void; - private static c; - static d: number; + private static readonly c; + static readonly d: number; private static e; static f: any; } diff --git a/tests/baselines/reference/declarationEmit_protectedMembers.js b/tests/baselines/reference/declarationEmit_protectedMembers.js index 5aad004939d..192f0647ed6 100644 --- a/tests/baselines/reference/declarationEmit_protectedMembers.js +++ b/tests/baselines/reference/declarationEmit_protectedMembers.js @@ -135,7 +135,7 @@ declare class C1 { protected static sx: number; protected static sf(): number; protected static staticSetter: number; - protected static staticGetter: number; + protected static readonly staticGetter: number; } declare class C2 extends C1 { protected f(): number; @@ -146,7 +146,7 @@ declare class C3 extends C2 { static sx: number; f(): number; static sf(): number; - static staticGetter: number; + static readonly staticGetter: number; } declare class C4 { protected a: number; diff --git a/tests/baselines/reference/giant.js b/tests/baselines/reference/giant.js index 2a04541ef28..149a975d413 100644 --- a/tests/baselines/reference/giant.js +++ b/tests/baselines/reference/giant.js @@ -1120,11 +1120,11 @@ export declare class eC { pF(): void; private rF(); pgF(): void; - pgF: any; + readonly pgF: any; psF(param: any): void; psF: any; private rgF(); - private rgF; + private readonly rgF; private rsF(param); private rsF; static tV: any; @@ -1132,7 +1132,7 @@ export declare class eC { static tsF(param: any): void; static tsF: any; static tgF(): void; - static tgF: any; + static readonly tgF: any; } export interface eI { (): any; @@ -1172,11 +1172,11 @@ export declare module eM { pF(): void; private rF(); pgF(): void; - pgF: any; + readonly pgF: any; psF(param: any): void; psF: any; private rgF(); - private rgF; + private readonly rgF; private rsF(param); private rsF; static tV: any; @@ -1184,7 +1184,7 @@ export declare module eM { static tsF(param: any): void; static tsF: any; static tgF(): void; - static tgF: any; + static readonly tgF: any; } interface eI { (): any; @@ -1239,11 +1239,11 @@ export declare module eM { pF(): void; private rF(); pgF(): void; - pgF: any; + readonly pgF: any; psF(param: any): void; psF: any; private rgF(); - private rgF; + private readonly rgF; private rsF(param); private rsF; static tV: any; @@ -1251,7 +1251,7 @@ export declare module eM { static tsF(param: any): void; static tsF: any; static tgF(): void; - static tgF: any; + static readonly tgF: any; } module eaM { var V: any; @@ -1281,11 +1281,11 @@ export declare class eaC { pF(): void; private rF(); pgF(): void; - pgF: any; + readonly pgF: any; psF(param: any): void; psF: any; private rgF(); - private rgF; + private readonly rgF; private rsF(param); private rsF; static tV: any; @@ -1293,7 +1293,7 @@ export declare class eaC { static tsF(param: any): void; static tsF: any; static tgF(): void; - static tgF: any; + static readonly tgF: any; } export declare module eaM { var V: any; diff --git a/tests/baselines/reference/isDeclarationVisibleNodeKinds.js b/tests/baselines/reference/isDeclarationVisibleNodeKinds.js index 99e1ac72acd..e24032eb858 100644 --- a/tests/baselines/reference/isDeclarationVisibleNodeKinds.js +++ b/tests/baselines/reference/isDeclarationVisibleNodeKinds.js @@ -193,7 +193,7 @@ declare module schema { } declare module schema { class T { - createValidator9: (data: T) => T; + readonly createValidator9: (data: T) => T; createValidator10: (data: T) => T; } } diff --git a/tests/baselines/reference/moduledecl.js b/tests/baselines/reference/moduledecl.js index 2e765e512d8..f4efbadbf3e 100644 --- a/tests/baselines/reference/moduledecl.js +++ b/tests/baselines/reference/moduledecl.js @@ -459,10 +459,10 @@ declare module exportTests { class C3_public { private getC2_private(); private setC2_private(arg); - private c2; + private readonly c2; getC1_public(): C1_public; setC1_public(arg: C1_public): void; - c1: C1_public; + readonly c1: C1_public; } } declare module mAmbient { diff --git a/tests/baselines/reference/readonlyInDeclarationFile.js b/tests/baselines/reference/readonlyInDeclarationFile.js index d2a20280e0f..71e48272ecc 100644 --- a/tests/baselines/reference/readonlyInDeclarationFile.js +++ b/tests/baselines/reference/readonlyInDeclarationFile.js @@ -6,11 +6,31 @@ interface Foo { } class C { - protected readonly y: number; readonly [x: string]: Object; - private static readonly a = "foo"; - protected static readonly b = "foo"; - public static readonly c = "foo"; + private readonly a1: number; + protected readonly a2: number; + public readonly a3: number; + private get b1() { return 1 } + protected get b2() { return 1 } + public get b3() { return 1 } + private get c1() { return 1 } + private set c1(value) { } + protected get c2() { return 1 } + protected set c2(value) { } + public get c3() { return 1 } + public set c3(value) { } + private static readonly s1: number; + protected static readonly s2: number; + public static readonly s3: number; + private static get t1() { return 1 } + protected static get t2() { return 1 } + public static get t3() { return 1 } + private static get u1() { return 1 } + private static set u1(value) { } + protected static get u2() { return 1 } + protected static set u2(value) { } + public static get u3() { return 1 } + public static set u3(value) { } } var z: { @@ -38,9 +58,72 @@ function g() { var C = (function () { function C() { } - C.a = "foo"; - C.b = "foo"; - C.c = "foo"; + Object.defineProperty(C.prototype, "b1", { + get: function () { return 1; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(C.prototype, "b2", { + get: function () { return 1; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(C.prototype, "b3", { + get: function () { return 1; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(C.prototype, "c1", { + get: function () { return 1; }, + set: function (value) { }, + enumerable: true, + configurable: true + }); + Object.defineProperty(C.prototype, "c2", { + get: function () { return 1; }, + set: function (value) { }, + enumerable: true, + configurable: true + }); + Object.defineProperty(C.prototype, "c3", { + get: function () { return 1; }, + set: function (value) { }, + enumerable: true, + configurable: true + }); + Object.defineProperty(C, "t1", { + get: function () { return 1; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(C, "t2", { + get: function () { return 1; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(C, "t3", { + get: function () { return 1; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(C, "u1", { + get: function () { return 1; }, + set: function (value) { }, + enumerable: true, + configurable: true + }); + Object.defineProperty(C, "u2", { + get: function () { return 1; }, + set: function (value) { }, + enumerable: true, + configurable: true + }); + Object.defineProperty(C, "u3", { + get: function () { return 1; }, + set: function (value) { }, + enumerable: true, + configurable: true + }); return C; }()); var z; @@ -63,11 +146,25 @@ interface Foo { readonly [x: string]: Object; } declare class C { - protected readonly y: number; readonly [x: string]: Object; - private static readonly a; - protected static readonly b: string; - static readonly c: string; + private readonly a1; + protected readonly a2: number; + readonly a3: number; + private readonly b1; + protected readonly b2: number; + readonly b3: number; + private c1; + protected c2: number; + c3: number; + private static readonly s1; + protected static readonly s2: number; + static readonly s3: number; + private static readonly t1; + protected static readonly t2: number; + static readonly t3: number; + private static u1; + protected static u2: number; + static u3: number; } declare var z: { readonly a: string; diff --git a/tests/baselines/reference/readonlyInDeclarationFile.symbols b/tests/baselines/reference/readonlyInDeclarationFile.symbols index f7bbf19a0ae..af979e4dacd 100644 --- a/tests/baselines/reference/readonlyInDeclarationFile.symbols +++ b/tests/baselines/reference/readonlyInDeclarationFile.symbols @@ -14,63 +14,129 @@ interface Foo { class C { >C : Symbol(C, Decl(readonlyInDeclarationFile.ts, 4, 1)) - protected readonly y: number; ->y : Symbol(y, Decl(readonlyInDeclarationFile.ts, 6, 9)) - readonly [x: string]: Object; ->x : Symbol(x, Decl(readonlyInDeclarationFile.ts, 8, 14)) +>x : Symbol(x, Decl(readonlyInDeclarationFile.ts, 7, 14)) >Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) - private static readonly a = "foo"; ->a : Symbol(C.a, Decl(readonlyInDeclarationFile.ts, 8, 33)) + private readonly a1: number; +>a1 : Symbol(a1, Decl(readonlyInDeclarationFile.ts, 7, 33)) - protected static readonly b = "foo"; ->b : Symbol(C.b, Decl(readonlyInDeclarationFile.ts, 9, 38)) + protected readonly a2: number; +>a2 : Symbol(a2, Decl(readonlyInDeclarationFile.ts, 8, 32)) - public static readonly c = "foo"; ->c : Symbol(C.c, Decl(readonlyInDeclarationFile.ts, 10, 40)) + public readonly a3: number; +>a3 : Symbol(a3, Decl(readonlyInDeclarationFile.ts, 9, 34)) + + private get b1() { return 1 } +>b1 : Symbol(b1, Decl(readonlyInDeclarationFile.ts, 10, 31)) + + protected get b2() { return 1 } +>b2 : Symbol(b2, Decl(readonlyInDeclarationFile.ts, 11, 33)) + + public get b3() { return 1 } +>b3 : Symbol(b3, Decl(readonlyInDeclarationFile.ts, 12, 35)) + + private get c1() { return 1 } +>c1 : Symbol(c1, Decl(readonlyInDeclarationFile.ts, 13, 32), Decl(readonlyInDeclarationFile.ts, 14, 33)) + + private set c1(value) { } +>c1 : Symbol(c1, Decl(readonlyInDeclarationFile.ts, 13, 32), Decl(readonlyInDeclarationFile.ts, 14, 33)) +>value : Symbol(value, Decl(readonlyInDeclarationFile.ts, 15, 19)) + + protected get c2() { return 1 } +>c2 : Symbol(c2, Decl(readonlyInDeclarationFile.ts, 15, 29), Decl(readonlyInDeclarationFile.ts, 16, 35)) + + protected set c2(value) { } +>c2 : Symbol(c2, Decl(readonlyInDeclarationFile.ts, 15, 29), Decl(readonlyInDeclarationFile.ts, 16, 35)) +>value : Symbol(value, Decl(readonlyInDeclarationFile.ts, 17, 21)) + + public get c3() { return 1 } +>c3 : Symbol(c3, Decl(readonlyInDeclarationFile.ts, 17, 31), Decl(readonlyInDeclarationFile.ts, 18, 32)) + + public set c3(value) { } +>c3 : Symbol(c3, Decl(readonlyInDeclarationFile.ts, 17, 31), Decl(readonlyInDeclarationFile.ts, 18, 32)) +>value : Symbol(value, Decl(readonlyInDeclarationFile.ts, 19, 18)) + + private static readonly s1: number; +>s1 : Symbol(C.s1, Decl(readonlyInDeclarationFile.ts, 19, 28)) + + protected static readonly s2: number; +>s2 : Symbol(C.s2, Decl(readonlyInDeclarationFile.ts, 20, 39)) + + public static readonly s3: number; +>s3 : Symbol(C.s3, Decl(readonlyInDeclarationFile.ts, 21, 41)) + + private static get t1() { return 1 } +>t1 : Symbol(C.t1, Decl(readonlyInDeclarationFile.ts, 22, 38)) + + protected static get t2() { return 1 } +>t2 : Symbol(C.t2, Decl(readonlyInDeclarationFile.ts, 23, 40)) + + public static get t3() { return 1 } +>t3 : Symbol(C.t3, Decl(readonlyInDeclarationFile.ts, 24, 42)) + + private static get u1() { return 1 } +>u1 : Symbol(C.u1, Decl(readonlyInDeclarationFile.ts, 25, 39), Decl(readonlyInDeclarationFile.ts, 26, 40)) + + private static set u1(value) { } +>u1 : Symbol(C.u1, Decl(readonlyInDeclarationFile.ts, 25, 39), Decl(readonlyInDeclarationFile.ts, 26, 40)) +>value : Symbol(value, Decl(readonlyInDeclarationFile.ts, 27, 26)) + + protected static get u2() { return 1 } +>u2 : Symbol(C.u2, Decl(readonlyInDeclarationFile.ts, 27, 36), Decl(readonlyInDeclarationFile.ts, 28, 42)) + + protected static set u2(value) { } +>u2 : Symbol(C.u2, Decl(readonlyInDeclarationFile.ts, 27, 36), Decl(readonlyInDeclarationFile.ts, 28, 42)) +>value : Symbol(value, Decl(readonlyInDeclarationFile.ts, 29, 28)) + + public static get u3() { return 1 } +>u3 : Symbol(C.u3, Decl(readonlyInDeclarationFile.ts, 29, 38), Decl(readonlyInDeclarationFile.ts, 30, 39)) + + public static set u3(value) { } +>u3 : Symbol(C.u3, Decl(readonlyInDeclarationFile.ts, 29, 38), Decl(readonlyInDeclarationFile.ts, 30, 39)) +>value : Symbol(value, Decl(readonlyInDeclarationFile.ts, 31, 25)) } var z: { ->z : Symbol(z, Decl(readonlyInDeclarationFile.ts, 14, 3)) +>z : Symbol(z, Decl(readonlyInDeclarationFile.ts, 34, 3)) readonly a: string; ->a : Symbol(a, Decl(readonlyInDeclarationFile.ts, 14, 8)) +>a : Symbol(a, Decl(readonlyInDeclarationFile.ts, 34, 8)) readonly [x: string]: Object; ->x : Symbol(x, Decl(readonlyInDeclarationFile.ts, 16, 14)) +>x : Symbol(x, Decl(readonlyInDeclarationFile.ts, 36, 14)) >Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } function f() { ->f : Symbol(f, Decl(readonlyInDeclarationFile.ts, 17, 1)) +>f : Symbol(f, Decl(readonlyInDeclarationFile.ts, 37, 1)) return { get x() { return 1; }, ->x : Symbol(x, Decl(readonlyInDeclarationFile.ts, 20, 12)) +>x : Symbol(x, Decl(readonlyInDeclarationFile.ts, 40, 12)) get y() { return 1; }, ->y : Symbol(y, Decl(readonlyInDeclarationFile.ts, 21, 30), Decl(readonlyInDeclarationFile.ts, 22, 30)) +>y : Symbol(y, Decl(readonlyInDeclarationFile.ts, 41, 30), Decl(readonlyInDeclarationFile.ts, 42, 30)) set y(value) { } ->y : Symbol(y, Decl(readonlyInDeclarationFile.ts, 21, 30), Decl(readonlyInDeclarationFile.ts, 22, 30)) ->value : Symbol(value, Decl(readonlyInDeclarationFile.ts, 23, 14)) +>y : Symbol(y, Decl(readonlyInDeclarationFile.ts, 41, 30), Decl(readonlyInDeclarationFile.ts, 42, 30)) +>value : Symbol(value, Decl(readonlyInDeclarationFile.ts, 43, 14)) } } function g() { ->g : Symbol(g, Decl(readonlyInDeclarationFile.ts, 25, 1)) +>g : Symbol(g, Decl(readonlyInDeclarationFile.ts, 45, 1)) var x: { ->x : Symbol(x, Decl(readonlyInDeclarationFile.ts, 28, 7)) +>x : Symbol(x, Decl(readonlyInDeclarationFile.ts, 48, 7)) readonly a: string; ->a : Symbol(a, Decl(readonlyInDeclarationFile.ts, 28, 12)) +>a : Symbol(a, Decl(readonlyInDeclarationFile.ts, 48, 12)) readonly [x: string]: Object; ->x : Symbol(x, Decl(readonlyInDeclarationFile.ts, 30, 18)) +>x : Symbol(x, Decl(readonlyInDeclarationFile.ts, 50, 18)) >Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } return x; ->x : Symbol(x, Decl(readonlyInDeclarationFile.ts, 28, 7)) +>x : Symbol(x, Decl(readonlyInDeclarationFile.ts, 48, 7)) } diff --git a/tests/baselines/reference/readonlyInDeclarationFile.types b/tests/baselines/reference/readonlyInDeclarationFile.types index 9b2f9d51d99..7a3e11577c8 100644 --- a/tests/baselines/reference/readonlyInDeclarationFile.types +++ b/tests/baselines/reference/readonlyInDeclarationFile.types @@ -14,24 +14,99 @@ interface Foo { class C { >C : C - protected readonly y: number; ->y : number - readonly [x: string]: Object; >x : string >Object : Object - private static readonly a = "foo"; ->a : string ->"foo" : string + private readonly a1: number; +>a1 : number - protected static readonly b = "foo"; ->b : string ->"foo" : string + protected readonly a2: number; +>a2 : number - public static readonly c = "foo"; ->c : string ->"foo" : string + public readonly a3: number; +>a3 : number + + private get b1() { return 1 } +>b1 : number +>1 : number + + protected get b2() { return 1 } +>b2 : number +>1 : number + + public get b3() { return 1 } +>b3 : number +>1 : number + + private get c1() { return 1 } +>c1 : number +>1 : number + + private set c1(value) { } +>c1 : number +>value : number + + protected get c2() { return 1 } +>c2 : number +>1 : number + + protected set c2(value) { } +>c2 : number +>value : number + + public get c3() { return 1 } +>c3 : number +>1 : number + + public set c3(value) { } +>c3 : number +>value : number + + private static readonly s1: number; +>s1 : number + + protected static readonly s2: number; +>s2 : number + + public static readonly s3: number; +>s3 : number + + private static get t1() { return 1 } +>t1 : number +>1 : number + + protected static get t2() { return 1 } +>t2 : number +>1 : number + + public static get t3() { return 1 } +>t3 : number +>1 : number + + private static get u1() { return 1 } +>u1 : number +>1 : number + + private static set u1(value) { } +>u1 : number +>value : number + + protected static get u2() { return 1 } +>u2 : number +>1 : number + + protected static set u2(value) { } +>u2 : number +>value : number + + public static get u3() { return 1 } +>u3 : number +>1 : number + + public static set u3(value) { } +>u3 : number +>value : number } var z: { diff --git a/tests/baselines/reference/symbolDeclarationEmit13.js b/tests/baselines/reference/symbolDeclarationEmit13.js index 8111672866a..bbd2c15cfcd 100644 --- a/tests/baselines/reference/symbolDeclarationEmit13.js +++ b/tests/baselines/reference/symbolDeclarationEmit13.js @@ -13,6 +13,6 @@ class C { //// [symbolDeclarationEmit13.d.ts] declare class C { - [Symbol.toPrimitive]: string; + readonly [Symbol.toPrimitive]: string; [Symbol.toStringTag]: any; } diff --git a/tests/baselines/reference/symbolDeclarationEmit14.js b/tests/baselines/reference/symbolDeclarationEmit14.js index b8a6b3e4092..d4ae3eeb43c 100644 --- a/tests/baselines/reference/symbolDeclarationEmit14.js +++ b/tests/baselines/reference/symbolDeclarationEmit14.js @@ -13,6 +13,6 @@ class C { //// [symbolDeclarationEmit14.d.ts] declare class C { - [Symbol.toPrimitive]: string; - [Symbol.toStringTag]: string; + readonly [Symbol.toPrimitive]: string; + readonly [Symbol.toStringTag]: string; } diff --git a/tests/baselines/reference/typeGuardOfFormThisMember.js b/tests/baselines/reference/typeGuardOfFormThisMember.js index 2f983d2cdf8..9d71613ed8f 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMember.js +++ b/tests/baselines/reference/typeGuardOfFormThisMember.js @@ -170,7 +170,7 @@ declare namespace Test { path: string; isFSO: this is FileSystemObject; isFile: this is File; - isDirectory: this is Directory; + readonly isDirectory: this is Directory; isNetworked: this is (Networked & this); constructor(path: string); } diff --git a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js index 6f681ab09cf..5991fdd3169 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js +++ b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js @@ -95,7 +95,7 @@ declare namespace Test { path: string; isFSO: this is FileSystemObject; isFile: this is File; - isDirectory: this is Directory; + readonly isDirectory: this is Directory; isNetworked: this is (Networked & this); constructor(path: string); } From 3661b66be41a9724ba08d01a2b02aec548f1f7e9 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Thu, 28 Jan 2016 14:18:23 -0800 Subject: [PATCH 113/160] add extra argument to 'isRequireCall' to check if argument is string literal --- src/compiler/binder.ts | 2 +- src/compiler/checker.ts | 2 +- src/compiler/program.ts | 2 +- src/compiler/utilities.ts | 5 +++-- tests/baselines/reference/dynamicRequire.js | 10 ++++++++++ tests/baselines/reference/dynamicRequire.symbols | 10 ++++++++++ tests/baselines/reference/dynamicRequire.types | 14 ++++++++++++++ tests/cases/compiler/dynamicRequire.ts | 8 ++++++++ 8 files changed, 48 insertions(+), 5 deletions(-) create mode 100644 tests/baselines/reference/dynamicRequire.js create mode 100644 tests/baselines/reference/dynamicRequire.symbols create mode 100644 tests/baselines/reference/dynamicRequire.types create mode 100644 tests/cases/compiler/dynamicRequire.ts diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 88a1a62ce4c..cc81f92fbfc 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -1462,7 +1462,7 @@ namespace ts { function bindCallExpression(node: CallExpression) { // We're only inspecting call expressions to detect CommonJS modules, so we can skip // this check if we've already seen the module indicator - if (!file.commonJsModuleIndicator && isRequireCall(node)) { + if (!file.commonJsModuleIndicator && isRequireCall(node, /*checkArgumentIsStringLiteral*/false)) { setCommonJsModuleIndicator(node); } } diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 784d3ef67e8..91f3561d829 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -10239,7 +10239,7 @@ namespace ts { } // In JavaScript files, calls to any identifier 'require' are treated as external module imports - if (isInJavaScriptFile(node) && isRequireCall(node)) { + if (isInJavaScriptFile(node) && isRequireCall(node, /*checkArgumentIsStringLiteral*/true)) { return resolveExternalModuleTypeByLiteral(node.arguments[0]); } diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 4187177fa48..803ae47b0fd 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -1328,7 +1328,7 @@ namespace ts { } function collectRequireCalls(node: Node): void { - if (isRequireCall(node)) { + if (isRequireCall(node, /*checkArgumentIsStringLiteral*/true)) { (imports || (imports = [])).push((node).arguments[0]); } else { diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 33ad24d7f56..67dd9844ca7 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -1086,12 +1086,13 @@ namespace ts { * exactly one argument. * This function does not test if the node is in a JavaScript file or not. */ - export function isRequireCall(expression: Node): expression is CallExpression { + export function isRequireCall(expression: Node, checkArgumentIsStringLiteral: boolean): expression is CallExpression { // of the form 'require("name")' - return expression.kind === SyntaxKind.CallExpression && + const isRequire = expression.kind === SyntaxKind.CallExpression && (expression).expression.kind === SyntaxKind.Identifier && ((expression).expression).text === "require" && (expression).arguments.length === 1; + return isRequire && (!checkArgumentIsStringLiteral || (expression).arguments[0].kind === SyntaxKind.StringLiteral); } /// Given a BinaryExpression, returns SpecialPropertyAssignmentKind for the various kinds of property diff --git a/tests/baselines/reference/dynamicRequire.js b/tests/baselines/reference/dynamicRequire.js new file mode 100644 index 00000000000..28b35970601 --- /dev/null +++ b/tests/baselines/reference/dynamicRequire.js @@ -0,0 +1,10 @@ +//// [a.js] + +function foo(name) { + var s = require("t/" + name) +} + +//// [a_out.js] +function foo(name) { + var s = require("t/" + name); +} diff --git a/tests/baselines/reference/dynamicRequire.symbols b/tests/baselines/reference/dynamicRequire.symbols new file mode 100644 index 00000000000..c307d578de7 --- /dev/null +++ b/tests/baselines/reference/dynamicRequire.symbols @@ -0,0 +1,10 @@ +=== tests/cases/compiler/a.js === + +function foo(name) { +>foo : Symbol(foo, Decl(a.js, 0, 0)) +>name : Symbol(name, Decl(a.js, 1, 13)) + + var s = require("t/" + name) +>s : Symbol(s, Decl(a.js, 2, 7)) +>name : Symbol(name, Decl(a.js, 1, 13)) +} diff --git a/tests/baselines/reference/dynamicRequire.types b/tests/baselines/reference/dynamicRequire.types new file mode 100644 index 00000000000..43eea88a05b --- /dev/null +++ b/tests/baselines/reference/dynamicRequire.types @@ -0,0 +1,14 @@ +=== tests/cases/compiler/a.js === + +function foo(name) { +>foo : (name: any) => void +>name : any + + var s = require("t/" + name) +>s : any +>require("t/" + name) : any +>require : any +>"t/" + name : string +>"t/" : string +>name : any +} diff --git a/tests/cases/compiler/dynamicRequire.ts b/tests/cases/compiler/dynamicRequire.ts new file mode 100644 index 00000000000..8d72a37dceb --- /dev/null +++ b/tests/cases/compiler/dynamicRequire.ts @@ -0,0 +1,8 @@ +// @allowJs: true +// @module: amd +// @out: a_out.js + +// @filename: a.js +function foo(name) { + var s = require("t/" + name) +} \ No newline at end of file From b3eaef17e9fb9675e36dad37445b41cc67d25c1e Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Thu, 28 Jan 2016 14:21:04 -0800 Subject: [PATCH 114/160] fix linter issues --- src/compiler/utilities.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 67dd9844ca7..bab66eb0688 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -1089,10 +1089,11 @@ namespace ts { export function isRequireCall(expression: Node, checkArgumentIsStringLiteral: boolean): expression is CallExpression { // of the form 'require("name")' const isRequire = expression.kind === SyntaxKind.CallExpression && - (expression).expression.kind === SyntaxKind.Identifier && - ((expression).expression).text === "require" && - (expression).arguments.length === 1; - return isRequire && (!checkArgumentIsStringLiteral || (expression).arguments[0].kind === SyntaxKind.StringLiteral); + (expression).expression.kind === SyntaxKind.Identifier && + ((expression).expression).text === "require" && + (expression).arguments.length === 1; + + return isRequire && (!checkArgumentIsStringLiteral || (expression).arguments[0].kind === SyntaxKind.StringLiteral); } /// Given a BinaryExpression, returns SpecialPropertyAssignmentKind for the various kinds of property From 124bd517e71353d8c22c0ee63f2e830c0b18004c Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Thu, 28 Jan 2016 15:18:50 -0800 Subject: [PATCH 115/160] Don't show the currently-completing thing at the cursor in JS files Fixes #6693 --- src/services/services.ts | 23 +++++++++++-------- .../fourslash/getJavaScriptCompletions20.ts | 21 +++++++++++++++++ 2 files changed, 34 insertions(+), 10 deletions(-) create mode 100644 tests/cases/fourslash/getJavaScriptCompletions20.ts diff --git a/src/services/services.ts b/src/services/services.ts index cb57d415c66..ecc0e442dd3 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -62,7 +62,7 @@ namespace ts { export interface SourceFile { /* @internal */ version: string; /* @internal */ scriptSnapshot: IScriptSnapshot; - /* @internal */ nameTable: Map; + /* @internal */ nameTable: Map; /* @internal */ getNamedDeclarations(): Map; @@ -808,7 +808,7 @@ namespace ts { public languageVersion: ScriptTarget; public languageVariant: LanguageVariant; public identifiers: Map; - public nameTable: Map; + public nameTable: Map; public resolvedModules: Map; public imports: LiteralExpression[]; public moduleAugmentations: LiteralExpression[]; @@ -1954,8 +1954,6 @@ namespace ts { const text = scriptSnapshot.getText(0, scriptSnapshot.getLength()); const sourceFile = createSourceFile(fileName, text, scriptTarget, setNodeParents); setSourceFileFields(sourceFile, scriptSnapshot, version); - // after full parsing we can use table with interned strings as name table - sourceFile.nameTable = sourceFile.identifiers; return sourceFile; } @@ -3834,7 +3832,7 @@ namespace ts { if (isRightOfDot && isSourceFileJavaScript(sourceFile)) { const uniqueNames = getCompletionEntriesFromSymbols(symbols, entries); - addRange(entries, getJavaScriptCompletionEntries(sourceFile, uniqueNames)); + addRange(entries, getJavaScriptCompletionEntries(sourceFile, location.pos, uniqueNames)); } else { if (!symbols || symbols.length === 0) { @@ -3867,12 +3865,17 @@ namespace ts { return { isMemberCompletion, isNewIdentifierLocation, entries }; - function getJavaScriptCompletionEntries(sourceFile: SourceFile, uniqueNames: Map): CompletionEntry[] { + function getJavaScriptCompletionEntries(sourceFile: SourceFile, position: number, uniqueNames: Map): CompletionEntry[] { const entries: CompletionEntry[] = []; const target = program.getCompilerOptions().target; const nameTable = getNameTable(sourceFile); for (const name in nameTable) { + // Skip identifiers produced only from the current location + if (nameTable[name] === position) { + continue; + } + if (!uniqueNames[name]) { uniqueNames[name] = name; const displayName = getCompletionEntryDisplayName(name, target, /*performCharacterChecks*/ true); @@ -7513,7 +7516,7 @@ namespace ts { } /* @internal */ - export function getNameTable(sourceFile: SourceFile): Map { + export function getNameTable(sourceFile: SourceFile): Map { if (!sourceFile.nameTable) { initializeNameTable(sourceFile); } @@ -7522,7 +7525,7 @@ namespace ts { } function initializeNameTable(sourceFile: SourceFile): void { - const nameTable: Map = {}; + const nameTable: Map = {}; walk(sourceFile); sourceFile.nameTable = nameTable; @@ -7530,7 +7533,7 @@ namespace ts { function walk(node: Node) { switch (node.kind) { case SyntaxKind.Identifier: - nameTable[(node).text] = (node).text; + nameTable[(node).text] = nameTable[(node).text] === undefined ? node.pos : -1; break; case SyntaxKind.StringLiteral: case SyntaxKind.NumericLiteral: @@ -7542,7 +7545,7 @@ namespace ts { node.parent.kind === SyntaxKind.ExternalModuleReference || isArgumentOfElementAccessExpression(node)) { - nameTable[(node).text] = (node).text; + nameTable[(node).text] = nameTable[(node).text] === undefined ? node.pos : -1; } break; default: diff --git a/tests/cases/fourslash/getJavaScriptCompletions20.ts b/tests/cases/fourslash/getJavaScriptCompletions20.ts new file mode 100644 index 00000000000..d254705bb91 --- /dev/null +++ b/tests/cases/fourslash/getJavaScriptCompletions20.ts @@ -0,0 +1,21 @@ +/// + +// @allowNonTsExtensions: true +// @Filename: file.js +//// /** +//// * A person +//// * @constructor +//// * @param {string} name - The name of the person. +//// * @param {number} age - The age of the person. +//// */ +//// function Person(name, age) { +//// this.name = name; +//// this.age = age; +//// } +//// +//// +//// Person.getName = 10; +//// Person.getNa/**/ = 10; + +goTo.marker(); +verify.not.memberListContains('getNa'); From 39077f686636494454d9f85b36aae07eb5736c27 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Thu, 28 Jan 2016 15:25:42 -0800 Subject: [PATCH 116/160] PR feedback --- src/compiler/emitter.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index a3dcf7d630e..0a3cbd89d9e 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -1544,7 +1544,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge // must instead be rewritten to point to a temporary variable to avoid issues with the double-bind // behavior of class names in ES6. const declaration = resolver.getReferencedValueDeclaration(node); - if (declaration && declaration.kind === SyntaxKind.ClassDeclaration) { + if (declaration) { const classAlias = decoratedClassAliases[getNodeId(declaration)]; if (classAlias !== undefined) { write(classAlias); @@ -5195,13 +5195,6 @@ const _super = (function (geti, seti) { // // TypeScript | Javascript // --------------------------------|------------------------------------ - // @dec | let default_1 = class { - // export default class { | static x() { return default_1.y; } - // static x() { return C.y; } | } - // static y = 1; | default_1.y = 1; - // } | default_1 = __decorate([dec], default_1); - // | export default default_1; - // --------------------------------|------------------------------------ // @dec | let C_1; // export default class C { | let C = C_1 = class C { // static x() { return C.y; } | static x() { return C_1.y; } From 5a845bf0fca604a9928ec8762266231ec62fafda Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Thu, 28 Jan 2016 15:48:18 -0800 Subject: [PATCH 117/160] Don't crash when return type jsdoc tag is malformed Fixes #6662 --- src/compiler/checker.ts | 2 +- .../fourslash/getJavaScriptQuickInfo7.ts | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 tests/cases/fourslash/getJavaScriptQuickInfo7.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 784d3ef67e8..43b91551a29 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -10344,7 +10344,7 @@ namespace ts { function getReturnTypeFromJSDocComment(func: SignatureDeclaration | FunctionDeclaration): Type { const returnTag = getJSDocReturnTag(func); - if (returnTag) { + if (returnTag && returnTag.typeExpression) { return getTypeFromTypeNode(returnTag.typeExpression.type); } } diff --git a/tests/cases/fourslash/getJavaScriptQuickInfo7.ts b/tests/cases/fourslash/getJavaScriptQuickInfo7.ts new file mode 100644 index 00000000000..9faf97e7951 --- /dev/null +++ b/tests/cases/fourslash/getJavaScriptQuickInfo7.ts @@ -0,0 +1,19 @@ +/// + +// @allowNonTsExtensions: true +// @Filename: file.js +//// /** +//// * This is a very cool function that is very nice. +//// * @returns something +//// */ +//// function a1() { +//// try { +//// throw new Error('x'); +//// } catch (x) { x--; } +//// return 23; +//// } +//// +//// x - /**/a1() + +goTo.marker(); +verify.quickInfoExists(); \ No newline at end of file From 1231c9e145ef65cf51d5f582abfb71929892c48a Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Thu, 28 Jan 2016 16:05:03 -0800 Subject: [PATCH 118/160] Fix case when position === 0 --- src/services/services.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/services.ts b/src/services/services.ts index ecc0e442dd3..b44a774f721 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -5490,7 +5490,7 @@ namespace ts { const nameTable = getNameTable(sourceFile); - if (lookUp(nameTable, internedName)) { + if (lookUp(nameTable, internedName) !== undefined) { result = result || []; getReferencesInNode(sourceFile, symbol, declaredName, node, searchMeaning, findInStrings, findInComments, result, symbolToIndex); } From 1f503f1b27fb52ee5dacd75bd9379908ce6ee68e Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Thu, 28 Jan 2016 16:07:06 -0800 Subject: [PATCH 119/160] Add explicit `return undefined;` --- src/compiler/checker.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 43b91551a29..389fed35916 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -10347,6 +10347,8 @@ namespace ts { if (returnTag && returnTag.typeExpression) { return getTypeFromTypeNode(returnTag.typeExpression.type); } + + return undefined; } function createPromiseType(promisedType: Type): Type { From 238fcbcee9502c869e722b9d585dc516de1f601b Mon Sep 17 00:00:00 2001 From: Noj Vek Date: Thu, 28 Jan 2016 23:29:08 -0800 Subject: [PATCH 120/160] single iteration through children array without any array allocation --- src/compiler/emitter.ts | 63 ++++++++++++++++--- tests/baselines/reference/tsxReactEmit1.js | 9 ++- tests/baselines/reference/tsxReactEmit3.js | 17 +++-- .../reference/tsxReactEmitNesting.js | 32 +++++----- .../reference/tsxReactEmitWhitespace.js | 9 ++- .../reference/tsxReactEmitWhitespace2.js | 23 +++---- 6 files changed, 94 insertions(+), 59 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 86378036d65..acf41b0a510 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -1257,21 +1257,66 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge // Children if (children) { - // build list of valid emittable jsx children - const emittableChildren = children.filter(isJsxChildEmittable); - if (emittableChildren.length > 0) { - // If the only child is non-jsx element, don't put it on a new line - if (emittableChildren.length == 1 && emittableChildren[0].kind !== SyntaxKind.JsxElement && emittableChildren[0].kind !== SyntaxKind.JsxSelfClosingElement) { - write(", "); - emit(emittableChildren[0]); + let firstChild:JsxChild; + let multipleEmittableChildren = false; + + for (let i = 0, n = children.length; i < n; ++i) { + let jsxChild = children[i]; + + if (isJsxChildEmittable(jsxChild)) { + // we need to decide whether to emit in single line or multiple lines as indented list + // store firstChild reference, if we see another emittable child, then emit accordingly + if (!firstChild) { + write(", "); + firstChild = jsxChild; + } + else { + // more than one emittable child, emit indented list + if(!multipleEmittableChildren){ + multipleEmittableChildren = true; + increaseIndent(); + writeLine(); + emit(firstChild); + } + + write(", "); + writeLine(); + emit(jsxChild); + } + } + } + + if (multipleEmittableChildren) { + decreaseIndent(); + } + else if (firstChild) { + if (firstChild.kind !== SyntaxKind.JsxElement && firstChild.kind !== SyntaxKind.JsxSelfClosingElement) { + emit(firstChild); } - // Otherwise build a indented comma separated list else { + // If the only child is jsx element, put it on a new indented line increaseIndent(); - emitList(emittableChildren, 0, emittableChildren.length, /*multiLine*/ true, /*trailingComma*/ false, /*leadingComma*/ true); + writeLine(); + emit(firstChild); + writeLine(); decreaseIndent(); } } + + // const emittableChildren = children.filter(isJsxChildEmittable); + // if (emittableChildren.length > 0) { + // // If the only child is non-jsx element, don't put it on a new line + // if (emittableChildren.length == 1 && emittableChildren[0].kind !== SyntaxKind.JsxElement && emittableChildren[0].kind !== SyntaxKind.JsxSelfClosingElement) { + // write(", "); + // emit(emittableChildren[0]); + // } + // // Otherwise build a indented comma separated list + // else { + // increaseIndent(); + // emitList(emittableChildren, 0, emittableChildren.length, /*multiLine*/ true, /*trailingComma*/ false, /*leadingComma*/ true); + // decreaseIndent(); + // } + // } } // Closing paren diff --git a/tests/baselines/reference/tsxReactEmit1.js b/tests/baselines/reference/tsxReactEmit1.js index a6eac7f4824..f62a7bdc47d 100644 --- a/tests/baselines/reference/tsxReactEmit1.js +++ b/tests/baselines/reference/tsxReactEmit1.js @@ -70,9 +70,8 @@ var SomeClass = (function () { return SomeClass; }()); var whitespace1 = React.createElement("div", null, " "); -var whitespace2 = React.createElement("div", null, - " ", - p, - " " -); +var whitespace2 = React.createElement("div", null, + " ", + p, + " "); var whitespace3 = React.createElement("div", null, p); diff --git a/tests/baselines/reference/tsxReactEmit3.js b/tests/baselines/reference/tsxReactEmit3.js index 2163a310fc8..07a8f22761f 100644 --- a/tests/baselines/reference/tsxReactEmit3.js +++ b/tests/baselines/reference/tsxReactEmit3.js @@ -8,12 +8,11 @@ declare var Foo, Bar, baz; q s ; //// [test.js] -React.createElement(Foo, null, - " ", - React.createElement(Bar, null, " q "), - " ", - React.createElement(Bar, null), - " s ", - React.createElement(Bar, null), - React.createElement(Bar, null) -); +React.createElement(Foo, null, + " ", + React.createElement(Bar, null, " q "), + " ", + React.createElement(Bar, null), + " s ", + React.createElement(Bar, null), + React.createElement(Bar, null)); diff --git a/tests/baselines/reference/tsxReactEmitNesting.js b/tests/baselines/reference/tsxReactEmitNesting.js index 3f12715b98c..53abc04aa9b 100644 --- a/tests/baselines/reference/tsxReactEmitNesting.js +++ b/tests/baselines/reference/tsxReactEmitNesting.js @@ -38,27 +38,23 @@ let render = (ctrl, model) => //// [file.js] // A simple render function with nesting and control statements var render = function (ctrl, model) { - return vdom.createElement("section", {class: "todoapp"}, - vdom.createElement("header", {class: "header"}, - vdom.createElement("h1", null, "todos "), - vdom.createElement("input", {class: "new-todo", autofocus: true, autocomplete: "off", placeholder: "What needs to be done?", value: model.newTodo, onKeyup: ctrl.addTodo.bind(ctrl, model)}) - ), - vdom.createElement("section", {class: "main", style: { display: (model.todos && model.todos.length) ? "block" : "none" }}, - vdom.createElement("input", {class: "toggle-all", type: "checkbox", onChange: ctrl.toggleAll.bind(ctrl)}), + return vdom.createElement("section", {class: "todoapp"}, + vdom.createElement("header", {class: "header"}, + vdom.createElement("h1", null, "todos "), + vdom.createElement("input", {class: "new-todo", autofocus: true, autocomplete: "off", placeholder: "What needs to be done?", value: model.newTodo, onKeyup: ctrl.addTodo.bind(ctrl, model)})), + vdom.createElement("section", {class: "main", style: { display: (model.todos && model.todos.length) ? "block" : "none" }}, + vdom.createElement("input", {class: "toggle-all", type: "checkbox", onChange: ctrl.toggleAll.bind(ctrl)}), vdom.createElement("ul", {class: "todo-list"}, model.filteredTodos.map(function (todo) { - return vdom.createElement("li", {class: { todo: true, completed: todo.completed, editing: todo == model.editedTodo }}, - vdom.createElement("div", {class: "view"}, + return vdom.createElement("li", {class: { todo: true, completed: todo.completed, editing: todo == model.editedTodo }}, + vdom.createElement("div", {class: "view"}, (!todo.editable) ? vdom.createElement("input", {class: "toggle", type: "checkbox"}) - : null, - vdom.createElement("label", {onDoubleClick: function () { ctrl.editTodo(todo); }}, todo.title), - vdom.createElement("button", {class: "destroy", onClick: ctrl.removeTodo.bind(ctrl, todo)}), - vdom.createElement("div", {class: "iconBorder"}, + : null, + vdom.createElement("label", {onDoubleClick: function () { ctrl.editTodo(todo); }}, todo.title), + vdom.createElement("button", {class: "destroy", onClick: ctrl.removeTodo.bind(ctrl, todo)}), + vdom.createElement("div", {class: "iconBorder"}, vdom.createElement("div", {class: "icon"}) - ) - ) + )) ); - })) - ) - ); + })))); }; diff --git a/tests/baselines/reference/tsxReactEmitWhitespace.js b/tests/baselines/reference/tsxReactEmitWhitespace.js index 5db92bb33a4..9a157d242e3 100644 --- a/tests/baselines/reference/tsxReactEmitWhitespace.js +++ b/tests/baselines/reference/tsxReactEmitWhitespace.js @@ -59,11 +59,10 @@ var p = 0; // Emit " " React.createElement("div", null, " "); // Emit " ", p, " " -React.createElement("div", null, - " ", - p, - " " -); +React.createElement("div", null, + " ", + p, + " "); // Emit only p React.createElement("div", null, p); // Emit only p diff --git a/tests/baselines/reference/tsxReactEmitWhitespace2.js b/tests/baselines/reference/tsxReactEmitWhitespace2.js index 61e7805fb3d..152d869fc03 100644 --- a/tests/baselines/reference/tsxReactEmitWhitespace2.js +++ b/tests/baselines/reference/tsxReactEmitWhitespace2.js @@ -18,18 +18,15 @@ declare var React: any; //// [file.js] // Emit ' word' in the last string -React.createElement("div", null, - "word ", - React.createElement("code", null, "code"), - " word" -); +React.createElement("div", null, + "word ", + React.createElement("code", null, "code"), + " word"); // Same here -React.createElement("div", null, - React.createElement("code", null, "code"), - " word" -); +React.createElement("div", null, + React.createElement("code", null, "code"), + " word"); // And here -React.createElement("div", null, - React.createElement("code", null), - " word" -); +React.createElement("div", null, + React.createElement("code", null), + " word"); From fcd96cb3d8cbb843e5c7c0fcaee8ba283672154d Mon Sep 17 00:00:00 2001 From: Noj Vek Date: Thu, 28 Jan 2016 23:33:14 -0800 Subject: [PATCH 121/160] fix tslint --- src/compiler/emitter.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index acf41b0a510..ad0f1c8bcd8 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -1257,11 +1257,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge // Children if (children) { - let firstChild:JsxChild; + let firstChild: JsxChild; let multipleEmittableChildren = false; - for (let i = 0, n = children.length; i < n; ++i) { - let jsxChild = children[i]; + for (let i = 0, n = children.length; i < n; i++) { + const jsxChild = children[i]; if (isJsxChildEmittable(jsxChild)) { // we need to decide whether to emit in single line or multiple lines as indented list @@ -1272,7 +1272,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge } else { // more than one emittable child, emit indented list - if(!multipleEmittableChildren){ + if (!multipleEmittableChildren) { multipleEmittableChildren = true; increaseIndent(); writeLine(); From 94fe3e0fb27f2b9480e98620c13ef90197ae0e8f Mon Sep 17 00:00:00 2001 From: guybedford Date: Thu, 28 Jan 2016 12:56:38 +0200 Subject: [PATCH 122/160] set __moduleName from context.id argument --- src/compiler/emitter.ts | 9 ++- .../reference/aliasesInSystemModule1.js | 3 +- .../reference/aliasesInSystemModule2.js | 3 +- .../allowSyntheticDefaultImports2.js | 6 +- .../allowSyntheticDefaultImports3.js | 6 +- .../allowSyntheticDefaultImports5.js | 3 +- .../allowSyntheticDefaultImports6.js | 3 +- .../anonymousDefaultExportsSystem.js | 6 +- .../reference/capturedLetConstInLoop4.js | 3 +- ...ecoratedDefaultExportsGetExportedSystem.js | 6 +- .../reference/deduplicateImportsInSystem.js | 3 +- .../defaultExportsGetExportedSystem.js | 6 +- tests/baselines/reference/es5-system.js | 3 +- .../exportNonInitializedVariablesSystem.js | 3 +- .../reference/exportStarForValues10.js | 9 ++- .../reference/exportStarForValues6.js | 6 +- .../reference/exportStarForValuesInSystem.js | 6 +- .../isolatedModulesPlainFile-System.js | 3 +- .../reference/modulePrologueSystem.js | 3 +- .../outFilerootDirModuleNamesSystem.js | 6 +- .../reference/outModuleConcatSystem.js | 6 +- .../reference/outModuleConcatSystem.js.map | 2 +- .../outModuleConcatSystem.sourcemap.txt | 70 ++++++++++--------- ...prefixUnaryOperatorsOnExportedVariables.js | 3 +- .../reference/systemExportAssignment.js | 3 +- .../reference/systemExportAssignment2.js | 6 +- .../reference/systemExportAssignment3.js | 3 +- tests/baselines/reference/systemModule1.js | 3 +- tests/baselines/reference/systemModule10.js | 3 +- .../baselines/reference/systemModule10_ES5.js | 3 +- tests/baselines/reference/systemModule11.js | 15 ++-- tests/baselines/reference/systemModule12.js | 3 +- tests/baselines/reference/systemModule13.js | 3 +- tests/baselines/reference/systemModule14.js | 3 +- tests/baselines/reference/systemModule15.js | 12 ++-- tests/baselines/reference/systemModule16.js | 3 +- tests/baselines/reference/systemModule17.js | 6 +- tests/baselines/reference/systemModule2.js | 3 +- tests/baselines/reference/systemModule3.js | 12 ++-- tests/baselines/reference/systemModule4.js | 3 +- tests/baselines/reference/systemModule5.js | 3 +- tests/baselines/reference/systemModule6.js | 3 +- tests/baselines/reference/systemModule7.js | 3 +- tests/baselines/reference/systemModule8.js | 3 +- tests/baselines/reference/systemModule9.js | 3 +- .../systemModuleAmbientDeclarations.js | 18 +++-- .../reference/systemModuleConstEnums.js | 3 +- ...stemModuleConstEnumsSeparateCompilation.js | 3 +- .../systemModuleDeclarationMerging.js | 3 +- .../reference/systemModuleExportDefault.js | 12 ++-- .../systemModuleNonTopLevelModuleMembers.js | 3 +- .../reference/systemModuleWithSuperClass.js | 6 +- tests/cases/unittests/transpile.ts | 8 ++- 53 files changed, 213 insertions(+), 119 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 4d771bd2538..d01843eddb4 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -477,6 +477,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge // => // var x;... exporter("x", x = 1) let exportFunctionForFile: string; + let contextObjectForFile: string; let generatedNameSet: Map; let nodeToGeneratedName: string[]; @@ -557,6 +558,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge currentText = undefined; currentLineMap = undefined; exportFunctionForFile = undefined; + contextObjectForFile = undefined; generatedNameSet = undefined; nodeToGeneratedName = undefined; computedPropertyNamesToGeneratedNames = undefined; @@ -585,6 +587,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge currentText = sourceFile.text; currentLineMap = getLineStarts(sourceFile); exportFunctionForFile = undefined; + contextObjectForFile = undefined; isEs6Module = sourceFile.symbol && sourceFile.symbol.exports && !!sourceFile.symbol.exports["___esModule"]; renamedDependencies = sourceFile.renamedDependencies; currentFileIdentifiers = sourceFile.identifiers; @@ -7058,6 +7061,7 @@ const _super = (function (geti, seti) { Debug.assert(!exportFunctionForFile); // make sure that name of 'exports' function does not conflict with existing identifiers exportFunctionForFile = makeUniqueName("exports"); + contextObjectForFile = makeUniqueName("context"); writeLine(); write("System.register("); writeModuleName(node, emitRelativePathAsModuleName); @@ -7093,10 +7097,13 @@ const _super = (function (geti, seti) { write(text); } - write(`], function(${exportFunctionForFile}) {`); + write(`], function(${exportFunctionForFile}, ${contextObjectForFile}) {`); writeLine(); increaseIndent(); const startIndex = emitDirectivePrologues(node.statements, /*startWithNewLine*/ true, /*ensureUseStrict*/ true); + writeLine(); + write(`var __moduleName = ${contextObjectForFile} && ${contextObjectForFile}.id;`); + writeLine(); emitEmitHelpers(node); emitCaptureThisForNodeIfNecessary(node); emitSystemModuleBody(node, dependencyGroups, startIndex); diff --git a/tests/baselines/reference/aliasesInSystemModule1.js b/tests/baselines/reference/aliasesInSystemModule1.js index 43037c7634c..46d2b061dd3 100644 --- a/tests/baselines/reference/aliasesInSystemModule1.js +++ b/tests/baselines/reference/aliasesInSystemModule1.js @@ -17,8 +17,9 @@ module M { //// [aliasesInSystemModule1.js] -System.register(['foo'], function(exports_1) { +System.register(['foo'], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var alias; var cls, cls2, x, y, z, M; return { diff --git a/tests/baselines/reference/aliasesInSystemModule2.js b/tests/baselines/reference/aliasesInSystemModule2.js index 7effb2721be..e30ba4fea56 100644 --- a/tests/baselines/reference/aliasesInSystemModule2.js +++ b/tests/baselines/reference/aliasesInSystemModule2.js @@ -16,8 +16,9 @@ module M { } //// [aliasesInSystemModule2.js] -System.register(["foo"], function(exports_1) { +System.register(["foo"], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var foo_1; var cls, cls2, x, y, z, M; return { diff --git a/tests/baselines/reference/allowSyntheticDefaultImports2.js b/tests/baselines/reference/allowSyntheticDefaultImports2.js index fcc029415cf..87e47f9c9a1 100644 --- a/tests/baselines/reference/allowSyntheticDefaultImports2.js +++ b/tests/baselines/reference/allowSyntheticDefaultImports2.js @@ -10,8 +10,9 @@ export class Foo { } //// [b.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var Foo; return { setters:[], @@ -26,8 +27,9 @@ System.register([], function(exports_1) { } }); //// [a.js] -System.register(["./b"], function(exports_1) { +System.register(["./b"], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var b_1; var x; return { diff --git a/tests/baselines/reference/allowSyntheticDefaultImports3.js b/tests/baselines/reference/allowSyntheticDefaultImports3.js index b14d25dbd61..348ce42a60a 100644 --- a/tests/baselines/reference/allowSyntheticDefaultImports3.js +++ b/tests/baselines/reference/allowSyntheticDefaultImports3.js @@ -11,8 +11,9 @@ export class Foo { //// [b.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var Foo; return { setters:[], @@ -27,8 +28,9 @@ System.register([], function(exports_1) { } }); //// [a.js] -System.register(["./b"], function(exports_1) { +System.register(["./b"], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var b_1; var x; return { diff --git a/tests/baselines/reference/allowSyntheticDefaultImports5.js b/tests/baselines/reference/allowSyntheticDefaultImports5.js index c9121512b61..f59226e152d 100644 --- a/tests/baselines/reference/allowSyntheticDefaultImports5.js +++ b/tests/baselines/reference/allowSyntheticDefaultImports5.js @@ -12,8 +12,9 @@ export var x = new Foo(); //// [a.js] -System.register(["./b"], function(exports_1) { +System.register(["./b"], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var b_1; var x; return { diff --git a/tests/baselines/reference/allowSyntheticDefaultImports6.js b/tests/baselines/reference/allowSyntheticDefaultImports6.js index 64d52e70af9..d2f25e538c5 100644 --- a/tests/baselines/reference/allowSyntheticDefaultImports6.js +++ b/tests/baselines/reference/allowSyntheticDefaultImports6.js @@ -12,8 +12,9 @@ export var x = new Foo(); //// [a.js] -System.register(["./b"], function(exports_1) { +System.register(["./b"], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var b_1; var x; return { diff --git a/tests/baselines/reference/anonymousDefaultExportsSystem.js b/tests/baselines/reference/anonymousDefaultExportsSystem.js index 74913a57a99..f9ff71dec06 100644 --- a/tests/baselines/reference/anonymousDefaultExportsSystem.js +++ b/tests/baselines/reference/anonymousDefaultExportsSystem.js @@ -7,8 +7,9 @@ export default class {} export default function() {} //// [a.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var default_1; return { setters:[], @@ -20,8 +21,9 @@ System.register([], function(exports_1) { } }); //// [b.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; function default_1() { } exports_1("default", default_1); return { diff --git a/tests/baselines/reference/capturedLetConstInLoop4.js b/tests/baselines/reference/capturedLetConstInLoop4.js index 160be3ccaef..04f514b01e8 100644 --- a/tests/baselines/reference/capturedLetConstInLoop4.js +++ b/tests/baselines/reference/capturedLetConstInLoop4.js @@ -144,8 +144,9 @@ for (const y = 0; y < 1;) { //// [capturedLetConstInLoop4.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var v0, v00, v1, v2, v3, v4, v5, v6, v7, v8, v0_c, v00_c, v1_c, v2_c, v3_c, v4_c, v5_c, v6_c, v7_c, v8_c; //======let function exportedFoo() { diff --git a/tests/baselines/reference/decoratedDefaultExportsGetExportedSystem.js b/tests/baselines/reference/decoratedDefaultExportsGetExportedSystem.js index ed322374799..ca4bb52a32b 100644 --- a/tests/baselines/reference/decoratedDefaultExportsGetExportedSystem.js +++ b/tests/baselines/reference/decoratedDefaultExportsGetExportedSystem.js @@ -13,8 +13,9 @@ var decorator: ClassDecorator; export default class {} //// [a.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); @@ -35,8 +36,9 @@ System.register([], function(exports_1) { } }); //// [b.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/deduplicateImportsInSystem.js b/tests/baselines/reference/deduplicateImportsInSystem.js index 956d293cad1..accc4954e65 100644 --- a/tests/baselines/reference/deduplicateImportsInSystem.js +++ b/tests/baselines/reference/deduplicateImportsInSystem.js @@ -9,8 +9,9 @@ import {F} from 'f1'; console.log(A + B + C + D + E + F) //// [deduplicateImportsInSystem.js] -System.register(["f1", "f2", "f3"], function(exports_1) { +System.register(["f1", "f2", "f3"], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var f1_1, f2_1, f3_1, f2_2, f2_3, f1_2; return { setters:[ diff --git a/tests/baselines/reference/defaultExportsGetExportedSystem.js b/tests/baselines/reference/defaultExportsGetExportedSystem.js index 67dc47f4bd5..eac3d3c7c43 100644 --- a/tests/baselines/reference/defaultExportsGetExportedSystem.js +++ b/tests/baselines/reference/defaultExportsGetExportedSystem.js @@ -8,8 +8,9 @@ export default function foo() {} //// [a.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var Foo; return { setters:[], @@ -21,8 +22,9 @@ System.register([], function(exports_1) { } }); //// [b.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; function foo() { } exports_1("default", foo); return { diff --git a/tests/baselines/reference/es5-system.js b/tests/baselines/reference/es5-system.js index a9633352b8b..9cf5ea87f1f 100644 --- a/tests/baselines/reference/es5-system.js +++ b/tests/baselines/reference/es5-system.js @@ -15,8 +15,9 @@ export default class A //// [es5-system.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var A; return { setters:[], diff --git a/tests/baselines/reference/exportNonInitializedVariablesSystem.js b/tests/baselines/reference/exportNonInitializedVariablesSystem.js index b5674bf5ce3..2a8e2022c95 100644 --- a/tests/baselines/reference/exportNonInitializedVariablesSystem.js +++ b/tests/baselines/reference/exportNonInitializedVariablesSystem.js @@ -35,8 +35,9 @@ export let h1: D = new D; //// [exportNonInitializedVariablesSystem.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var a, b, c, d, A, e, f, B, C, a1, b1, c1, d1, D, e1, f1, g1, h1; return { setters:[], diff --git a/tests/baselines/reference/exportStarForValues10.js b/tests/baselines/reference/exportStarForValues10.js index dca5dad9b7a..d37ca3304f3 100644 --- a/tests/baselines/reference/exportStarForValues10.js +++ b/tests/baselines/reference/exportStarForValues10.js @@ -13,8 +13,9 @@ export * from "file1"; var x = 1; //// [file0.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var v; return { setters:[], @@ -24,8 +25,9 @@ System.register([], function(exports_1) { } }); //// [file1.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; return { setters:[], execute: function() { @@ -33,8 +35,9 @@ System.register([], function(exports_1) { } }); //// [file2.js] -System.register(["file0"], function(exports_1) { +System.register(["file0"], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var x; function exportStar_1(m) { var exports = {}; diff --git a/tests/baselines/reference/exportStarForValues6.js b/tests/baselines/reference/exportStarForValues6.js index 69357d87ee0..8c31f6b4d16 100644 --- a/tests/baselines/reference/exportStarForValues6.js +++ b/tests/baselines/reference/exportStarForValues6.js @@ -9,8 +9,9 @@ export * from "file1" export var x = 1; //// [file1.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; return { setters:[], execute: function() { @@ -18,8 +19,9 @@ System.register([], function(exports_1) { } }); //// [file2.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var x; return { setters:[], diff --git a/tests/baselines/reference/exportStarForValuesInSystem.js b/tests/baselines/reference/exportStarForValuesInSystem.js index a33465f7e2e..49c6877377a 100644 --- a/tests/baselines/reference/exportStarForValuesInSystem.js +++ b/tests/baselines/reference/exportStarForValuesInSystem.js @@ -9,8 +9,9 @@ export * from "file1" var x = 1; //// [file1.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; return { setters:[], execute: function() { @@ -18,8 +19,9 @@ System.register([], function(exports_1) { } }); //// [file2.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var x; return { setters:[], diff --git a/tests/baselines/reference/isolatedModulesPlainFile-System.js b/tests/baselines/reference/isolatedModulesPlainFile-System.js index b66bd497810..39320759740 100644 --- a/tests/baselines/reference/isolatedModulesPlainFile-System.js +++ b/tests/baselines/reference/isolatedModulesPlainFile-System.js @@ -5,8 +5,9 @@ run(1); //// [isolatedModulesPlainFile-System.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; return { setters:[], execute: function() { diff --git a/tests/baselines/reference/modulePrologueSystem.js b/tests/baselines/reference/modulePrologueSystem.js index 80a46fb27fc..13f7d35b001 100644 --- a/tests/baselines/reference/modulePrologueSystem.js +++ b/tests/baselines/reference/modulePrologueSystem.js @@ -4,8 +4,9 @@ export class Foo {} //// [modulePrologueSystem.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var Foo; return { setters:[], diff --git a/tests/baselines/reference/outFilerootDirModuleNamesSystem.js b/tests/baselines/reference/outFilerootDirModuleNamesSystem.js index 298ad52689f..eb1ef2a4a54 100644 --- a/tests/baselines/reference/outFilerootDirModuleNamesSystem.js +++ b/tests/baselines/reference/outFilerootDirModuleNamesSystem.js @@ -11,8 +11,9 @@ export default function foo() { new Foo(); } //// [output.js] -System.register("b", ["a"], function(exports_1) { +System.register("b", ["a"], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var a_1; function foo() { new a_1.default(); } exports_1("default", foo); @@ -25,8 +26,9 @@ System.register("b", ["a"], function(exports_1) { } } }); -System.register("a", ["b"], function(exports_2) { +System.register("a", ["b"], function(exports_2, context_2) { "use strict"; + var __moduleName = context_2 && context_2.id; var b_1; var Foo; return { diff --git a/tests/baselines/reference/outModuleConcatSystem.js b/tests/baselines/reference/outModuleConcatSystem.js index d4552d33167..59bbb363022 100644 --- a/tests/baselines/reference/outModuleConcatSystem.js +++ b/tests/baselines/reference/outModuleConcatSystem.js @@ -14,8 +14,9 @@ var __extends = (this && this.__extends) || function (d, b) { function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; -System.register("ref/a", [], function(exports_1) { +System.register("ref/a", [], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var A; return { setters:[], @@ -29,8 +30,9 @@ System.register("ref/a", [], function(exports_1) { } } }); -System.register("b", ["ref/a"], function(exports_2) { +System.register("b", ["ref/a"], function(exports_2, context_2) { "use strict"; + var __moduleName = context_2 && context_2.id; var a_1; var B; return { diff --git a/tests/baselines/reference/outModuleConcatSystem.js.map b/tests/baselines/reference/outModuleConcatSystem.js.map index 47d3ba2d39c..be6e66c3cf4 100644 --- a/tests/baselines/reference/outModuleConcatSystem.js.map +++ b/tests/baselines/reference/outModuleConcatSystem.js.map @@ -1,2 +1,2 @@ //// [all.js.map] -{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;;;;;;;YACA;gBAAA;gBAAiB,CAAC;gBAAD,QAAC;YAAD,CAAC,AAAlB,IAAkB;YAAlB,iBAAkB,CAAA;;;;;;;;;;;;;;YCAlB;gBAAuB,qBAAC;gBAAxB;oBAAuB,8BAAC;gBAAG,CAAC;gBAAD,QAAC;YAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;YAA5B,iBAA4B,CAAA"} \ No newline at end of file +{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;;;;;;;;YACA;gBAAA;gBAAiB,CAAC;gBAAD,QAAC;YAAD,CAAC,AAAlB,IAAkB;YAAlB,iBAAkB,CAAA;;;;;;;;;;;;;;;YCAlB;gBAAuB,qBAAC;gBAAxB;oBAAuB,8BAAC;gBAAG,CAAC;gBAAD,QAAC;YAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;YAA5B,iBAA4B,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt b/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt index e3f521c828c..0281bdec5bd 100644 --- a/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt +++ b/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt @@ -13,8 +13,9 @@ sourceFile:tests/cases/compiler/ref/a.ts >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>>}; ->>>System.register("ref/a", [], function(exports_1) { +>>>System.register("ref/a", [], function(exports_1, context_1) { >>> "use strict"; +>>> var __moduleName = context_1 && context_1.id; >>> var A; >>> return { >>> setters:[], @@ -24,13 +25,13 @@ sourceFile:tests/cases/compiler/ref/a.ts 2 > ^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(12, 13) Source(2, 1) + SourceIndex(0) +1 >Emitted(13, 13) Source(2, 1) + SourceIndex(0) --- >>> function A() { 1->^^^^^^^^^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(13, 17) Source(2, 1) + SourceIndex(0) +1->Emitted(14, 17) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^^^^^^^^^ @@ -38,16 +39,16 @@ sourceFile:tests/cases/compiler/ref/a.ts 3 > ^^^^^^^^^-> 1->export class A { 2 > } -1->Emitted(14, 17) Source(2, 18) + SourceIndex(0) -2 >Emitted(14, 18) Source(2, 19) + SourceIndex(0) +1->Emitted(15, 17) Source(2, 18) + SourceIndex(0) +2 >Emitted(15, 18) Source(2, 19) + SourceIndex(0) --- >>> return A; 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(15, 17) Source(2, 18) + SourceIndex(0) -2 >Emitted(15, 25) Source(2, 19) + SourceIndex(0) +1->Emitted(16, 17) Source(2, 18) + SourceIndex(0) +2 >Emitted(16, 25) Source(2, 19) + SourceIndex(0) --- >>> }()); 1 >^^^^^^^^^^^^ @@ -59,10 +60,10 @@ sourceFile:tests/cases/compiler/ref/a.ts 2 > } 3 > 4 > export class A { } -1 >Emitted(16, 13) Source(2, 18) + SourceIndex(0) -2 >Emitted(16, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(16, 14) Source(2, 1) + SourceIndex(0) -4 >Emitted(16, 18) Source(2, 19) + SourceIndex(0) +1 >Emitted(17, 13) Source(2, 18) + SourceIndex(0) +2 >Emitted(17, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(17, 14) Source(2, 1) + SourceIndex(0) +4 >Emitted(17, 18) Source(2, 19) + SourceIndex(0) --- >>> exports_1("A", A); 1->^^^^^^^^^^^^ @@ -71,9 +72,9 @@ sourceFile:tests/cases/compiler/ref/a.ts 1-> 2 > export class A { } 3 > -1->Emitted(17, 13) Source(2, 1) + SourceIndex(0) -2 >Emitted(17, 30) Source(2, 19) + SourceIndex(0) -3 >Emitted(17, 31) Source(2, 19) + SourceIndex(0) +1->Emitted(18, 13) Source(2, 1) + SourceIndex(0) +2 >Emitted(18, 30) Source(2, 19) + SourceIndex(0) +3 >Emitted(18, 31) Source(2, 19) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:all.js @@ -82,8 +83,9 @@ sourceFile:tests/cases/compiler/b.ts >>> } >>> } >>>}); ->>>System.register("b", ["ref/a"], function(exports_2) { +>>>System.register("b", ["ref/a"], function(exports_2, context_2) { >>> "use strict"; +>>> var __moduleName = context_2 && context_2.id; >>> var a_1; >>> var B; >>> return { @@ -97,29 +99,29 @@ sourceFile:tests/cases/compiler/b.ts 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >import {A} from "./ref/a"; > -1 >Emitted(31, 13) Source(2, 1) + SourceIndex(1) +1 >Emitted(33, 13) Source(2, 1) + SourceIndex(1) --- >>> __extends(B, _super); 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^ 1->export class B extends 2 > A -1->Emitted(32, 17) Source(2, 24) + SourceIndex(1) -2 >Emitted(32, 38) Source(2, 25) + SourceIndex(1) +1->Emitted(34, 17) Source(2, 24) + SourceIndex(1) +2 >Emitted(34, 38) Source(2, 25) + SourceIndex(1) --- >>> function B() { 1 >^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(33, 17) Source(2, 1) + SourceIndex(1) +1 >Emitted(35, 17) Source(2, 1) + SourceIndex(1) --- >>> _super.apply(this, arguments); 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1->export class B extends 2 > A -1->Emitted(34, 21) Source(2, 24) + SourceIndex(1) -2 >Emitted(34, 51) Source(2, 25) + SourceIndex(1) +1->Emitted(36, 21) Source(2, 24) + SourceIndex(1) +2 >Emitted(36, 51) Source(2, 25) + SourceIndex(1) --- >>> } 1 >^^^^^^^^^^^^^^^^ @@ -127,16 +129,16 @@ sourceFile:tests/cases/compiler/b.ts 3 > ^^^^^^^^^-> 1 > { 2 > } -1 >Emitted(35, 17) Source(2, 28) + SourceIndex(1) -2 >Emitted(35, 18) Source(2, 29) + SourceIndex(1) +1 >Emitted(37, 17) Source(2, 28) + SourceIndex(1) +2 >Emitted(37, 18) Source(2, 29) + SourceIndex(1) --- >>> return B; 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(36, 17) Source(2, 28) + SourceIndex(1) -2 >Emitted(36, 25) Source(2, 29) + SourceIndex(1) +1->Emitted(38, 17) Source(2, 28) + SourceIndex(1) +2 >Emitted(38, 25) Source(2, 29) + SourceIndex(1) --- >>> }(a_1.A)); 1 >^^^^^^^^^^^^ @@ -152,12 +154,12 @@ sourceFile:tests/cases/compiler/b.ts 4 > export class B extends 5 > A 6 > { } -1 >Emitted(37, 13) Source(2, 28) + SourceIndex(1) -2 >Emitted(37, 14) Source(2, 29) + SourceIndex(1) -3 >Emitted(37, 14) Source(2, 1) + SourceIndex(1) -4 >Emitted(37, 15) Source(2, 24) + SourceIndex(1) -5 >Emitted(37, 20) Source(2, 25) + SourceIndex(1) -6 >Emitted(37, 23) Source(2, 29) + SourceIndex(1) +1 >Emitted(39, 13) Source(2, 28) + SourceIndex(1) +2 >Emitted(39, 14) Source(2, 29) + SourceIndex(1) +3 >Emitted(39, 14) Source(2, 1) + SourceIndex(1) +4 >Emitted(39, 15) Source(2, 24) + SourceIndex(1) +5 >Emitted(39, 20) Source(2, 25) + SourceIndex(1) +6 >Emitted(39, 23) Source(2, 29) + SourceIndex(1) --- >>> exports_2("B", B); 1->^^^^^^^^^^^^ @@ -166,9 +168,9 @@ sourceFile:tests/cases/compiler/b.ts 1-> 2 > export class B extends A { } 3 > -1->Emitted(38, 13) Source(2, 1) + SourceIndex(1) -2 >Emitted(38, 30) Source(2, 29) + SourceIndex(1) -3 >Emitted(38, 31) Source(2, 29) + SourceIndex(1) +1->Emitted(40, 13) Source(2, 1) + SourceIndex(1) +2 >Emitted(40, 30) Source(2, 29) + SourceIndex(1) +3 >Emitted(40, 31) Source(2, 29) + SourceIndex(1) --- >>> } >>> } diff --git a/tests/baselines/reference/prefixUnaryOperatorsOnExportedVariables.js b/tests/baselines/reference/prefixUnaryOperatorsOnExportedVariables.js index 5d414c97d05..cf88f4e9ba6 100644 --- a/tests/baselines/reference/prefixUnaryOperatorsOnExportedVariables.js +++ b/tests/baselines/reference/prefixUnaryOperatorsOnExportedVariables.js @@ -31,8 +31,9 @@ if (++y) { } //// [prefixUnaryOperatorsOnExportedVariables.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var x, y; return { setters:[], diff --git a/tests/baselines/reference/systemExportAssignment.js b/tests/baselines/reference/systemExportAssignment.js index 72962cf835c..1e87af1ca22 100644 --- a/tests/baselines/reference/systemExportAssignment.js +++ b/tests/baselines/reference/systemExportAssignment.js @@ -10,8 +10,9 @@ import * as a from "a"; //// [b.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; return { setters:[], execute: function() { diff --git a/tests/baselines/reference/systemExportAssignment2.js b/tests/baselines/reference/systemExportAssignment2.js index 0f4dd712493..177f36f23d2 100644 --- a/tests/baselines/reference/systemExportAssignment2.js +++ b/tests/baselines/reference/systemExportAssignment2.js @@ -10,8 +10,9 @@ import * as a from "a"; //// [a.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var a; return { setters:[], @@ -21,8 +22,9 @@ System.register([], function(exports_1) { } }); //// [b.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; return { setters:[], execute: function() { diff --git a/tests/baselines/reference/systemExportAssignment3.js b/tests/baselines/reference/systemExportAssignment3.js index ca2492a54e1..78e330c6467 100644 --- a/tests/baselines/reference/systemExportAssignment3.js +++ b/tests/baselines/reference/systemExportAssignment3.js @@ -12,8 +12,9 @@ import * as a from "a"; //// [b.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; return { setters:[], execute: function() { diff --git a/tests/baselines/reference/systemModule1.js b/tests/baselines/reference/systemModule1.js index 52f3b482069..2b7e3e2c4dc 100644 --- a/tests/baselines/reference/systemModule1.js +++ b/tests/baselines/reference/systemModule1.js @@ -3,8 +3,9 @@ export var x = 1; //// [systemModule1.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var x; return { setters:[], diff --git a/tests/baselines/reference/systemModule10.js b/tests/baselines/reference/systemModule10.js index ac32c4948e7..0c171ab6cc1 100644 --- a/tests/baselines/reference/systemModule10.js +++ b/tests/baselines/reference/systemModule10.js @@ -10,8 +10,9 @@ export {n2} export {n2 as n3} //// [systemModule10.js] -System.register(['file1', 'file2'], function(exports_1) { +System.register(['file1', 'file2'], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var file1_1, n2; return { setters:[ diff --git a/tests/baselines/reference/systemModule10_ES5.js b/tests/baselines/reference/systemModule10_ES5.js index 0c98df6ba99..711ca3ed7a3 100644 --- a/tests/baselines/reference/systemModule10_ES5.js +++ b/tests/baselines/reference/systemModule10_ES5.js @@ -10,8 +10,9 @@ export {n2} export {n2 as n3} //// [systemModule10_ES5.js] -System.register(['file1', 'file2'], function(exports_1) { +System.register(['file1', 'file2'], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var file1_1, n2; return { setters:[ diff --git a/tests/baselines/reference/systemModule11.js b/tests/baselines/reference/systemModule11.js index 92b0576b919..f7d47db1d7f 100644 --- a/tests/baselines/reference/systemModule11.js +++ b/tests/baselines/reference/systemModule11.js @@ -42,8 +42,9 @@ export * from 'a'; //// [file1.js] // set of tests cases that checks generation of local storage for exported names -System.register(['bar'], function(exports_1) { +System.register(['bar'], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var x; function foo() { } exports_1("foo", foo); @@ -68,8 +69,9 @@ System.register(['bar'], function(exports_1) { } }); //// [file2.js] -System.register(['bar'], function(exports_1) { +System.register(['bar'], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var x, y; var exportedNames_1 = { 'x': true, @@ -94,8 +96,9 @@ System.register(['bar'], function(exports_1) { } }); //// [file3.js] -System.register(['a', 'bar'], function(exports_1) { +System.register(['a', 'bar'], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; function foo() { } exports_1("default", foo); var exportedNames_1 = { @@ -125,8 +128,9 @@ System.register(['a', 'bar'], function(exports_1) { } }); //// [file4.js] -System.register(['a'], function(exports_1) { +System.register(['a'], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var x, z, z1; function foo() { } exports_1("foo", foo); @@ -147,8 +151,9 @@ System.register(['a'], function(exports_1) { } }); //// [file5.js] -System.register(['a'], function(exports_1) { +System.register(['a'], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; function foo() { } function exportStar_1(m) { var exports = {}; diff --git a/tests/baselines/reference/systemModule12.js b/tests/baselines/reference/systemModule12.js index d8961c3b001..45e7beaf218 100644 --- a/tests/baselines/reference/systemModule12.js +++ b/tests/baselines/reference/systemModule12.js @@ -5,8 +5,9 @@ import n from 'file1' //// [systemModule12.js] -System.register("NamedModule", [], function(exports_1) { +System.register("NamedModule", [], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; return { setters:[], execute: function() { diff --git a/tests/baselines/reference/systemModule13.js b/tests/baselines/reference/systemModule13.js index 0b81a946de4..e3ed2daf3a6 100644 --- a/tests/baselines/reference/systemModule13.js +++ b/tests/baselines/reference/systemModule13.js @@ -5,8 +5,9 @@ export const {a: z0, b: {c: z1}} = {a: true, b: {c: "123"}}; for ([x] of [[1]]) {} //// [systemModule13.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var x, y, z, z0, z1; return { setters:[], diff --git a/tests/baselines/reference/systemModule14.js b/tests/baselines/reference/systemModule14.js index 2ec8fc600f4..5eaafd9ba6b 100644 --- a/tests/baselines/reference/systemModule14.js +++ b/tests/baselines/reference/systemModule14.js @@ -11,8 +11,9 @@ var x = 1; export {foo as b} //// [systemModule14.js] -System.register(["foo"], function(exports_1) { +System.register(["foo"], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var foo_1; var x; function foo() { diff --git a/tests/baselines/reference/systemModule15.js b/tests/baselines/reference/systemModule15.js index f8dc11b0ac7..f2fefb344ac 100644 --- a/tests/baselines/reference/systemModule15.js +++ b/tests/baselines/reference/systemModule15.js @@ -34,8 +34,9 @@ export default value; export var value2 = "v"; //// [file3.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var value; return { setters:[], @@ -46,8 +47,9 @@ System.register([], function(exports_1) { } }); //// [file4.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var value2; return { setters:[], @@ -57,8 +59,9 @@ System.register([], function(exports_1) { } }); //// [file2.js] -System.register(["./file3"], function(exports_1) { +System.register(["./file3"], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var moduleCStar, file3_1, file3_2; return { setters:[ @@ -75,8 +78,9 @@ System.register(["./file3"], function(exports_1) { } }); //// [file1.js] -System.register(["./file2"], function(exports_1) { +System.register(["./file2"], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var moduleB; return { setters:[ diff --git a/tests/baselines/reference/systemModule16.js b/tests/baselines/reference/systemModule16.js index 76fb85cd3ae..27fa77b9c76 100644 --- a/tests/baselines/reference/systemModule16.js +++ b/tests/baselines/reference/systemModule16.js @@ -13,8 +13,9 @@ x,y,a1,b1,d1; //// [systemModule16.js] -System.register(["foo", "bar"], function(exports_1) { +System.register(["foo", "bar"], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var x, y, foo_1; var exportedNames_1 = { 'x': true, diff --git a/tests/baselines/reference/systemModule17.js b/tests/baselines/reference/systemModule17.js index 6daa119d287..6bf1ce25b84 100644 --- a/tests/baselines/reference/systemModule17.js +++ b/tests/baselines/reference/systemModule17.js @@ -42,8 +42,9 @@ export {II}; export {II as II1}; //// [f1.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var A; return { setters:[], @@ -58,8 +59,9 @@ System.register([], function(exports_1) { } }); //// [f2.js] -System.register(["f1"], function(exports_1) { +System.register(["f1"], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var f1_1; var x, N, IX; return { diff --git a/tests/baselines/reference/systemModule2.js b/tests/baselines/reference/systemModule2.js index ee3dfd327ec..95755421eaa 100644 --- a/tests/baselines/reference/systemModule2.js +++ b/tests/baselines/reference/systemModule2.js @@ -4,8 +4,9 @@ var x = 1; export = x; //// [systemModule2.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var x; return { setters:[], diff --git a/tests/baselines/reference/systemModule3.js b/tests/baselines/reference/systemModule3.js index dbef74f3036..7800c8c220e 100644 --- a/tests/baselines/reference/systemModule3.js +++ b/tests/baselines/reference/systemModule3.js @@ -18,8 +18,9 @@ export default class C {} export default class {} //// [file1.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; function default_1() { } exports_1("default", default_1); return { @@ -29,8 +30,9 @@ System.register([], function(exports_1) { } }); //// [file2.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; function f() { } exports_1("default", f); return { @@ -40,8 +42,9 @@ System.register([], function(exports_1) { } }); //// [file3.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var C; return { setters:[], @@ -56,8 +59,9 @@ System.register([], function(exports_1) { } }); //// [file4.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var default_1; return { setters:[], diff --git a/tests/baselines/reference/systemModule4.js b/tests/baselines/reference/systemModule4.js index 192c87d49ea..67990c63a58 100644 --- a/tests/baselines/reference/systemModule4.js +++ b/tests/baselines/reference/systemModule4.js @@ -4,8 +4,9 @@ export var x = 1; export var y; //// [systemModule4.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var x, y; return { setters:[], diff --git a/tests/baselines/reference/systemModule5.js b/tests/baselines/reference/systemModule5.js index 4a455f25b13..d0b1f79b2f7 100644 --- a/tests/baselines/reference/systemModule5.js +++ b/tests/baselines/reference/systemModule5.js @@ -4,8 +4,9 @@ export function foo() {} //// [systemModule5.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; function foo() { } exports_1("foo", foo); return { diff --git a/tests/baselines/reference/systemModule6.js b/tests/baselines/reference/systemModule6.js index 51c8fbc68fb..4848c82f738 100644 --- a/tests/baselines/reference/systemModule6.js +++ b/tests/baselines/reference/systemModule6.js @@ -7,8 +7,9 @@ function foo() { //// [systemModule6.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var C; function foo() { new C(); diff --git a/tests/baselines/reference/systemModule7.js b/tests/baselines/reference/systemModule7.js index d76d86a3b0f..60114b54400 100644 --- a/tests/baselines/reference/systemModule7.js +++ b/tests/baselines/reference/systemModule7.js @@ -11,8 +11,9 @@ export module M { } //// [systemModule7.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var M; return { setters:[], diff --git a/tests/baselines/reference/systemModule8.js b/tests/baselines/reference/systemModule8.js index b6cdd677f00..f099628facb 100644 --- a/tests/baselines/reference/systemModule8.js +++ b/tests/baselines/reference/systemModule8.js @@ -31,8 +31,9 @@ export const {a: z0, b: {c: z1}} = {a: true, b: {c: "123"}}; for ([x] of [[1]]) {} //// [systemModule8.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var x, y, z0, z1; function foo() { exports_1("x", x = 100); diff --git a/tests/baselines/reference/systemModule9.js b/tests/baselines/reference/systemModule9.js index 137dd019a02..940b9e5975b 100644 --- a/tests/baselines/reference/systemModule9.js +++ b/tests/baselines/reference/systemModule9.js @@ -22,8 +22,9 @@ export {x}; export {y as z}; //// [systemModule9.js] -System.register(['file1', 'file2', 'file3', 'file4', 'file5', 'file6', 'file7'], function(exports_1) { +System.register(['file1', 'file2', 'file3', 'file4', 'file5', 'file6', 'file7'], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var ns, file2_1, file3_1, file5_1, ns3; var x, y; var exportedNames_1 = { diff --git a/tests/baselines/reference/systemModuleAmbientDeclarations.js b/tests/baselines/reference/systemModuleAmbientDeclarations.js index 9bdde23a842..91bad620b77 100644 --- a/tests/baselines/reference/systemModuleAmbientDeclarations.js +++ b/tests/baselines/reference/systemModuleAmbientDeclarations.js @@ -29,8 +29,9 @@ export declare module M { var v: number; } //// [file1.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var promise, foo, c, e; return { setters:[], @@ -44,8 +45,9 @@ System.register([], function(exports_1) { } }); //// [file2.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; return { setters:[], execute: function() { @@ -53,8 +55,9 @@ System.register([], function(exports_1) { } }); //// [file3.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; return { setters:[], execute: function() { @@ -62,8 +65,9 @@ System.register([], function(exports_1) { } }); //// [file4.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; return { setters:[], execute: function() { @@ -71,8 +75,9 @@ System.register([], function(exports_1) { } }); //// [file5.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; return { setters:[], execute: function() { @@ -80,8 +85,9 @@ System.register([], function(exports_1) { } }); //// [file6.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; return { setters:[], execute: function() { diff --git a/tests/baselines/reference/systemModuleConstEnums.js b/tests/baselines/reference/systemModuleConstEnums.js index 8b8707768d9..08df549a87b 100644 --- a/tests/baselines/reference/systemModuleConstEnums.js +++ b/tests/baselines/reference/systemModuleConstEnums.js @@ -13,8 +13,9 @@ module M { } //// [systemModuleConstEnums.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; function foo() { use(0 /* X */); use(0 /* X */); diff --git a/tests/baselines/reference/systemModuleConstEnumsSeparateCompilation.js b/tests/baselines/reference/systemModuleConstEnumsSeparateCompilation.js index 8466d399ac9..be2f07cc59e 100644 --- a/tests/baselines/reference/systemModuleConstEnumsSeparateCompilation.js +++ b/tests/baselines/reference/systemModuleConstEnumsSeparateCompilation.js @@ -13,8 +13,9 @@ module M { } //// [systemModuleConstEnumsSeparateCompilation.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var TopLevelConstEnum, M; function foo() { use(TopLevelConstEnum.X); diff --git a/tests/baselines/reference/systemModuleDeclarationMerging.js b/tests/baselines/reference/systemModuleDeclarationMerging.js index 5ed029a769a..1196aa8898d 100644 --- a/tests/baselines/reference/systemModuleDeclarationMerging.js +++ b/tests/baselines/reference/systemModuleDeclarationMerging.js @@ -10,8 +10,9 @@ export enum E {} export module E { var x; } //// [systemModuleDeclarationMerging.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var F, C, E; function F() { } exports_1("F", F); diff --git a/tests/baselines/reference/systemModuleExportDefault.js b/tests/baselines/reference/systemModuleExportDefault.js index cf1a99a4ad7..eaa4e6ddaa7 100644 --- a/tests/baselines/reference/systemModuleExportDefault.js +++ b/tests/baselines/reference/systemModuleExportDefault.js @@ -16,8 +16,9 @@ export default class C {} //// [file1.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; function default_1() { } exports_1("default", default_1); return { @@ -27,8 +28,9 @@ System.register([], function(exports_1) { } }); //// [file2.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; function foo() { } exports_1("default", foo); return { @@ -38,8 +40,9 @@ System.register([], function(exports_1) { } }); //// [file3.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var default_1; return { setters:[], @@ -54,8 +57,9 @@ System.register([], function(exports_1) { } }); //// [file4.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var C; return { setters:[], diff --git a/tests/baselines/reference/systemModuleNonTopLevelModuleMembers.js b/tests/baselines/reference/systemModuleNonTopLevelModuleMembers.js index ee9858a7fec..1cf993baec0 100644 --- a/tests/baselines/reference/systemModuleNonTopLevelModuleMembers.js +++ b/tests/baselines/reference/systemModuleNonTopLevelModuleMembers.js @@ -13,8 +13,9 @@ export module TopLevelModule2 { } //// [systemModuleNonTopLevelModuleMembers.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var TopLevelClass, TopLevelModule, TopLevelEnum, TopLevelModule2; function TopLevelFunction() { } exports_1("TopLevelFunction", TopLevelFunction); diff --git a/tests/baselines/reference/systemModuleWithSuperClass.js b/tests/baselines/reference/systemModuleWithSuperClass.js index fe9c2742f2d..0aab851cc57 100644 --- a/tests/baselines/reference/systemModuleWithSuperClass.js +++ b/tests/baselines/reference/systemModuleWithSuperClass.js @@ -13,8 +13,9 @@ export class Bar extends Foo { } //// [foo.js] -System.register([], function(exports_1) { +System.register([], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var Foo; return { setters:[], @@ -29,8 +30,9 @@ System.register([], function(exports_1) { } }); //// [bar.js] -System.register(['./foo'], function(exports_1) { +System.register(['./foo'], function(exports_1, context_1) { "use strict"; + var __moduleName = context_1 && context_1.id; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } diff --git a/tests/cases/unittests/transpile.ts b/tests/cases/unittests/transpile.ts index 513d37673bb..d9fdaeb32ec 100644 --- a/tests/cases/unittests/transpile.ts +++ b/tests/cases/unittests/transpile.ts @@ -134,7 +134,10 @@ var x = 0;`, it("Sets module name", () => { let output = - `System.register("NamedModule", [], function(exports_1) {\n "use strict";\n var x;\n` + + `System.register("NamedModule", [], function(exports_1, context_1) {\n` + + ` "use strict";\n` + + ` var __moduleName = context_1 && context_1.id;\n` + + ` var x;\n` + ` return {\n` + ` setters:[],\n` + ` execute: function() {\n` + @@ -159,8 +162,9 @@ var x = 0;`, `declare function use(a: any);\n` + `use(foo);` let output = - `System.register(["SomeOtherName"], function(exports_1) {\n` + + `System.register(["SomeOtherName"], function(exports_1, context_1) {\n` + ` "use strict";\n` + + ` var __moduleName = context_1 && context_1.id;\n` + ` var SomeName_1;\n` + ` return {\n` + ` setters:[\n` + From 56355d1d17545084f1c77c32997481d073e81d45 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Fri, 29 Jan 2016 13:28:27 -0800 Subject: [PATCH 123/160] fix access check issues when declaration is in multiple files --- src/compiler/checker.ts | 2 +- .../reference/declarationMerging1.js | 21 ++++++++++++ .../reference/declarationMerging1.symbols | 21 ++++++++++++ .../reference/declarationMerging1.types | 21 ++++++++++++ .../reference/declarationMerging2.js | 32 +++++++++++++++++++ .../reference/declarationMerging2.symbols | 25 +++++++++++++++ .../reference/declarationMerging2.types | 25 +++++++++++++++ tests/cases/compiler/declarationMerging1.ts | 10 ++++++ tests/cases/compiler/declarationMerging2.ts | 15 +++++++++ 9 files changed, 171 insertions(+), 1 deletion(-) create mode 100644 tests/baselines/reference/declarationMerging1.js create mode 100644 tests/baselines/reference/declarationMerging1.symbols create mode 100644 tests/baselines/reference/declarationMerging1.types create mode 100644 tests/baselines/reference/declarationMerging2.js create mode 100644 tests/baselines/reference/declarationMerging2.symbols create mode 100644 tests/baselines/reference/declarationMerging2.types create mode 100644 tests/cases/compiler/declarationMerging1.ts create mode 100644 tests/cases/compiler/declarationMerging2.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index a0040982356..9f4845fae02 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -8776,7 +8776,7 @@ namespace ts { */ function checkClassPropertyAccess(node: PropertyAccessExpression | QualifiedName, left: Expression | QualifiedName, type: Type, prop: Symbol): boolean { const flags = getDeclarationFlagsFromSymbol(prop); - const declaringClass = getDeclaredTypeOfSymbol(prop.parent); + const declaringClass = getDeclaredTypeOfSymbol(getMergedSymbol(prop.parent)); if (left.kind === SyntaxKind.SuperKeyword) { const errorNode = node.kind === SyntaxKind.PropertyAccessExpression ? diff --git a/tests/baselines/reference/declarationMerging1.js b/tests/baselines/reference/declarationMerging1.js new file mode 100644 index 00000000000..6b863def1c7 --- /dev/null +++ b/tests/baselines/reference/declarationMerging1.js @@ -0,0 +1,21 @@ +//// [tests/cases/compiler/declarationMerging1.ts] //// + +//// [file1.ts] +class A { + protected _f: number; + getF() { return this._f; } +} + +//// [file2.ts] +interface A { + run(); +} + +//// [file1.js] +var A = (function () { + function A() { + } + A.prototype.getF = function () { return this._f; }; + return A; +}()); +//// [file2.js] diff --git a/tests/baselines/reference/declarationMerging1.symbols b/tests/baselines/reference/declarationMerging1.symbols new file mode 100644 index 00000000000..08fe0d4c1fd --- /dev/null +++ b/tests/baselines/reference/declarationMerging1.symbols @@ -0,0 +1,21 @@ +=== tests/cases/compiler/file1.ts === +class A { +>A : Symbol(A, Decl(file1.ts, 0, 0), Decl(file2.ts, 0, 0)) + + protected _f: number; +>_f : Symbol(_f, Decl(file1.ts, 0, 9)) + + getF() { return this._f; } +>getF : Symbol(getF, Decl(file1.ts, 1, 25)) +>this._f : Symbol(_f, Decl(file1.ts, 0, 9)) +>this : Symbol(A, Decl(file1.ts, 0, 0), Decl(file2.ts, 0, 0)) +>_f : Symbol(_f, Decl(file1.ts, 0, 9)) +} + +=== tests/cases/compiler/file2.ts === +interface A { +>A : Symbol(A, Decl(file1.ts, 0, 0), Decl(file2.ts, 0, 0)) + + run(); +>run : Symbol(run, Decl(file2.ts, 0, 13)) +} diff --git a/tests/baselines/reference/declarationMerging1.types b/tests/baselines/reference/declarationMerging1.types new file mode 100644 index 00000000000..9802d2ab542 --- /dev/null +++ b/tests/baselines/reference/declarationMerging1.types @@ -0,0 +1,21 @@ +=== tests/cases/compiler/file1.ts === +class A { +>A : A + + protected _f: number; +>_f : number + + getF() { return this._f; } +>getF : () => number +>this._f : number +>this : this +>_f : number +} + +=== tests/cases/compiler/file2.ts === +interface A { +>A : A + + run(); +>run : () => any +} diff --git a/tests/baselines/reference/declarationMerging2.js b/tests/baselines/reference/declarationMerging2.js new file mode 100644 index 00000000000..3157445fa36 --- /dev/null +++ b/tests/baselines/reference/declarationMerging2.js @@ -0,0 +1,32 @@ +//// [tests/cases/compiler/declarationMerging2.ts] //// + +//// [a.ts] + +export class A { + protected _f: number; + getF() { return this._f; } +} + +//// [b.ts] +export {} +declare module "./a" { + interface A { + run(); + } +} + +//// [a.js] +define(["require", "exports"], function (require, exports) { + "use strict"; + var A = (function () { + function A() { + } + A.prototype.getF = function () { return this._f; }; + return A; + }()); + exports.A = A; +}); +//// [b.js] +define(["require", "exports"], function (require, exports) { + "use strict"; +}); diff --git a/tests/baselines/reference/declarationMerging2.symbols b/tests/baselines/reference/declarationMerging2.symbols new file mode 100644 index 00000000000..b3891374d32 --- /dev/null +++ b/tests/baselines/reference/declarationMerging2.symbols @@ -0,0 +1,25 @@ +=== tests/cases/compiler/a.ts === + +export class A { +>A : Symbol(A, Decl(a.ts, 0, 0), Decl(b.ts, 1, 22)) + + protected _f: number; +>_f : Symbol(_f, Decl(a.ts, 1, 16)) + + getF() { return this._f; } +>getF : Symbol(getF, Decl(a.ts, 2, 25)) +>this._f : Symbol(_f, Decl(a.ts, 1, 16)) +>this : Symbol(A, Decl(a.ts, 0, 0), Decl(b.ts, 1, 22)) +>_f : Symbol(_f, Decl(a.ts, 1, 16)) +} + +=== tests/cases/compiler/b.ts === +export {} +declare module "./a" { + interface A { +>A : Symbol(A, Decl(a.ts, 0, 0), Decl(b.ts, 1, 22)) + + run(); +>run : Symbol(run, Decl(b.ts, 2, 17)) + } +} diff --git a/tests/baselines/reference/declarationMerging2.types b/tests/baselines/reference/declarationMerging2.types new file mode 100644 index 00000000000..79e2818cf52 --- /dev/null +++ b/tests/baselines/reference/declarationMerging2.types @@ -0,0 +1,25 @@ +=== tests/cases/compiler/a.ts === + +export class A { +>A : A + + protected _f: number; +>_f : number + + getF() { return this._f; } +>getF : () => number +>this._f : number +>this : this +>_f : number +} + +=== tests/cases/compiler/b.ts === +export {} +declare module "./a" { + interface A { +>A : A + + run(); +>run : () => any + } +} diff --git a/tests/cases/compiler/declarationMerging1.ts b/tests/cases/compiler/declarationMerging1.ts new file mode 100644 index 00000000000..256cacf4a52 --- /dev/null +++ b/tests/cases/compiler/declarationMerging1.ts @@ -0,0 +1,10 @@ +// @filename: file1.ts +class A { + protected _f: number; + getF() { return this._f; } +} + +// @filename: file2.ts +interface A { + run(); +} \ No newline at end of file diff --git a/tests/cases/compiler/declarationMerging2.ts b/tests/cases/compiler/declarationMerging2.ts new file mode 100644 index 00000000000..6be5f4d0e4d --- /dev/null +++ b/tests/cases/compiler/declarationMerging2.ts @@ -0,0 +1,15 @@ +// @module: amd + +// @filename: a.ts +export class A { + protected _f: number; + getF() { return this._f; } +} + +// @filename: b.ts +export {} +declare module "./a" { + interface A { + run(); + } +} \ No newline at end of file From f89ebb8fd80e28e74cdbfb4f3585b3f1d7bdbe39 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Fri, 29 Jan 2016 16:01:41 -0800 Subject: [PATCH 124/160] Fixes bug #6673 #6673 --- src/compiler/binder.ts | 16 +++++++++--- tests/cases/fourslash/javaScriptModules13.ts | 4 ++- tests/cases/fourslash/javaScriptModules19.ts | 26 ++++++++++++++++++++ 3 files changed, 41 insertions(+), 5 deletions(-) create mode 100644 tests/cases/fourslash/javaScriptModules19.ts diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 88a1a62ce4c..4a611ff2db3 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -1384,7 +1384,7 @@ namespace ts { // Export assignment in some sort of block construct bindAnonymousDeclaration(node, SymbolFlags.Alias, getDeclarationName(node)); } - else if (boundExpression.kind === SyntaxKind.Identifier) { + else if (boundExpression.kind === SyntaxKind.Identifier && node.kind === SyntaxKind.ExportAssignment) { // An export default clause with an identifier exports all meanings of that identifier declareSymbol(container.symbol.exports, container.symbol, node, SymbolFlags.Alias, SymbolFlags.PropertyExcludes | SymbolFlags.AliasExcludes); } @@ -1444,8 +1444,16 @@ namespace ts { // Look up the function in the local scope, since prototype assignments should // follow the function declaration - const classId = ((node.left).expression).expression; - const funcSymbol = container.locals[classId.text]; + const leftSideOfAssignment = node.left as PropertyAccessExpression; + const classPrototype = leftSideOfAssignment.expression as PropertyAccessExpression; + const constructorFunction = classPrototype.expression as Identifier; + + // Fix up parent pointers since we're going to use these nodes before we bind into them + leftSideOfAssignment.parent = node; + constructorFunction.parent = classPrototype; + classPrototype.parent = leftSideOfAssignment; + + const funcSymbol = container.locals[constructorFunction.text]; if (!funcSymbol || !(funcSymbol.flags & SymbolFlags.Function)) { return; } @@ -1456,7 +1464,7 @@ namespace ts { } // Declare the method/property - declareSymbol(funcSymbol.members, funcSymbol, node.left, SymbolFlags.Property, SymbolFlags.PropertyExcludes); + declareSymbol(funcSymbol.members, funcSymbol, leftSideOfAssignment, SymbolFlags.Property, SymbolFlags.PropertyExcludes); } function bindCallExpression(node: CallExpression) { diff --git a/tests/cases/fourslash/javaScriptModules13.ts b/tests/cases/fourslash/javaScriptModules13.ts index 4eed369836f..cb3ef36783f 100644 --- a/tests/cases/fourslash/javaScriptModules13.ts +++ b/tests/cases/fourslash/javaScriptModules13.ts @@ -23,4 +23,6 @@ verify.completionListContains('y'); verify.not.completionListContains('invisible'); edit.insert('x.'); -verify.completionListContains('a'); +verify.memberListContains('a', undefined, undefined, 'property'); +edit.insert('a.'); +verify.memberListContains('toFixed', undefined, undefined, 'method'); diff --git a/tests/cases/fourslash/javaScriptModules19.ts b/tests/cases/fourslash/javaScriptModules19.ts new file mode 100644 index 00000000000..91e2439dcc9 --- /dev/null +++ b/tests/cases/fourslash/javaScriptModules19.ts @@ -0,0 +1,26 @@ +/// + +// Assignments to 'module.exports' create an external module + +// @allowJs: true +// @Filename: myMod.js +//// var x = { a: 10 }; +//// module.exports = x; + +// @Filename: isGlobal.js +//// var y = 10; + +// @Filename: consumer.js +//// var x = require('myMod'); +//// /**/; + +goTo.file('consumer.js'); +goTo.marker(); + +verify.completionListContains('y'); +verify.not.completionListContains('invisible'); + +edit.insert('x.'); +verify.memberListContains('a', undefined, undefined, 'property'); +edit.insert('a.'); +verify.memberListContains('toFixed', undefined, undefined, 'method'); From 5d22d18a70c24cac8fc45ecabb2d877018eae3fb Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Fri, 29 Jan 2016 16:27:34 -0800 Subject: [PATCH 125/160] allow augmentation for entities exported via 'export=' --- src/compiler/checker.ts | 29 ++- src/compiler/diagnosticMessages.json | 4 + .../reference/augmentExportEquals1.errors.txt | 26 +++ .../reference/augmentExportEquals1.js | 36 ++++ .../augmentExportEquals1_1.errors.txt | 29 +++ .../reference/augmentExportEquals1_1.js | 33 +++ .../reference/augmentExportEquals2.errors.txt | 25 +++ .../reference/augmentExportEquals2.js | 35 ++++ .../augmentExportEquals2_1.errors.txt | 29 +++ .../reference/augmentExportEquals2_1.js | 33 +++ .../reference/augmentExportEquals3.errors.txt | 31 +++ .../reference/augmentExportEquals3.js | 47 +++++ .../augmentExportEquals3_1.errors.txt | 34 +++ .../reference/augmentExportEquals3_1.js | 40 ++++ .../reference/augmentExportEquals4.errors.txt | 31 +++ .../reference/augmentExportEquals4.js | 51 +++++ .../augmentExportEquals4_1.errors.txt | 35 ++++ .../reference/augmentExportEquals4_1.js | 41 ++++ .../reference/augmentExportEquals5.js | 94 +++++++++ .../reference/augmentExportEquals5.symbols | 194 ++++++++++++++++++ .../reference/augmentExportEquals5.types | 194 ++++++++++++++++++ .../reference/augmentExportEquals6.js | 64 ++++++ .../reference/augmentExportEquals6.symbols | 67 ++++++ .../reference/augmentExportEquals6.types | 69 +++++++ .../reference/augmentExportEquals6_1.js | 38 ++++ .../reference/augmentExportEquals6_1.symbols | 45 ++++ .../reference/augmentExportEquals6_1.types | 45 ++++ tests/cases/compiler/augmentExportEquals1.ts | 19 ++ .../cases/compiler/augmentExportEquals1_1.ts | 22 ++ tests/cases/compiler/augmentExportEquals2.ts | 19 ++ .../cases/compiler/augmentExportEquals2_1.ts | 22 ++ tests/cases/compiler/augmentExportEquals3.ts | 24 +++ .../cases/compiler/augmentExportEquals3_1.ts | 27 +++ tests/cases/compiler/augmentExportEquals4.ts | 24 +++ .../cases/compiler/augmentExportEquals4_1.ts | 28 +++ tests/cases/compiler/augmentExportEquals5.ts | 82 ++++++++ tests/cases/compiler/augmentExportEquals6.ts | 28 +++ .../cases/compiler/augmentExportEquals6_1.ts | 26 +++ 38 files changed, 1709 insertions(+), 11 deletions(-) create mode 100644 tests/baselines/reference/augmentExportEquals1.errors.txt create mode 100644 tests/baselines/reference/augmentExportEquals1.js create mode 100644 tests/baselines/reference/augmentExportEquals1_1.errors.txt create mode 100644 tests/baselines/reference/augmentExportEquals1_1.js create mode 100644 tests/baselines/reference/augmentExportEquals2.errors.txt create mode 100644 tests/baselines/reference/augmentExportEquals2.js create mode 100644 tests/baselines/reference/augmentExportEquals2_1.errors.txt create mode 100644 tests/baselines/reference/augmentExportEquals2_1.js create mode 100644 tests/baselines/reference/augmentExportEquals3.errors.txt create mode 100644 tests/baselines/reference/augmentExportEquals3.js create mode 100644 tests/baselines/reference/augmentExportEquals3_1.errors.txt create mode 100644 tests/baselines/reference/augmentExportEquals3_1.js create mode 100644 tests/baselines/reference/augmentExportEquals4.errors.txt create mode 100644 tests/baselines/reference/augmentExportEquals4.js create mode 100644 tests/baselines/reference/augmentExportEquals4_1.errors.txt create mode 100644 tests/baselines/reference/augmentExportEquals4_1.js create mode 100644 tests/baselines/reference/augmentExportEquals5.js create mode 100644 tests/baselines/reference/augmentExportEquals5.symbols create mode 100644 tests/baselines/reference/augmentExportEquals5.types create mode 100644 tests/baselines/reference/augmentExportEquals6.js create mode 100644 tests/baselines/reference/augmentExportEquals6.symbols create mode 100644 tests/baselines/reference/augmentExportEquals6.types create mode 100644 tests/baselines/reference/augmentExportEquals6_1.js create mode 100644 tests/baselines/reference/augmentExportEquals6_1.symbols create mode 100644 tests/baselines/reference/augmentExportEquals6_1.types create mode 100644 tests/cases/compiler/augmentExportEquals1.ts create mode 100644 tests/cases/compiler/augmentExportEquals1_1.ts create mode 100644 tests/cases/compiler/augmentExportEquals2.ts create mode 100644 tests/cases/compiler/augmentExportEquals2_1.ts create mode 100644 tests/cases/compiler/augmentExportEquals3.ts create mode 100644 tests/cases/compiler/augmentExportEquals3_1.ts create mode 100644 tests/cases/compiler/augmentExportEquals4.ts create mode 100644 tests/cases/compiler/augmentExportEquals4_1.ts create mode 100644 tests/cases/compiler/augmentExportEquals5.ts create mode 100644 tests/cases/compiler/augmentExportEquals6.ts create mode 100644 tests/cases/compiler/augmentExportEquals6_1.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 9f4845fae02..a280be5f22f 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -395,10 +395,17 @@ namespace ts { if (!mainModule) { return; } - // if module symbol has already been merged - it is safe to use it. - // otherwise clone it - mainModule = mainModule.flags & SymbolFlags.Merged ? mainModule : cloneSymbol(mainModule); - mergeSymbol(mainModule, moduleAugmentation.symbol); + // obtain item referenced by 'export=' + mainModule = resolveExternalModuleSymbol(mainModule); + if (mainModule.flags & SymbolFlags.Namespace) { + // if module symbol has already been merged - it is safe to use it. + // otherwise clone it + mainModule = mainModule.flags & SymbolFlags.Merged ? mainModule : cloneSymbol(mainModule); + mergeSymbol(mainModule, moduleAugmentation.symbol); + } + else { + error(moduleName, Diagnostics.Cannot_augment_module_0_that_resolves_to_a_non_module_entity, moduleName.text); + } } } @@ -891,7 +898,7 @@ namespace ts { error(node.name, Diagnostics.Module_0_has_no_default_export, symbolToString(moduleSymbol)); } else if (!exportDefaultSymbol && allowSyntheticDefaultImports) { - return resolveSymbol(moduleSymbol.exports["export="]) || resolveSymbol(moduleSymbol); + return resolveExternalModuleSymbol(moduleSymbol) || resolveSymbol(moduleSymbol); } return exportDefaultSymbol; } @@ -1182,7 +1189,7 @@ namespace ts { // An external module with an 'export =' declaration resolves to the target of the 'export =' declaration, // and an external module with no 'export =' declaration resolves to the module itself. function resolveExternalModuleSymbol(moduleSymbol: Symbol): Symbol { - return moduleSymbol && resolveSymbol(moduleSymbol.exports["export="]) || moduleSymbol; + return moduleSymbol && getMergedSymbol(resolveSymbol(moduleSymbol.exports["export="])) || moduleSymbol; } // An external module with an 'export =' declaration may be referenced as an ES6 module provided the 'export =' @@ -1197,8 +1204,8 @@ namespace ts { return symbol; } - function getExportAssignmentSymbol(moduleSymbol: Symbol): Symbol { - return moduleSymbol.exports["export="]; + function hasExportAssignmentSymbol(moduleSymbol: Symbol): boolean { + return moduleSymbol.exports["export="] !== undefined; } function getExportsOfModuleAsArray(moduleSymbol: Symbol): Symbol[] { @@ -14845,7 +14852,7 @@ namespace ts { else { // export * from "foo" const moduleSymbol = resolveExternalModuleName(node, node.moduleSpecifier); - if (moduleSymbol && moduleSymbol.exports["export="]) { + if (moduleSymbol && hasExportAssignmentSymbol(moduleSymbol)) { error(node.moduleSpecifier, Diagnostics.Module_0_uses_export_and_cannot_be_used_with_export_Asterisk, symbolToString(moduleSymbol)); } } @@ -15683,7 +15690,7 @@ namespace ts { return true; } - const hasExportAssignment = getExportAssignmentSymbol(moduleSymbol) !== undefined; + const hasExportAssignment = hasExportAssignmentSymbol(moduleSymbol); // if module has export assignment then 'resolveExternalModuleSymbol' will return resolved symbol for export assignment // otherwise it will return moduleSymbol itself moduleSymbol = resolveExternalModuleSymbol(moduleSymbol); @@ -16042,7 +16049,7 @@ namespace ts { if (!isExternalOrCommonJsModule(file)) { mergeSymbolTable(globals, file.locals); } - if (file.moduleAugmentations) { + if (file.moduleAugmentations.length) { (augmentations || (augmentations = [])).push(file.moduleAugmentations); } }); diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index ca5a6d9d415..082077de01b 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1819,6 +1819,10 @@ "category": "Error", "code": 2670 }, + "Cannot augment module '{0}' that resolves to a non-module entity.": { + "category": "Error", + "code": 2671 + }, "Import declaration '{0}' is using private name '{1}'.": { "category": "Error", "code": 4000 diff --git a/tests/baselines/reference/augmentExportEquals1.errors.txt b/tests/baselines/reference/augmentExportEquals1.errors.txt new file mode 100644 index 00000000000..ca3cc82cce8 --- /dev/null +++ b/tests/baselines/reference/augmentExportEquals1.errors.txt @@ -0,0 +1,26 @@ +tests/cases/compiler/file2.ts(6,16): error TS2671: Cannot augment module './file1' that resolves to a non-module entity. +tests/cases/compiler/file3.ts(3,8): error TS2503: Cannot find namespace 'x'. + + +==== tests/cases/compiler/file3.ts (1 errors) ==== + import x = require("./file1"); + import "./file2"; + let a: x.A; // should not work + ~ +!!! error TS2503: Cannot find namespace 'x'. +==== tests/cases/compiler/file1.ts (0 errors) ==== + var x = 1; + export = x; + +==== tests/cases/compiler/file2.ts (1 errors) ==== + + import x = require("./file1"); + + // augmentation for './file1' + // should error since './file1' does not have namespace meaning + declare module "./file1" { + ~~~~~~~~~ +!!! error TS2671: Cannot augment module './file1' that resolves to a non-module entity. + interface A { a } + } + \ No newline at end of file diff --git a/tests/baselines/reference/augmentExportEquals1.js b/tests/baselines/reference/augmentExportEquals1.js new file mode 100644 index 00000000000..98322c01a34 --- /dev/null +++ b/tests/baselines/reference/augmentExportEquals1.js @@ -0,0 +1,36 @@ +//// [tests/cases/compiler/augmentExportEquals1.ts] //// + +//// [file1.ts] +var x = 1; +export = x; + +//// [file2.ts] + +import x = require("./file1"); + +// augmentation for './file1' +// should error since './file1' does not have namespace meaning +declare module "./file1" { + interface A { a } +} + +//// [file3.ts] +import x = require("./file1"); +import "./file2"; +let a: x.A; // should not work + +//// [file1.js] +define(["require", "exports"], function (require, exports) { + "use strict"; + var x = 1; + return x; +}); +//// [file2.js] +define(["require", "exports"], function (require, exports) { + "use strict"; +}); +//// [file3.js] +define(["require", "exports", "./file2"], function (require, exports) { + "use strict"; + var a; // should not work +}); diff --git a/tests/baselines/reference/augmentExportEquals1_1.errors.txt b/tests/baselines/reference/augmentExportEquals1_1.errors.txt new file mode 100644 index 00000000000..013bffc4504 --- /dev/null +++ b/tests/baselines/reference/augmentExportEquals1_1.errors.txt @@ -0,0 +1,29 @@ +tests/cases/compiler/file2.ts(6,16): error TS2671: Cannot augment module 'file1' that resolves to a non-module entity. +tests/cases/compiler/file3.ts(3,8): error TS2503: Cannot find namespace 'x'. + + +==== tests/cases/compiler/file3.ts (1 errors) ==== + import x = require("file1"); + import "file2"; + let a: x.A; // should not work + ~ +!!! error TS2503: Cannot find namespace 'x'. +==== tests/cases/compiler/file1.d.ts (0 errors) ==== + + declare module "file1" { + var x: number; + export = x; + } + +==== tests/cases/compiler/file2.ts (1 errors) ==== + /// + import x = require("file1"); + + // augmentation for 'file1' + // should error since 'file1' does not have namespace meaning + declare module "file1" { + ~~~~~~~ +!!! error TS2671: Cannot augment module 'file1' that resolves to a non-module entity. + interface A { a } + } + \ No newline at end of file diff --git a/tests/baselines/reference/augmentExportEquals1_1.js b/tests/baselines/reference/augmentExportEquals1_1.js new file mode 100644 index 00000000000..08f032ff33f --- /dev/null +++ b/tests/baselines/reference/augmentExportEquals1_1.js @@ -0,0 +1,33 @@ +//// [tests/cases/compiler/augmentExportEquals1_1.ts] //// + +//// [file1.d.ts] + +declare module "file1" { + var x: number; + export = x; +} + +//// [file2.ts] +/// +import x = require("file1"); + +// augmentation for 'file1' +// should error since 'file1' does not have namespace meaning +declare module "file1" { + interface A { a } +} + +//// [file3.ts] +import x = require("file1"); +import "file2"; +let a: x.A; // should not work + +//// [file2.js] +define(["require", "exports"], function (require, exports) { + "use strict"; +}); +//// [file3.js] +define(["require", "exports", "file2"], function (require, exports) { + "use strict"; + var a; // should not work +}); diff --git a/tests/baselines/reference/augmentExportEquals2.errors.txt b/tests/baselines/reference/augmentExportEquals2.errors.txt new file mode 100644 index 00000000000..89c0778a3c9 --- /dev/null +++ b/tests/baselines/reference/augmentExportEquals2.errors.txt @@ -0,0 +1,25 @@ +tests/cases/compiler/file2.ts(4,16): error TS2671: Cannot augment module './file1' that resolves to a non-module entity. +tests/cases/compiler/file3.ts(3,8): error TS2503: Cannot find namespace 'x'. + + +==== tests/cases/compiler/file3.ts (1 errors) ==== + import x = require("./file1"); + import "./file2"; + let a: x.A; // should not work + ~ +!!! error TS2503: Cannot find namespace 'x'. +==== tests/cases/compiler/file1.ts (0 errors) ==== + + function foo() {} + export = foo; + +==== tests/cases/compiler/file2.ts (1 errors) ==== + import x = require("./file1"); + + // should error since './file1' does not have namespace meaning + declare module "./file1" { + ~~~~~~~~~ +!!! error TS2671: Cannot augment module './file1' that resolves to a non-module entity. + interface A { a } + } + \ No newline at end of file diff --git a/tests/baselines/reference/augmentExportEquals2.js b/tests/baselines/reference/augmentExportEquals2.js new file mode 100644 index 00000000000..fc373173e3c --- /dev/null +++ b/tests/baselines/reference/augmentExportEquals2.js @@ -0,0 +1,35 @@ +//// [tests/cases/compiler/augmentExportEquals2.ts] //// + +//// [file1.ts] + +function foo() {} +export = foo; + +//// [file2.ts] +import x = require("./file1"); + +// should error since './file1' does not have namespace meaning +declare module "./file1" { + interface A { a } +} + +//// [file3.ts] +import x = require("./file1"); +import "./file2"; +let a: x.A; // should not work + +//// [file1.js] +define(["require", "exports"], function (require, exports) { + "use strict"; + function foo() { } + return foo; +}); +//// [file2.js] +define(["require", "exports"], function (require, exports) { + "use strict"; +}); +//// [file3.js] +define(["require", "exports", "./file2"], function (require, exports) { + "use strict"; + var a; // should not work +}); diff --git a/tests/baselines/reference/augmentExportEquals2_1.errors.txt b/tests/baselines/reference/augmentExportEquals2_1.errors.txt new file mode 100644 index 00000000000..f0f571af5c4 --- /dev/null +++ b/tests/baselines/reference/augmentExportEquals2_1.errors.txt @@ -0,0 +1,29 @@ +tests/cases/compiler/file2.ts(6,16): error TS2671: Cannot augment module 'file1' that resolves to a non-module entity. +tests/cases/compiler/file3.ts(3,8): error TS2503: Cannot find namespace 'x'. + + +==== tests/cases/compiler/file3.ts (1 errors) ==== + import x = require("file1"); + import "file2"; + let a: x.A; // should not work + ~ +!!! error TS2503: Cannot find namespace 'x'. +==== tests/cases/compiler/file1.d.ts (0 errors) ==== + + declare module "file1" { + function foo(): void; + export = foo; + } + +==== tests/cases/compiler/file2.ts (1 errors) ==== + + /// + import x = require("file1"); + + // should error since './file1' does not have namespace meaning + declare module "file1" { + ~~~~~~~ +!!! error TS2671: Cannot augment module 'file1' that resolves to a non-module entity. + interface A { a } + } + \ No newline at end of file diff --git a/tests/baselines/reference/augmentExportEquals2_1.js b/tests/baselines/reference/augmentExportEquals2_1.js new file mode 100644 index 00000000000..9046157bb26 --- /dev/null +++ b/tests/baselines/reference/augmentExportEquals2_1.js @@ -0,0 +1,33 @@ +//// [tests/cases/compiler/augmentExportEquals2_1.ts] //// + +//// [file1.d.ts] + +declare module "file1" { + function foo(): void; + export = foo; +} + +//// [file2.ts] + +/// +import x = require("file1"); + +// should error since './file1' does not have namespace meaning +declare module "file1" { + interface A { a } +} + +//// [file3.ts] +import x = require("file1"); +import "file2"; +let a: x.A; // should not work + +//// [file2.js] +define(["require", "exports"], function (require, exports) { + "use strict"; +}); +//// [file3.js] +define(["require", "exports", "file2"], function (require, exports) { + "use strict"; + var a; // should not work +}); diff --git a/tests/baselines/reference/augmentExportEquals3.errors.txt b/tests/baselines/reference/augmentExportEquals3.errors.txt new file mode 100644 index 00000000000..9fe63d84fb6 --- /dev/null +++ b/tests/baselines/reference/augmentExportEquals3.errors.txt @@ -0,0 +1,31 @@ +tests/cases/compiler/file2.ts(6,15): error TS2665: Module augmentation cannot introduce new names in the top level scope. +tests/cases/compiler/file2.ts(7,9): error TS2665: Module augmentation cannot introduce new names in the top level scope. + + +==== tests/cases/compiler/file1.ts (0 errors) ==== + + function foo() {} + namespace foo { + export var v = 1; + } + export = foo; + +==== tests/cases/compiler/file2.ts (2 errors) ==== + import x = require("./file1"); + x.b = 1; + + // OK - './file1' is a namespace + declare module "./file1" { + interface A { a } + ~ +!!! error TS2665: Module augmentation cannot introduce new names in the top level scope. + let b: number; + ~ +!!! error TS2665: Module augmentation cannot introduce new names in the top level scope. + } + +==== tests/cases/compiler/file3.ts (0 errors) ==== + import * as x from "./file1"; + import "./file2"; + let a: x.A; + let b = x.b; \ No newline at end of file diff --git a/tests/baselines/reference/augmentExportEquals3.js b/tests/baselines/reference/augmentExportEquals3.js new file mode 100644 index 00000000000..82cfa5f2166 --- /dev/null +++ b/tests/baselines/reference/augmentExportEquals3.js @@ -0,0 +1,47 @@ +//// [tests/cases/compiler/augmentExportEquals3.ts] //// + +//// [file1.ts] + +function foo() {} +namespace foo { + export var v = 1; +} +export = foo; + +//// [file2.ts] +import x = require("./file1"); +x.b = 1; + +// OK - './file1' is a namespace +declare module "./file1" { + interface A { a } + let b: number; +} + +//// [file3.ts] +import * as x from "./file1"; +import "./file2"; +let a: x.A; +let b = x.b; + +//// [file1.js] +define(["require", "exports"], function (require, exports) { + "use strict"; + function foo() { } + var foo; + (function (foo) { + foo.v = 1; + })(foo || (foo = {})); + return foo; +}); +//// [file2.js] +define(["require", "exports", "./file1"], function (require, exports, x) { + "use strict"; + x.b = 1; +}); +//// [file3.js] +define(["require", "exports", "./file1", "./file2"], function (require, exports, x) { + "use strict"; + var a; + var b = x.b; +}); diff --git a/tests/baselines/reference/augmentExportEquals3_1.errors.txt b/tests/baselines/reference/augmentExportEquals3_1.errors.txt new file mode 100644 index 00000000000..9fb0ce5f169 --- /dev/null +++ b/tests/baselines/reference/augmentExportEquals3_1.errors.txt @@ -0,0 +1,34 @@ +tests/cases/compiler/file2.ts(7,15): error TS2665: Module augmentation cannot introduce new names in the top level scope. +tests/cases/compiler/file2.ts(8,9): error TS2665: Module augmentation cannot introduce new names in the top level scope. + + +==== tests/cases/compiler/file1.d.ts (0 errors) ==== + declare module "file1" { + function foo(): void; + namespace foo { + export var v: number; + } + export = foo; + } + + +==== tests/cases/compiler/file2.ts (2 errors) ==== + /// + import x = require("file1"); + x.b = 1; + + // OK - './file1' is a namespace + declare module "file1" { + interface A { a } + ~ +!!! error TS2665: Module augmentation cannot introduce new names in the top level scope. + let b: number; + ~ +!!! error TS2665: Module augmentation cannot introduce new names in the top level scope. + } + +==== tests/cases/compiler/file3.ts (0 errors) ==== + import * as x from "file1"; + import "file2"; + let a: x.A; + let b = x.b; \ No newline at end of file diff --git a/tests/baselines/reference/augmentExportEquals3_1.js b/tests/baselines/reference/augmentExportEquals3_1.js new file mode 100644 index 00000000000..fc6b7b1cec3 --- /dev/null +++ b/tests/baselines/reference/augmentExportEquals3_1.js @@ -0,0 +1,40 @@ +//// [tests/cases/compiler/augmentExportEquals3_1.ts] //// + +//// [file1.d.ts] +declare module "file1" { + function foo(): void; + namespace foo { + export var v: number; + } + export = foo; +} + + +//// [file2.ts] +/// +import x = require("file1"); +x.b = 1; + +// OK - './file1' is a namespace +declare module "file1" { + interface A { a } + let b: number; +} + +//// [file3.ts] +import * as x from "file1"; +import "file2"; +let a: x.A; +let b = x.b; + +//// [file2.js] +define(["require", "exports", "file1"], function (require, exports, x) { + "use strict"; + x.b = 1; +}); +//// [file3.js] +define(["require", "exports", "file1", "file2"], function (require, exports, x) { + "use strict"; + var a; + var b = x.b; +}); diff --git a/tests/baselines/reference/augmentExportEquals4.errors.txt b/tests/baselines/reference/augmentExportEquals4.errors.txt new file mode 100644 index 00000000000..20f7cc32d9f --- /dev/null +++ b/tests/baselines/reference/augmentExportEquals4.errors.txt @@ -0,0 +1,31 @@ +tests/cases/compiler/file2.ts(6,15): error TS2665: Module augmentation cannot introduce new names in the top level scope. +tests/cases/compiler/file2.ts(7,9): error TS2665: Module augmentation cannot introduce new names in the top level scope. + + +==== tests/cases/compiler/file1.ts (0 errors) ==== + + class foo {} + namespace foo { + export var v = 1; + } + export = foo; + +==== tests/cases/compiler/file2.ts (2 errors) ==== + import x = require("./file1"); + x.b = 1; + + // OK - './file1' is a namespace + declare module "./file1" { + interface A { a } + ~ +!!! error TS2665: Module augmentation cannot introduce new names in the top level scope. + let b: number; + ~ +!!! error TS2665: Module augmentation cannot introduce new names in the top level scope. + } + +==== tests/cases/compiler/file3.ts (0 errors) ==== + import * as x from "./file1"; + import "./file2"; + let a: x.A; + let b = x.b; \ No newline at end of file diff --git a/tests/baselines/reference/augmentExportEquals4.js b/tests/baselines/reference/augmentExportEquals4.js new file mode 100644 index 00000000000..ee0fc1892c2 --- /dev/null +++ b/tests/baselines/reference/augmentExportEquals4.js @@ -0,0 +1,51 @@ +//// [tests/cases/compiler/augmentExportEquals4.ts] //// + +//// [file1.ts] + +class foo {} +namespace foo { + export var v = 1; +} +export = foo; + +//// [file2.ts] +import x = require("./file1"); +x.b = 1; + +// OK - './file1' is a namespace +declare module "./file1" { + interface A { a } + let b: number; +} + +//// [file3.ts] +import * as x from "./file1"; +import "./file2"; +let a: x.A; +let b = x.b; + +//// [file1.js] +define(["require", "exports"], function (require, exports) { + "use strict"; + var foo = (function () { + function foo() { + } + return foo; + }()); + var foo; + (function (foo) { + foo.v = 1; + })(foo || (foo = {})); + return foo; +}); +//// [file2.js] +define(["require", "exports", "./file1"], function (require, exports, x) { + "use strict"; + x.b = 1; +}); +//// [file3.js] +define(["require", "exports", "./file1", "./file2"], function (require, exports, x) { + "use strict"; + var a; + var b = x.b; +}); diff --git a/tests/baselines/reference/augmentExportEquals4_1.errors.txt b/tests/baselines/reference/augmentExportEquals4_1.errors.txt new file mode 100644 index 00000000000..a401f7a24cf --- /dev/null +++ b/tests/baselines/reference/augmentExportEquals4_1.errors.txt @@ -0,0 +1,35 @@ +tests/cases/compiler/file2.ts(7,15): error TS2665: Module augmentation cannot introduce new names in the top level scope. +tests/cases/compiler/file2.ts(8,9): error TS2665: Module augmentation cannot introduce new names in the top level scope. + + +==== tests/cases/compiler/file1.d.ts (0 errors) ==== + + declare module "file1" { + class foo {} + namespace foo { + export var v: number; + } + export = foo; + } + + +==== tests/cases/compiler/file2.ts (2 errors) ==== + /// + import x = require("file1"); + x.b = 1; + + // OK - './file1' is a namespace + declare module "file1" { + interface A { a } + ~ +!!! error TS2665: Module augmentation cannot introduce new names in the top level scope. + let b: number; + ~ +!!! error TS2665: Module augmentation cannot introduce new names in the top level scope. + } + +==== tests/cases/compiler/file3.ts (0 errors) ==== + import * as x from "file1"; + import "file2"; + let a: x.A; + let b = x.b; \ No newline at end of file diff --git a/tests/baselines/reference/augmentExportEquals4_1.js b/tests/baselines/reference/augmentExportEquals4_1.js new file mode 100644 index 00000000000..b4ba932d44b --- /dev/null +++ b/tests/baselines/reference/augmentExportEquals4_1.js @@ -0,0 +1,41 @@ +//// [tests/cases/compiler/augmentExportEquals4_1.ts] //// + +//// [file1.d.ts] + +declare module "file1" { + class foo {} + namespace foo { + export var v: number; + } + export = foo; +} + + +//// [file2.ts] +/// +import x = require("file1"); +x.b = 1; + +// OK - './file1' is a namespace +declare module "file1" { + interface A { a } + let b: number; +} + +//// [file3.ts] +import * as x from "file1"; +import "file2"; +let a: x.A; +let b = x.b; + +//// [file2.js] +define(["require", "exports", "file1"], function (require, exports, x) { + "use strict"; + x.b = 1; +}); +//// [file3.js] +define(["require", "exports", "file1", "file2"], function (require, exports, x) { + "use strict"; + var a; + var b = x.b; +}); diff --git a/tests/baselines/reference/augmentExportEquals5.js b/tests/baselines/reference/augmentExportEquals5.js new file mode 100644 index 00000000000..49b6c3fed56 --- /dev/null +++ b/tests/baselines/reference/augmentExportEquals5.js @@ -0,0 +1,94 @@ +//// [tests/cases/compiler/augmentExportEquals5.ts] //// + +//// [express.d.ts] + + +declare module Express { + export interface Request { } + export interface Response { } + export interface Application { } +} + +declare module "express" { + function e(): e.Express; + namespace e { + interface IRoute { + all(...handler: RequestHandler[]): IRoute; + } + + interface IRouterMatcher { + (name: string|RegExp, ...handlers: RequestHandler[]): T; + } + + interface IRouter extends RequestHandler { + route(path: string): IRoute; + } + + export function Router(options?: any): Router; + + export interface Router extends IRouter {} + + interface Errback { (err: Error): void; } + + interface Request extends Express.Request { + + get (name: string): string; + } + + interface Response extends Express.Response { + charset: string; + } + + interface ErrorRequestHandler { + (err: any, req: Request, res: Response, next: Function): any; + } + + interface RequestHandler { + (req: Request, res: Response, next: Function): any; + } + + interface Handler extends RequestHandler {} + + interface RequestParamHandler { + (req: Request, res: Response, next: Function, param: any): any; + } + + interface Application extends IRouter, Express.Application { + routes: any; + } + + interface Express extends Application { + createApplication(): Application; + } + + var static: any; + } + + export = e; +} + +//// [augmentation.ts] +/// +import * as e from "express"; +declare module "express" { + interface Request { + id: number; + } +} + +//// [consumer.ts] +import { Request } from "express"; +import "./augmentation"; +let x: Request; +const y = x.id; + +//// [augmentation.js] +define(["require", "exports"], function (require, exports) { + "use strict"; +}); +//// [consumer.js] +define(["require", "exports", "./augmentation"], function (require, exports) { + "use strict"; + var x; + var y = x.id; +}); diff --git a/tests/baselines/reference/augmentExportEquals5.symbols b/tests/baselines/reference/augmentExportEquals5.symbols new file mode 100644 index 00000000000..f255bf8c065 --- /dev/null +++ b/tests/baselines/reference/augmentExportEquals5.symbols @@ -0,0 +1,194 @@ +=== tests/cases/compiler/express.d.ts === + + +declare module Express { +>Express : Symbol(Express, Decl(express.d.ts, 0, 0)) + + export interface Request { } +>Request : Symbol(Request, Decl(express.d.ts, 2, 24)) + + export interface Response { } +>Response : Symbol(Response, Decl(express.d.ts, 3, 32)) + + export interface Application { } +>Application : Symbol(Application, Decl(express.d.ts, 4, 33)) +} + +declare module "express" { + function e(): e.Express; +>e : Symbol(, Decl(express.d.ts, 8, 26), Decl(express.d.ts, 9, 28), Decl(augmentation.ts, 1, 29)) +>e : Symbol(e, Decl(express.d.ts, 8, 26), Decl(express.d.ts, 9, 28)) +>Express : Symbol(Express, Decl(express.d.ts, 54, 9)) + + namespace e { +>e : Symbol(, Decl(express.d.ts, 8, 26), Decl(express.d.ts, 9, 28), Decl(augmentation.ts, 1, 29)) + + interface IRoute { +>IRoute : Symbol(IRoute, Decl(express.d.ts, 10, 17)) + + all(...handler: RequestHandler[]): IRoute; +>all : Symbol(all, Decl(express.d.ts, 11, 26)) +>handler : Symbol(handler, Decl(express.d.ts, 12, 16)) +>RequestHandler : Symbol(RequestHandler, Decl(express.d.ts, 40, 9)) +>IRoute : Symbol(IRoute, Decl(express.d.ts, 10, 17)) + } + + interface IRouterMatcher { +>IRouterMatcher : Symbol(IRouterMatcher, Decl(express.d.ts, 13, 9)) +>T : Symbol(T, Decl(express.d.ts, 15, 33)) + + (name: string|RegExp, ...handlers: RequestHandler[]): T; +>name : Symbol(name, Decl(express.d.ts, 16, 13)) +>RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>handlers : Symbol(handlers, Decl(express.d.ts, 16, 33)) +>RequestHandler : Symbol(RequestHandler, Decl(express.d.ts, 40, 9)) +>T : Symbol(T, Decl(express.d.ts, 15, 33)) + } + + interface IRouter extends RequestHandler { +>IRouter : Symbol(IRouter, Decl(express.d.ts, 17, 9)) +>T : Symbol(T, Decl(express.d.ts, 19, 26)) +>RequestHandler : Symbol(RequestHandler, Decl(express.d.ts, 40, 9)) + + route(path: string): IRoute; +>route : Symbol(route, Decl(express.d.ts, 19, 53)) +>path : Symbol(path, Decl(express.d.ts, 20, 18)) +>IRoute : Symbol(IRoute, Decl(express.d.ts, 10, 17)) + } + + export function Router(options?: any): Router; +>Router : Symbol(Router, Decl(express.d.ts, 21, 9), Decl(express.d.ts, 23, 54)) +>options : Symbol(options, Decl(express.d.ts, 23, 31)) +>Router : Symbol(Router, Decl(express.d.ts, 21, 9), Decl(express.d.ts, 23, 54)) + + export interface Router extends IRouter {} +>Router : Symbol(Router, Decl(express.d.ts, 21, 9), Decl(express.d.ts, 23, 54)) +>IRouter : Symbol(IRouter, Decl(express.d.ts, 17, 9)) +>Router : Symbol(Router, Decl(express.d.ts, 21, 9), Decl(express.d.ts, 23, 54)) + + interface Errback { (err: Error): void; } +>Errback : Symbol(Errback, Decl(express.d.ts, 25, 58)) +>err : Symbol(err, Decl(express.d.ts, 27, 29)) +>Error : Symbol(Error, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) + + interface Request extends Express.Request { +>Request : Symbol(Request, Decl(express.d.ts, 27, 49), Decl(augmentation.ts, 2, 26)) +>Express.Request : Symbol(Express.Request, Decl(express.d.ts, 2, 24)) +>Express : Symbol(Express, Decl(express.d.ts, 0, 0)) +>Request : Symbol(Express.Request, Decl(express.d.ts, 2, 24)) + + get (name: string): string; +>get : Symbol(get, Decl(express.d.ts, 29, 51)) +>name : Symbol(name, Decl(express.d.ts, 31, 17)) + } + + interface Response extends Express.Response { +>Response : Symbol(Response, Decl(express.d.ts, 32, 9)) +>Express.Response : Symbol(Express.Response, Decl(express.d.ts, 3, 32)) +>Express : Symbol(Express, Decl(express.d.ts, 0, 0)) +>Response : Symbol(Express.Response, Decl(express.d.ts, 3, 32)) + + charset: string; +>charset : Symbol(charset, Decl(express.d.ts, 34, 53)) + } + + interface ErrorRequestHandler { +>ErrorRequestHandler : Symbol(ErrorRequestHandler, Decl(express.d.ts, 36, 9)) + + (err: any, req: Request, res: Response, next: Function): any; +>err : Symbol(err, Decl(express.d.ts, 39, 13)) +>req : Symbol(req, Decl(express.d.ts, 39, 22)) +>Request : Symbol(Request, Decl(express.d.ts, 27, 49), Decl(augmentation.ts, 2, 26)) +>res : Symbol(res, Decl(express.d.ts, 39, 36)) +>Response : Symbol(Response, Decl(express.d.ts, 32, 9)) +>next : Symbol(next, Decl(express.d.ts, 39, 51)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) + } + + interface RequestHandler { +>RequestHandler : Symbol(RequestHandler, Decl(express.d.ts, 40, 9)) + + (req: Request, res: Response, next: Function): any; +>req : Symbol(req, Decl(express.d.ts, 43, 13)) +>Request : Symbol(Request, Decl(express.d.ts, 27, 49), Decl(augmentation.ts, 2, 26)) +>res : Symbol(res, Decl(express.d.ts, 43, 26)) +>Response : Symbol(Response, Decl(express.d.ts, 32, 9)) +>next : Symbol(next, Decl(express.d.ts, 43, 41)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) + } + + interface Handler extends RequestHandler {} +>Handler : Symbol(Handler, Decl(express.d.ts, 44, 9)) +>RequestHandler : Symbol(RequestHandler, Decl(express.d.ts, 40, 9)) + + interface RequestParamHandler { +>RequestParamHandler : Symbol(RequestParamHandler, Decl(express.d.ts, 46, 51)) + + (req: Request, res: Response, next: Function, param: any): any; +>req : Symbol(req, Decl(express.d.ts, 49, 13)) +>Request : Symbol(Request, Decl(express.d.ts, 27, 49), Decl(augmentation.ts, 2, 26)) +>res : Symbol(res, Decl(express.d.ts, 49, 26)) +>Response : Symbol(Response, Decl(express.d.ts, 32, 9)) +>next : Symbol(next, Decl(express.d.ts, 49, 41)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>param : Symbol(param, Decl(express.d.ts, 49, 57)) + } + + interface Application extends IRouter, Express.Application { +>Application : Symbol(Application, Decl(express.d.ts, 50, 9)) +>IRouter : Symbol(IRouter, Decl(express.d.ts, 17, 9)) +>Application : Symbol(Application, Decl(express.d.ts, 50, 9)) +>Express.Application : Symbol(Express.Application, Decl(express.d.ts, 4, 33)) +>Express : Symbol(Express, Decl(express.d.ts, 0, 0)) +>Application : Symbol(Express.Application, Decl(express.d.ts, 4, 33)) + + routes: any; +>routes : Symbol(routes, Decl(express.d.ts, 52, 81)) + } + + interface Express extends Application { +>Express : Symbol(Express, Decl(express.d.ts, 54, 9)) +>Application : Symbol(Application, Decl(express.d.ts, 50, 9)) + + createApplication(): Application; +>createApplication : Symbol(createApplication, Decl(express.d.ts, 56, 47)) +>Application : Symbol(Application, Decl(express.d.ts, 50, 9)) + } + + var static: any; +>static : Symbol(static, Decl(express.d.ts, 60, 11)) + } + + export = e; +>e : Symbol(e, Decl(express.d.ts, 8, 26), Decl(express.d.ts, 9, 28)) +} + +=== tests/cases/compiler/augmentation.ts === +/// +import * as e from "express"; +>e : Symbol(e, Decl(augmentation.ts, 1, 6)) + +declare module "express" { + interface Request { +>Request : Symbol(Request, Decl(express.d.ts, 27, 49), Decl(augmentation.ts, 2, 26)) + + id: number; +>id : Symbol(id, Decl(augmentation.ts, 3, 23)) + } +} + +=== tests/cases/compiler/consumer.ts === +import { Request } from "express"; +>Request : Symbol(Request, Decl(consumer.ts, 0, 8)) + +import "./augmentation"; +let x: Request; +>x : Symbol(x, Decl(consumer.ts, 2, 3)) +>Request : Symbol(Request, Decl(consumer.ts, 0, 8)) + +const y = x.id; +>y : Symbol(y, Decl(consumer.ts, 3, 5)) +>x.id : Symbol(Request.id, Decl(augmentation.ts, 3, 23)) +>x : Symbol(x, Decl(consumer.ts, 2, 3)) +>id : Symbol(Request.id, Decl(augmentation.ts, 3, 23)) + diff --git a/tests/baselines/reference/augmentExportEquals5.types b/tests/baselines/reference/augmentExportEquals5.types new file mode 100644 index 00000000000..42b79674dfd --- /dev/null +++ b/tests/baselines/reference/augmentExportEquals5.types @@ -0,0 +1,194 @@ +=== tests/cases/compiler/express.d.ts === + + +declare module Express { +>Express : any + + export interface Request { } +>Request : Request + + export interface Response { } +>Response : Response + + export interface Application { } +>Application : Application +} + +declare module "express" { + function e(): e.Express; +>e : typeof +>e : any +>Express : Express + + namespace e { +>e : typeof + + interface IRoute { +>IRoute : IRoute + + all(...handler: RequestHandler[]): IRoute; +>all : (...handler: RequestHandler[]) => IRoute +>handler : RequestHandler[] +>RequestHandler : RequestHandler +>IRoute : IRoute + } + + interface IRouterMatcher { +>IRouterMatcher : IRouterMatcher +>T : T + + (name: string|RegExp, ...handlers: RequestHandler[]): T; +>name : string | RegExp +>RegExp : RegExp +>handlers : RequestHandler[] +>RequestHandler : RequestHandler +>T : T + } + + interface IRouter extends RequestHandler { +>IRouter : IRouter +>T : T +>RequestHandler : RequestHandler + + route(path: string): IRoute; +>route : (path: string) => IRoute +>path : string +>IRoute : IRoute + } + + export function Router(options?: any): Router; +>Router : (options?: any) => Router +>options : any +>Router : Router + + export interface Router extends IRouter {} +>Router : Router +>IRouter : IRouter +>Router : Router + + interface Errback { (err: Error): void; } +>Errback : Errback +>err : Error +>Error : Error + + interface Request extends Express.Request { +>Request : Request +>Express.Request : any +>Express : any +>Request : Express.Request + + get (name: string): string; +>get : (name: string) => string +>name : string + } + + interface Response extends Express.Response { +>Response : Response +>Express.Response : any +>Express : any +>Response : Express.Response + + charset: string; +>charset : string + } + + interface ErrorRequestHandler { +>ErrorRequestHandler : ErrorRequestHandler + + (err: any, req: Request, res: Response, next: Function): any; +>err : any +>req : Request +>Request : Request +>res : Response +>Response : Response +>next : Function +>Function : Function + } + + interface RequestHandler { +>RequestHandler : RequestHandler + + (req: Request, res: Response, next: Function): any; +>req : Request +>Request : Request +>res : Response +>Response : Response +>next : Function +>Function : Function + } + + interface Handler extends RequestHandler {} +>Handler : Handler +>RequestHandler : RequestHandler + + interface RequestParamHandler { +>RequestParamHandler : RequestParamHandler + + (req: Request, res: Response, next: Function, param: any): any; +>req : Request +>Request : Request +>res : Response +>Response : Response +>next : Function +>Function : Function +>param : any + } + + interface Application extends IRouter, Express.Application { +>Application : Application +>IRouter : IRouter +>Application : Application +>Express.Application : any +>Express : any +>Application : Express.Application + + routes: any; +>routes : any + } + + interface Express extends Application { +>Express : Express +>Application : Application + + createApplication(): Application; +>createApplication : () => Application +>Application : Application + } + + var static: any; +>static : any + } + + export = e; +>e : typeof e +} + +=== tests/cases/compiler/augmentation.ts === +/// +import * as e from "express"; +>e : typeof e + +declare module "express" { + interface Request { +>Request : Request + + id: number; +>id : number + } +} + +=== tests/cases/compiler/consumer.ts === +import { Request } from "express"; +>Request : any + +import "./augmentation"; +let x: Request; +>x : Request +>Request : Request + +const y = x.id; +>y : number +>x.id : number +>x : Request +>id : number + diff --git a/tests/baselines/reference/augmentExportEquals6.js b/tests/baselines/reference/augmentExportEquals6.js new file mode 100644 index 00000000000..94dfa389c6d --- /dev/null +++ b/tests/baselines/reference/augmentExportEquals6.js @@ -0,0 +1,64 @@ +//// [tests/cases/compiler/augmentExportEquals6.ts] //// + +//// [file1.ts] + +class foo {} +namespace foo { + export class A {} + export namespace B { export let a; } +} +export = foo; + +//// [file2.ts] +import x = require("./file1"); +x.B.b = 1; + +// OK - './file1' is a namespace +declare module "./file1" { + interface A { a: number } + namespace B { + export let b: number; + } +} + +//// [file3.ts] +import * as x from "./file1"; +import "./file2"; +let a: x.A; +let b = a.a; +let c = x.B.b; + +//// [file1.js] +define(["require", "exports"], function (require, exports) { + "use strict"; + var foo = (function () { + function foo() { + } + return foo; + }()); + var foo; + (function (foo) { + var A = (function () { + function A() { + } + return A; + }()); + foo.A = A; + var B; + (function (B) { + })(B = foo.B || (foo.B = {})); + })(foo || (foo = {})); + return foo; +}); +//// [file2.js] +define(["require", "exports", "./file1"], function (require, exports, x) { + "use strict"; + x.B.b = 1; +}); +//// [file3.js] +define(["require", "exports", "./file1", "./file2"], function (require, exports, x) { + "use strict"; + var a; + var b = a.a; + var c = x.B.b; +}); diff --git a/tests/baselines/reference/augmentExportEquals6.symbols b/tests/baselines/reference/augmentExportEquals6.symbols new file mode 100644 index 00000000000..24f8ef7c903 --- /dev/null +++ b/tests/baselines/reference/augmentExportEquals6.symbols @@ -0,0 +1,67 @@ +=== tests/cases/compiler/file1.ts === + +class foo {} +>foo : Symbol(, Decl(file1.ts, 0, 0), Decl(file1.ts, 1, 12), Decl(file2.ts, 1, 10)) + +namespace foo { +>foo : Symbol(, Decl(file1.ts, 0, 0), Decl(file1.ts, 1, 12), Decl(file2.ts, 1, 10)) + + export class A {} +>A : Symbol(A, Decl(file1.ts, 2, 15), Decl(file2.ts, 4, 26)) + + export namespace B { export let a; } +>B : Symbol(B, Decl(file1.ts, 3, 21), Decl(file2.ts, 5, 29)) +>a : Symbol(a, Decl(file1.ts, 4, 35)) +} +export = foo; +>foo : Symbol(foo, Decl(file1.ts, 0, 0), Decl(file1.ts, 1, 12)) + +=== tests/cases/compiler/file2.ts === +import x = require("./file1"); +>x : Symbol(x, Decl(file2.ts, 0, 0)) + +x.B.b = 1; +>x.B.b : Symbol(x.B.b, Decl(file2.ts, 7, 18)) +>x.B : Symbol(x.B, Decl(file1.ts, 3, 21), Decl(file2.ts, 5, 29)) +>x : Symbol(x, Decl(file2.ts, 0, 0)) +>B : Symbol(x.B, Decl(file1.ts, 3, 21), Decl(file2.ts, 5, 29)) +>b : Symbol(x.B.b, Decl(file2.ts, 7, 18)) + +// OK - './file1' is a namespace +declare module "./file1" { + interface A { a: number } +>A : Symbol(A, Decl(file1.ts, 2, 15), Decl(file2.ts, 4, 26)) +>a : Symbol(a, Decl(file2.ts, 5, 17)) + + namespace B { +>B : Symbol(B, Decl(file1.ts, 3, 21), Decl(file2.ts, 5, 29)) + + export let b: number; +>b : Symbol(b, Decl(file2.ts, 7, 18)) + } +} + +=== tests/cases/compiler/file3.ts === +import * as x from "./file1"; +>x : Symbol(x, Decl(file3.ts, 0, 6)) + +import "./file2"; +let a: x.A; +>a : Symbol(a, Decl(file3.ts, 2, 3)) +>x : Symbol(x, Decl(file3.ts, 0, 6)) +>A : Symbol(x.A, Decl(file1.ts, 2, 15), Decl(file2.ts, 4, 26)) + +let b = a.a; +>b : Symbol(b, Decl(file3.ts, 3, 3)) +>a.a : Symbol(x.A.a, Decl(file2.ts, 5, 17)) +>a : Symbol(a, Decl(file3.ts, 2, 3)) +>a : Symbol(x.A.a, Decl(file2.ts, 5, 17)) + +let c = x.B.b; +>c : Symbol(c, Decl(file3.ts, 4, 3)) +>x.B.b : Symbol(x.B.b, Decl(file2.ts, 7, 18)) +>x.B : Symbol(x.B, Decl(file1.ts, 3, 21), Decl(file2.ts, 5, 29)) +>x : Symbol(x, Decl(file3.ts, 0, 6)) +>B : Symbol(x.B, Decl(file1.ts, 3, 21), Decl(file2.ts, 5, 29)) +>b : Symbol(x.B.b, Decl(file2.ts, 7, 18)) + diff --git a/tests/baselines/reference/augmentExportEquals6.types b/tests/baselines/reference/augmentExportEquals6.types new file mode 100644 index 00000000000..1a2b2b22ccb --- /dev/null +++ b/tests/baselines/reference/augmentExportEquals6.types @@ -0,0 +1,69 @@ +=== tests/cases/compiler/file1.ts === + +class foo {} +>foo : + +namespace foo { +>foo : typeof + + export class A {} +>A : A + + export namespace B { export let a; } +>B : typeof B +>a : any +} +export = foo; +>foo : foo + +=== tests/cases/compiler/file2.ts === +import x = require("./file1"); +>x : typeof x + +x.B.b = 1; +>x.B.b = 1 : number +>x.B.b : number +>x.B : typeof x.B +>x : typeof x +>B : typeof x.B +>b : number +>1 : number + +// OK - './file1' is a namespace +declare module "./file1" { + interface A { a: number } +>A : A +>a : number + + namespace B { +>B : typeof B + + export let b: number; +>b : number + } +} + +=== tests/cases/compiler/file3.ts === +import * as x from "./file1"; +>x : typeof x + +import "./file2"; +let a: x.A; +>a : x.A +>x : any +>A : x.A + +let b = a.a; +>b : number +>a.a : number +>a : x.A +>a : number + +let c = x.B.b; +>c : number +>x.B.b : number +>x.B : typeof x.B +>x : typeof x +>B : typeof x.B +>b : number + diff --git a/tests/baselines/reference/augmentExportEquals6_1.js b/tests/baselines/reference/augmentExportEquals6_1.js new file mode 100644 index 00000000000..c7c560183cc --- /dev/null +++ b/tests/baselines/reference/augmentExportEquals6_1.js @@ -0,0 +1,38 @@ +//// [tests/cases/compiler/augmentExportEquals6_1.ts] //// + +//// [file1.d.ts] + +declare module "file1" { + class foo {} + namespace foo { + class A {} + } + export = foo; +} + + +//// [file2.ts] +/// +import x = require("file1"); + +// OK - './file1' is a namespace +declare module "file1" { + interface A { a: number } +} + +//// [file3.ts] +import * as x from "file1"; +import "file2"; +let a: x.A; +let b = a.a; + +//// [file2.js] +define(["require", "exports"], function (require, exports) { + "use strict"; +}); +//// [file3.js] +define(["require", "exports", "file2"], function (require, exports) { + "use strict"; + var a; + var b = a.a; +}); diff --git a/tests/baselines/reference/augmentExportEquals6_1.symbols b/tests/baselines/reference/augmentExportEquals6_1.symbols new file mode 100644 index 00000000000..5c45af00a48 --- /dev/null +++ b/tests/baselines/reference/augmentExportEquals6_1.symbols @@ -0,0 +1,45 @@ +=== tests/cases/compiler/file1.d.ts === + +declare module "file1" { + class foo {} +>foo : Symbol(, Decl(file1.d.ts, 1, 24), Decl(file1.d.ts, 2, 16), Decl(file2.ts, 1, 28)) + + namespace foo { +>foo : Symbol(, Decl(file1.d.ts, 1, 24), Decl(file1.d.ts, 2, 16), Decl(file2.ts, 1, 28)) + + class A {} +>A : Symbol(A, Decl(file1.d.ts, 3, 19), Decl(file2.ts, 4, 24)) + } + export = foo; +>foo : Symbol(foo, Decl(file1.d.ts, 1, 24), Decl(file1.d.ts, 2, 16)) +} + + +=== tests/cases/compiler/file2.ts === +/// +import x = require("file1"); +>x : Symbol(x, Decl(file2.ts, 0, 0)) + +// OK - './file1' is a namespace +declare module "file1" { + interface A { a: number } +>A : Symbol(A, Decl(file1.d.ts, 3, 19), Decl(file2.ts, 4, 24)) +>a : Symbol(a, Decl(file2.ts, 5, 17)) +} + +=== tests/cases/compiler/file3.ts === +import * as x from "file1"; +>x : Symbol(x, Decl(file3.ts, 0, 6)) + +import "file2"; +let a: x.A; +>a : Symbol(a, Decl(file3.ts, 2, 3)) +>x : Symbol(x, Decl(file3.ts, 0, 6)) +>A : Symbol(x.A, Decl(file1.d.ts, 3, 19), Decl(file2.ts, 4, 24)) + +let b = a.a; +>b : Symbol(b, Decl(file3.ts, 3, 3)) +>a.a : Symbol(x.A.a, Decl(file2.ts, 5, 17)) +>a : Symbol(a, Decl(file3.ts, 2, 3)) +>a : Symbol(x.A.a, Decl(file2.ts, 5, 17)) + diff --git a/tests/baselines/reference/augmentExportEquals6_1.types b/tests/baselines/reference/augmentExportEquals6_1.types new file mode 100644 index 00000000000..a9cc78056c8 --- /dev/null +++ b/tests/baselines/reference/augmentExportEquals6_1.types @@ -0,0 +1,45 @@ +=== tests/cases/compiler/file1.d.ts === + +declare module "file1" { + class foo {} +>foo : + + namespace foo { +>foo : typeof + + class A {} +>A : A + } + export = foo; +>foo : foo +} + + +=== tests/cases/compiler/file2.ts === +/// +import x = require("file1"); +>x : typeof x + +// OK - './file1' is a namespace +declare module "file1" { + interface A { a: number } +>A : A +>a : number +} + +=== tests/cases/compiler/file3.ts === +import * as x from "file1"; +>x : typeof x + +import "file2"; +let a: x.A; +>a : x.A +>x : any +>A : x.A + +let b = a.a; +>b : number +>a.a : number +>a : x.A +>a : number + diff --git a/tests/cases/compiler/augmentExportEquals1.ts b/tests/cases/compiler/augmentExportEquals1.ts new file mode 100644 index 00000000000..4479fd063b9 --- /dev/null +++ b/tests/cases/compiler/augmentExportEquals1.ts @@ -0,0 +1,19 @@ +// @module: amd +// @filename: file1.ts +var x = 1; +export = x; + +// @filename: file2.ts + +import x = require("./file1"); + +// augmentation for './file1' +// should error since './file1' does not have namespace meaning +declare module "./file1" { + interface A { a } +} + +// @filename: file3.ts +import x = require("./file1"); +import "./file2"; +let a: x.A; // should not work \ No newline at end of file diff --git a/tests/cases/compiler/augmentExportEquals1_1.ts b/tests/cases/compiler/augmentExportEquals1_1.ts new file mode 100644 index 00000000000..6afc6e70910 --- /dev/null +++ b/tests/cases/compiler/augmentExportEquals1_1.ts @@ -0,0 +1,22 @@ +// @module: amd + +// @filename: file1.d.ts +declare module "file1" { + var x: number; + export = x; +} + +// @filename: file2.ts +/// +import x = require("file1"); + +// augmentation for 'file1' +// should error since 'file1' does not have namespace meaning +declare module "file1" { + interface A { a } +} + +// @filename: file3.ts +import x = require("file1"); +import "file2"; +let a: x.A; // should not work \ No newline at end of file diff --git a/tests/cases/compiler/augmentExportEquals2.ts b/tests/cases/compiler/augmentExportEquals2.ts new file mode 100644 index 00000000000..1d4c1fae35c --- /dev/null +++ b/tests/cases/compiler/augmentExportEquals2.ts @@ -0,0 +1,19 @@ +// @module: amd + +// @filename: file1.ts +function foo() {} +export = foo; + +// @filename: file2.ts +import x = require("./file1"); + +// should error since './file1' does not have namespace meaning +declare module "./file1" { + interface A { a } +} + +// @filename: file3.ts +// @filename: file3.ts +import x = require("./file1"); +import "./file2"; +let a: x.A; // should not work \ No newline at end of file diff --git a/tests/cases/compiler/augmentExportEquals2_1.ts b/tests/cases/compiler/augmentExportEquals2_1.ts new file mode 100644 index 00000000000..b6aeb21efd0 --- /dev/null +++ b/tests/cases/compiler/augmentExportEquals2_1.ts @@ -0,0 +1,22 @@ +// @module: amd + +// @filename: file1.d.ts +declare module "file1" { + function foo(): void; + export = foo; +} + +// @filename: file2.ts + +/// +import x = require("file1"); + +// should error since './file1' does not have namespace meaning +declare module "file1" { + interface A { a } +} + +// @filename: file3.ts +import x = require("file1"); +import "file2"; +let a: x.A; // should not work \ No newline at end of file diff --git a/tests/cases/compiler/augmentExportEquals3.ts b/tests/cases/compiler/augmentExportEquals3.ts new file mode 100644 index 00000000000..81a0e1d5448 --- /dev/null +++ b/tests/cases/compiler/augmentExportEquals3.ts @@ -0,0 +1,24 @@ +// @module: amd + +// @filename: file1.ts +function foo() {} +namespace foo { + export var v = 1; +} +export = foo; + +// @filename: file2.ts +import x = require("./file1"); +x.b = 1; + +// OK - './file1' is a namespace +declare module "./file1" { + interface A { a } + let b: number; +} + +// @filename: file3.ts +import * as x from "./file1"; +import "./file2"; +let a: x.A; +let b = x.b; \ No newline at end of file diff --git a/tests/cases/compiler/augmentExportEquals3_1.ts b/tests/cases/compiler/augmentExportEquals3_1.ts new file mode 100644 index 00000000000..ad329643fa5 --- /dev/null +++ b/tests/cases/compiler/augmentExportEquals3_1.ts @@ -0,0 +1,27 @@ +// @module: amd +// @filename: file1.d.ts +declare module "file1" { + function foo(): void; + namespace foo { + export var v: number; + } + export = foo; +} + + +// @filename: file2.ts +/// +import x = require("file1"); +x.b = 1; + +// OK - './file1' is a namespace +declare module "file1" { + interface A { a } + let b: number; +} + +// @filename: file3.ts +import * as x from "file1"; +import "file2"; +let a: x.A; +let b = x.b; \ No newline at end of file diff --git a/tests/cases/compiler/augmentExportEquals4.ts b/tests/cases/compiler/augmentExportEquals4.ts new file mode 100644 index 00000000000..85294682f5c --- /dev/null +++ b/tests/cases/compiler/augmentExportEquals4.ts @@ -0,0 +1,24 @@ +// @module: amd + +// @filename: file1.ts +class foo {} +namespace foo { + export var v = 1; +} +export = foo; + +// @filename: file2.ts +import x = require("./file1"); +x.b = 1; + +// OK - './file1' is a namespace +declare module "./file1" { + interface A { a } + let b: number; +} + +// @filename: file3.ts +import * as x from "./file1"; +import "./file2"; +let a: x.A; +let b = x.b; \ No newline at end of file diff --git a/tests/cases/compiler/augmentExportEquals4_1.ts b/tests/cases/compiler/augmentExportEquals4_1.ts new file mode 100644 index 00000000000..467d0af38ef --- /dev/null +++ b/tests/cases/compiler/augmentExportEquals4_1.ts @@ -0,0 +1,28 @@ +// @module: amd + +// @filename: file1.d.ts +declare module "file1" { + class foo {} + namespace foo { + export var v: number; + } + export = foo; +} + + +// @filename: file2.ts +/// +import x = require("file1"); +x.b = 1; + +// OK - './file1' is a namespace +declare module "file1" { + interface A { a } + let b: number; +} + +// @filename: file3.ts +import * as x from "file1"; +import "file2"; +let a: x.A; +let b = x.b; \ No newline at end of file diff --git a/tests/cases/compiler/augmentExportEquals5.ts b/tests/cases/compiler/augmentExportEquals5.ts new file mode 100644 index 00000000000..3250a40f131 --- /dev/null +++ b/tests/cases/compiler/augmentExportEquals5.ts @@ -0,0 +1,82 @@ +// @module: amd + +// @filename: express.d.ts + +declare module Express { + export interface Request { } + export interface Response { } + export interface Application { } +} + +declare module "express" { + function e(): e.Express; + namespace e { + interface IRoute { + all(...handler: RequestHandler[]): IRoute; + } + + interface IRouterMatcher { + (name: string|RegExp, ...handlers: RequestHandler[]): T; + } + + interface IRouter extends RequestHandler { + route(path: string): IRoute; + } + + export function Router(options?: any): Router; + + export interface Router extends IRouter {} + + interface Errback { (err: Error): void; } + + interface Request extends Express.Request { + + get (name: string): string; + } + + interface Response extends Express.Response { + charset: string; + } + + interface ErrorRequestHandler { + (err: any, req: Request, res: Response, next: Function): any; + } + + interface RequestHandler { + (req: Request, res: Response, next: Function): any; + } + + interface Handler extends RequestHandler {} + + interface RequestParamHandler { + (req: Request, res: Response, next: Function, param: any): any; + } + + interface Application extends IRouter, Express.Application { + routes: any; + } + + interface Express extends Application { + createApplication(): Application; + } + + var static: any; + } + + export = e; +} + +// @filename: augmentation.ts +/// +import * as e from "express"; +declare module "express" { + interface Request { + id: number; + } +} + +// @filename: consumer.ts +import { Request } from "express"; +import "./augmentation"; +let x: Request; +const y = x.id; \ No newline at end of file diff --git a/tests/cases/compiler/augmentExportEquals6.ts b/tests/cases/compiler/augmentExportEquals6.ts new file mode 100644 index 00000000000..a0dd50c53f0 --- /dev/null +++ b/tests/cases/compiler/augmentExportEquals6.ts @@ -0,0 +1,28 @@ +// @module: amd + +// @filename: file1.ts +class foo {} +namespace foo { + export class A {} + export namespace B { export let a; } +} +export = foo; + +// @filename: file2.ts +import x = require("./file1"); +x.B.b = 1; + +// OK - './file1' is a namespace +declare module "./file1" { + interface A { a: number } + namespace B { + export let b: number; + } +} + +// @filename: file3.ts +import * as x from "./file1"; +import "./file2"; +let a: x.A; +let b = a.a; +let c = x.B.b; \ No newline at end of file diff --git a/tests/cases/compiler/augmentExportEquals6_1.ts b/tests/cases/compiler/augmentExportEquals6_1.ts new file mode 100644 index 00000000000..aaee43bae74 --- /dev/null +++ b/tests/cases/compiler/augmentExportEquals6_1.ts @@ -0,0 +1,26 @@ +// @module: amd + +// @filename: file1.d.ts +declare module "file1" { + class foo {} + namespace foo { + class A {} + } + export = foo; +} + + +// @filename: file2.ts +/// +import x = require("file1"); + +// OK - './file1' is a namespace +declare module "file1" { + interface A { a: number } +} + +// @filename: file3.ts +import * as x from "file1"; +import "file2"; +let a: x.A; +let b = a.a; \ No newline at end of file From 55ce1d0eb68ad835bf26a5ebb08076de30ff6c7c Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Fri, 29 Jan 2016 17:23:17 -0800 Subject: [PATCH 126/160] unpin mocha version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 48203b2c230..cc74bf2c27c 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ }, "devDependencies": { "jake": "latest", - "mocha": "2.3.4", + "mocha": "latest", "chai": "latest", "browserify": "latest", "istanbul": "latest", From 992dd05bc0d56aec1ebc4c1cc795a088bd94b94c Mon Sep 17 00:00:00 2001 From: Prayag Verma Date: Sat, 30 Jan 2016 10:04:27 +0530 Subject: [PATCH 127/160] Typo fixes in CONTRIBUTING.md --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d9941d92e87..1dba1281dd7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -30,7 +30,7 @@ You can try out the nightly build of TypeScript (`npm install typescript@next`) We also accept suggestions in the issue tracker. Be sure to [check the FAQ](https://github.com/Microsoft/TypeScript/wiki/FAQ) and [search](https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&q=is%3Aissue) first. -In general, things we find useful when reviewing suggestins are: +In general, things we find useful when reviewing suggestions are: * A description of the problem you're trying to solve * An overview of the suggested solution * Examples of how the suggestion would work in various places @@ -71,7 +71,7 @@ Your pull request should: * Tests should include reasonable permutations of the target fix/change * Include baseline changes with your change * All changed code must have 100% code coverage -* Follow the code conventions descriped in [Coding guidelines](https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines) +* Follow the code conventions described in [Coding guidelines](https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines) * To avoid line ending issues, set `autocrlf = input` and `whitespace = cr-at-eol` in your git configuration ## Contributing `lib.d.ts` fixes From bd86e2ec8042ef1f152ae6e0e221222b000e793c Mon Sep 17 00:00:00 2001 From: Noj Vek Date: Sat, 30 Jan 2016 11:31:43 -0800 Subject: [PATCH 128/160] remove uncommented lines --- src/compiler/emitter.ts | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index ad0f1c8bcd8..067900217e5 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -1302,21 +1302,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge decreaseIndent(); } } - - // const emittableChildren = children.filter(isJsxChildEmittable); - // if (emittableChildren.length > 0) { - // // If the only child is non-jsx element, don't put it on a new line - // if (emittableChildren.length == 1 && emittableChildren[0].kind !== SyntaxKind.JsxElement && emittableChildren[0].kind !== SyntaxKind.JsxSelfClosingElement) { - // write(", "); - // emit(emittableChildren[0]); - // } - // // Otherwise build a indented comma separated list - // else { - // increaseIndent(); - // emitList(emittableChildren, 0, emittableChildren.length, /*multiLine*/ true, /*trailingComma*/ false, /*leadingComma*/ true); - // decreaseIndent(); - // } - // } } // Closing paren From f04f93c41462ece162df0122287d605273de55e4 Mon Sep 17 00:00:00 2001 From: Noj Vek Date: Sat, 30 Jan 2016 11:37:02 -0800 Subject: [PATCH 129/160] Fix typo in compiler reactNamespace error string --- src/compiler/diagnosticMessages.json | 2 +- src/compiler/program.ts | 50 +++++++++---------- .../reactNamespaceInvalidInput.errors.txt | 4 +- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index ca5a6d9d415..aacb791486f 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -2171,7 +2171,7 @@ "category": "Error", "code": 5058 }, - "Invalide value for '--reactNamespace'. '{0}' is not a valid identifier.": { + "Invalid value for '--reactNamespace'. '{0}' is not a valid identifier.": { "category": "Error", "code": 5059 }, diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 803ae47b0fd..6d4d7b54253 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -142,17 +142,17 @@ namespace ts { type ResolutionKindSpecificLoader = (candidate: string, extensions: string[], failedLookupLocations: string[], onlyRecordFalures: boolean, state: ModuleResolutionState) => string; /** - * Any module resolution kind can be augmented with optional settings: 'baseUrl', 'paths' and 'rootDirs' - they are used to - * mitigate differences between design time structure of the project and its runtime counterpart so the same import name - * can be resolved successfully by TypeScript compiler and runtime module loader. + * Any module resolution kind can be augmented with optional settings: 'baseUrl', 'paths' and 'rootDirs' - they are used to + * mitigate differences between design time structure of the project and its runtime counterpart so the same import name + * can be resolved successfully by TypeScript compiler and runtime module loader. * If these settings are set then loading procedure will try to use them to resolve module name and it can of failure it will * fallback to standard resolution routine. - * + * * - baseUrl - this setting controls how non-relative module names are resolved. If this setting is specified then non-relative * names will be resolved relative to baseUrl: i.e. if baseUrl is '/a/b' then canditate location to resolve module name 'c/d' will * be '/a/b/c/d' - * - paths - this setting can only be used when baseUrl is specified. allows to tune how non-relative module names - * will be resolved based on the content of the module name. + * - paths - this setting can only be used when baseUrl is specified. allows to tune how non-relative module names + * will be resolved based on the content of the module name. * Structure of 'paths' compiler options * 'paths': { * pattern-1: [...substitutions], @@ -160,37 +160,37 @@ namespace ts { * ... * pattern-n: [...substitutions] * } - * Pattern here is a string that can contain zero or one '*' character. During module resolution module name will be matched against + * Pattern here is a string that can contain zero or one '*' character. During module resolution module name will be matched against * all patterns in the list. Matching for patterns that don't contain '*' means that module name must be equal to pattern respecting the case. - * If pattern contains '*' then to match pattern "*" module name must start with the and end with . - * denotes part of the module name between and . + * If pattern contains '*' then to match pattern "*" module name must start with the and end with . + * denotes part of the module name between and . * If module name can be matches with multiple patterns then pattern with the longest prefix will be picked. - * After selecting pattern we'll use list of substitutions to get candidate locations of the module and the try to load module - * from the candidate location. - * Substitiution is a string that can contain zero or one '*'. To get candidate location from substitution we'll pick every - * substitution in the list and replace '*' with string. If candidate location is not rooted it + * After selecting pattern we'll use list of substitutions to get candidate locations of the module and the try to load module + * from the candidate location. + * Substitiution is a string that can contain zero or one '*'. To get candidate location from substitution we'll pick every + * substitution in the list and replace '*' with string. If candidate location is not rooted it * will be converted to absolute using baseUrl. * For example: * baseUrl: /a/b/c * "paths": { * // match all module names - * "*": [ + * "*": [ * "*", // use matched name as is, * // will be looked as /a/b/c/ * * "folder1/*" // substitution will convert matched name to 'folder1/', - * // since it is not rooted then final candidate location will be /a/b/c/folder1/ + * // since it is not rooted then final candidate location will be /a/b/c/folder1/ * ], * // match module names that start with 'components/' * "components/*": [ "/root/components/*" ] // substitution will convert /components/folder1/ to '/root/components/folder1/', * // it is rooted so it will be final candidate location * } * - * 'rootDirs' allows the project to be spreaded across multiple locations and resolve modules with relative names as if + * 'rootDirs' allows the project to be spreaded across multiple locations and resolve modules with relative names as if * they were in the same location. For example lets say there are two files * '/local/src/content/file1.ts' * '/shared/components/contracts/src/content/protocols/file2.ts' - * After bundling content of '/shared/components/contracts/src' will be merged with '/local/src' so + * After bundling content of '/shared/components/contracts/src' will be merged with '/local/src' so * if file1 has the following import 'import {x} from "./protocols/file2"' it will be resolved successfully in runtime. * 'rootDirs' provides the way to tell compiler that in order to get the whole project it should behave as if content of all * root dirs were merged together. @@ -229,7 +229,7 @@ namespace ts { let matchedNormalizedPrefix: string; for (const rootDir of state.compilerOptions.rootDirs) { // rootDirs are expected to be absolute - // in case of tsconfig.json this will happen automatically - compiler will expand relative names + // in case of tsconfig.json this will happen automatically - compiler will expand relative names // using locaton of tsconfig.json as base location let normalizedRoot = normalizePath(rootDir); if (!endsWith(normalizedRoot, directorySeparator)) { @@ -269,7 +269,7 @@ namespace ts { // then try to resolve using remaining entries in rootDirs for (const rootDir of state.compilerOptions.rootDirs) { if (rootDir === matchedRootDir) { - // skip the initially matched entry + // skip the initially matched entry continue; } const candidate = combinePaths(normalizePath(rootDir), suffix); @@ -412,7 +412,7 @@ namespace ts { /** * @param {boolean} onlyRecordFailures - if true then function won't try to actually load files but instead record all attempts as failures. This flag is necessary - * in cases when we know upfront that all load attempts will fail (because containing folder does not exists) however we still need to record all failed lookup locations. + * in cases when we know upfront that all load attempts will fail (because containing folder does not exists) however we still need to record all failed lookup locations. */ function loadModuleFromFile(candidate: string, extensions: string[], failedLookupLocation: string[], onlyRecordFailures: boolean, state: ModuleResolutionState): string { return forEach(extensions, tryLoad); @@ -450,7 +450,7 @@ namespace ts { jsonContent = jsonText ? <{ typings?: string }>JSON.parse(jsonText) : { typings: undefined }; } catch (e) { - // gracefully handle if readFile fails or returns not JSON + // gracefully handle if readFile fails or returns not JSON jsonContent = { typings: undefined }; } @@ -719,7 +719,7 @@ namespace ts { const filesByName = createFileMap(); // stores 'filename -> file association' ignoring case - // used to track cases when two file names differ only in casing + // used to track cases when two file names differ only in casing const filesByNameIgnoreCase = host.useCaseSensitiveFileNames() ? createFileMap(fileName => fileName.toLowerCase()) : undefined; if (oldProgram) { @@ -1295,7 +1295,7 @@ namespace ts { } // TypeScript 1.0 spec (April 2014): 12.1.6 - // An ExternalImportDeclaration in an AmbientExternalModuleDeclaration may reference other external modules + // An ExternalImportDeclaration in an AmbientExternalModuleDeclaration may reference other external modules // only through top - level external module names. Relative external module names are not permitted. if (!inAmbientModule || !isExternalModuleNameRelative((moduleNameExpr).text)) { (imports || (imports = [])).push(moduleNameExpr); @@ -1313,7 +1313,7 @@ namespace ts { (moduleAugmentations || (moduleAugmentations = [])).push(moduleName); } else if (!inAmbientModule) { - // An AmbientExternalModuleDeclaration declares an external module. + // An AmbientExternalModuleDeclaration declares an external module. // This type of declaration is permitted only in the global module. // The StringLiteral must specify a top - level external module name. // Relative external module names are not permitted @@ -1713,7 +1713,7 @@ namespace ts { } if (options.reactNamespace && !isIdentifier(options.reactNamespace, languageVersion)) { - programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Invalide_value_for_reactNamespace_0_is_not_a_valid_identifier, options.reactNamespace)); + programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier, options.reactNamespace)); } // If the emit is enabled make sure that every output file is unique and not overwriting any of the input files diff --git a/tests/baselines/reference/reactNamespaceInvalidInput.errors.txt b/tests/baselines/reference/reactNamespaceInvalidInput.errors.txt index e08ec520867..2e72775fe9c 100644 --- a/tests/baselines/reference/reactNamespaceInvalidInput.errors.txt +++ b/tests/baselines/reference/reactNamespaceInvalidInput.errors.txt @@ -1,8 +1,8 @@ -error TS5059: Invalide value for '--reactNamespace'. 'my-React-Lib' is not a valid identifier. +error TS5059: Invalid value for '--reactNamespace'. 'my-React-Lib' is not a valid identifier. tests/cases/compiler/reactNamespaceInvalidInput.tsx(2,2): error TS2304: Cannot find name 'my-React-Lib'. -!!! error TS5059: Invalide value for '--reactNamespace'. 'my-React-Lib' is not a valid identifier. +!!! error TS5059: Invalid value for '--reactNamespace'. 'my-React-Lib' is not a valid identifier. ==== tests/cases/compiler/reactNamespaceInvalidInput.tsx (1 errors) ==== ; From ac528cc948a3f9b81a910d133ba39092c5d3c7d8 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Sat, 30 Jan 2016 16:20:48 -0800 Subject: [PATCH 130/160] addressed PR feedback --- src/compiler/checker.ts | 2 +- src/compiler/diagnosticMessages.json | 2 +- tests/baselines/reference/augmentExportEquals1.errors.txt | 4 ++-- tests/baselines/reference/augmentExportEquals1_1.errors.txt | 4 ++-- tests/baselines/reference/augmentExportEquals2.errors.txt | 4 ++-- tests/baselines/reference/augmentExportEquals2_1.errors.txt | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index a280be5f22f..8a17ff77f24 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -404,7 +404,7 @@ namespace ts { mergeSymbol(mainModule, moduleAugmentation.symbol); } else { - error(moduleName, Diagnostics.Cannot_augment_module_0_that_resolves_to_a_non_module_entity, moduleName.text); + error(moduleName, Diagnostics.Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity, moduleName.text); } } } diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 082077de01b..cb333e9036b 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1819,7 +1819,7 @@ "category": "Error", "code": 2670 }, - "Cannot augment module '{0}' that resolves to a non-module entity.": { + "Cannot augment module '{0}' because it resolves to a non-module entity.": { "category": "Error", "code": 2671 }, diff --git a/tests/baselines/reference/augmentExportEquals1.errors.txt b/tests/baselines/reference/augmentExportEquals1.errors.txt index ca3cc82cce8..2d15e6d622a 100644 --- a/tests/baselines/reference/augmentExportEquals1.errors.txt +++ b/tests/baselines/reference/augmentExportEquals1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/file2.ts(6,16): error TS2671: Cannot augment module './file1' that resolves to a non-module entity. +tests/cases/compiler/file2.ts(6,16): error TS2671: Cannot augment module './file1' because it resolves to a non-module entity. tests/cases/compiler/file3.ts(3,8): error TS2503: Cannot find namespace 'x'. @@ -20,7 +20,7 @@ tests/cases/compiler/file3.ts(3,8): error TS2503: Cannot find namespace 'x'. // should error since './file1' does not have namespace meaning declare module "./file1" { ~~~~~~~~~ -!!! error TS2671: Cannot augment module './file1' that resolves to a non-module entity. +!!! error TS2671: Cannot augment module './file1' because it resolves to a non-module entity. interface A { a } } \ No newline at end of file diff --git a/tests/baselines/reference/augmentExportEquals1_1.errors.txt b/tests/baselines/reference/augmentExportEquals1_1.errors.txt index 013bffc4504..aa89aa0c1d3 100644 --- a/tests/baselines/reference/augmentExportEquals1_1.errors.txt +++ b/tests/baselines/reference/augmentExportEquals1_1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/file2.ts(6,16): error TS2671: Cannot augment module 'file1' that resolves to a non-module entity. +tests/cases/compiler/file2.ts(6,16): error TS2671: Cannot augment module 'file1' because it resolves to a non-module entity. tests/cases/compiler/file3.ts(3,8): error TS2503: Cannot find namespace 'x'. @@ -23,7 +23,7 @@ tests/cases/compiler/file3.ts(3,8): error TS2503: Cannot find namespace 'x'. // should error since 'file1' does not have namespace meaning declare module "file1" { ~~~~~~~ -!!! error TS2671: Cannot augment module 'file1' that resolves to a non-module entity. +!!! error TS2671: Cannot augment module 'file1' because it resolves to a non-module entity. interface A { a } } \ No newline at end of file diff --git a/tests/baselines/reference/augmentExportEquals2.errors.txt b/tests/baselines/reference/augmentExportEquals2.errors.txt index 89c0778a3c9..b078a6623d7 100644 --- a/tests/baselines/reference/augmentExportEquals2.errors.txt +++ b/tests/baselines/reference/augmentExportEquals2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/file2.ts(4,16): error TS2671: Cannot augment module './file1' that resolves to a non-module entity. +tests/cases/compiler/file2.ts(4,16): error TS2671: Cannot augment module './file1' because it resolves to a non-module entity. tests/cases/compiler/file3.ts(3,8): error TS2503: Cannot find namespace 'x'. @@ -19,7 +19,7 @@ tests/cases/compiler/file3.ts(3,8): error TS2503: Cannot find namespace 'x'. // should error since './file1' does not have namespace meaning declare module "./file1" { ~~~~~~~~~ -!!! error TS2671: Cannot augment module './file1' that resolves to a non-module entity. +!!! error TS2671: Cannot augment module './file1' because it resolves to a non-module entity. interface A { a } } \ No newline at end of file diff --git a/tests/baselines/reference/augmentExportEquals2_1.errors.txt b/tests/baselines/reference/augmentExportEquals2_1.errors.txt index f0f571af5c4..8e02f21176a 100644 --- a/tests/baselines/reference/augmentExportEquals2_1.errors.txt +++ b/tests/baselines/reference/augmentExportEquals2_1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/file2.ts(6,16): error TS2671: Cannot augment module 'file1' that resolves to a non-module entity. +tests/cases/compiler/file2.ts(6,16): error TS2671: Cannot augment module 'file1' because it resolves to a non-module entity. tests/cases/compiler/file3.ts(3,8): error TS2503: Cannot find namespace 'x'. @@ -23,7 +23,7 @@ tests/cases/compiler/file3.ts(3,8): error TS2503: Cannot find namespace 'x'. // should error since './file1' does not have namespace meaning declare module "file1" { ~~~~~~~ -!!! error TS2671: Cannot augment module 'file1' that resolves to a non-module entity. +!!! error TS2671: Cannot augment module 'file1' because it resolves to a non-module entity. interface A { a } } \ No newline at end of file From e5aa9cbc6f29fb2da2d9bf9a7852faaec83c8c1c Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Sat, 30 Jan 2016 19:58:29 -0800 Subject: [PATCH 131/160] properly handle merged declarations across files --- src/compiler/checker.ts | 8 +-- .../reference/mergedDeclarations5.js | 34 +++++++++++ .../reference/mergedDeclarations5.symbols | 18 ++++++ .../reference/mergedDeclarations5.types | 18 ++++++ .../reference/mergedDeclarations6.js | 57 +++++++++++++++++++ .../reference/mergedDeclarations6.symbols | 38 +++++++++++++ .../reference/mergedDeclarations6.types | 39 +++++++++++++ tests/cases/compiler/mergedDeclarations5.ts | 10 ++++ tests/cases/compiler/mergedDeclarations6.ts | 23 ++++++++ 9 files changed, 241 insertions(+), 4 deletions(-) create mode 100644 tests/baselines/reference/mergedDeclarations5.js create mode 100644 tests/baselines/reference/mergedDeclarations5.symbols create mode 100644 tests/baselines/reference/mergedDeclarations5.types create mode 100644 tests/baselines/reference/mergedDeclarations6.js create mode 100644 tests/baselines/reference/mergedDeclarations6.symbols create mode 100644 tests/baselines/reference/mergedDeclarations6.types create mode 100644 tests/cases/compiler/mergedDeclarations5.ts create mode 100644 tests/cases/compiler/mergedDeclarations6.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index db3517970d9..9ac7241f14c 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -2487,7 +2487,7 @@ namespace ts { // Every class automatically contains a static property member named 'prototype', // the type of which is an instantiation of the class type with type Any supplied as a type argument for each type parameter. // It is an error to explicitly declare a static property member with the name 'prototype'. - const classType = getDeclaredTypeOfSymbol(getMergedSymbol(prototype.parent)); + const classType = getDeclaredTypeOfSymbol(getParentOfSymbol(prototype)); return classType.typeParameters ? createTypeReference(classType, map(classType.typeParameters, _ => anyType)) : classType; } @@ -5803,8 +5803,8 @@ namespace ts { } else if (targetPropFlags & NodeFlags.Protected) { const sourceDeclaredInClass = sourceProp.parent && sourceProp.parent.flags & SymbolFlags.Class; - const sourceClass = sourceDeclaredInClass ? getDeclaredTypeOfSymbol(sourceProp.parent) : undefined; - const targetClass = getDeclaredTypeOfSymbol(targetProp.parent); + const sourceClass = sourceDeclaredInClass ? getDeclaredTypeOfSymbol(getParentOfSymbol(sourceProp)) : undefined; + const targetClass = getDeclaredTypeOfSymbol(getParentOfSymbol(targetProp)); if (!sourceClass || !hasBaseType(sourceClass, targetClass)) { if (reportErrors) { reportError(Diagnostics.Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2, @@ -8797,7 +8797,7 @@ namespace ts { */ function checkClassPropertyAccess(node: PropertyAccessExpression | QualifiedName, left: Expression | QualifiedName, type: Type, prop: Symbol): boolean { const flags = getDeclarationFlagsFromSymbol(prop); - const declaringClass = getDeclaredTypeOfSymbol(getMergedSymbol(prop.parent)); + const declaringClass = getDeclaredTypeOfSymbol(getParentOfSymbol(prop)); if (left.kind === SyntaxKind.SuperKeyword) { const errorNode = node.kind === SyntaxKind.PropertyAccessExpression ? diff --git a/tests/baselines/reference/mergedDeclarations5.js b/tests/baselines/reference/mergedDeclarations5.js new file mode 100644 index 00000000000..ce4b929c7f9 --- /dev/null +++ b/tests/baselines/reference/mergedDeclarations5.js @@ -0,0 +1,34 @@ +//// [tests/cases/compiler/mergedDeclarations5.ts] //// + +//// [a.ts] +class A { + protected foo() {} +} +//// [b.ts] +interface A { } + +class B extends A { + protected foo() {} +} + +//// [a.js] +var A = (function () { + function A() { + } + A.prototype.foo = function () { }; + return A; +}()); +//// [b.js] +var __extends = (this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +}; +var B = (function (_super) { + __extends(B, _super); + function B() { + _super.apply(this, arguments); + } + B.prototype.foo = function () { }; + return B; +}(A)); diff --git a/tests/baselines/reference/mergedDeclarations5.symbols b/tests/baselines/reference/mergedDeclarations5.symbols new file mode 100644 index 00000000000..abe1743de1c --- /dev/null +++ b/tests/baselines/reference/mergedDeclarations5.symbols @@ -0,0 +1,18 @@ +=== tests/cases/compiler/a.ts === +class A { +>A : Symbol(A, Decl(a.ts, 0, 0), Decl(b.ts, 0, 0)) + + protected foo() {} +>foo : Symbol(foo, Decl(a.ts, 0, 9)) +} +=== tests/cases/compiler/b.ts === +interface A { } +>A : Symbol(A, Decl(a.ts, 0, 0), Decl(b.ts, 0, 0)) + +class B extends A { +>B : Symbol(B, Decl(b.ts, 0, 15)) +>A : Symbol(A, Decl(a.ts, 0, 0), Decl(b.ts, 0, 0)) + + protected foo() {} +>foo : Symbol(foo, Decl(b.ts, 2, 19)) +} diff --git a/tests/baselines/reference/mergedDeclarations5.types b/tests/baselines/reference/mergedDeclarations5.types new file mode 100644 index 00000000000..5c31617a92b --- /dev/null +++ b/tests/baselines/reference/mergedDeclarations5.types @@ -0,0 +1,18 @@ +=== tests/cases/compiler/a.ts === +class A { +>A : A + + protected foo() {} +>foo : () => void +} +=== tests/cases/compiler/b.ts === +interface A { } +>A : A + +class B extends A { +>B : B +>A : A + + protected foo() {} +>foo : () => void +} diff --git a/tests/baselines/reference/mergedDeclarations6.js b/tests/baselines/reference/mergedDeclarations6.js new file mode 100644 index 00000000000..696ad27b2a6 --- /dev/null +++ b/tests/baselines/reference/mergedDeclarations6.js @@ -0,0 +1,57 @@ +//// [tests/cases/compiler/mergedDeclarations6.ts] //// + +//// [a.ts] + +export class A { + protected protected: any; + + protected setProtected(val: any) { + this.protected = val; + } +} + +//// [b.ts] +import {A} from './a'; + +declare module "./a" { + interface A { } +} + +export class B extends A { + protected setProtected() { + + } +} + +//// [a.js] +define(["require", "exports"], function (require, exports) { + "use strict"; + var A = (function () { + function A() { + } + A.prototype.setProtected = function (val) { + this.protected = val; + }; + return A; + }()); + exports.A = A; +}); +//// [b.js] +var __extends = (this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +}; +define(["require", "exports", './a'], function (require, exports, a_1) { + "use strict"; + var B = (function (_super) { + __extends(B, _super); + function B() { + _super.apply(this, arguments); + } + B.prototype.setProtected = function () { + }; + return B; + }(a_1.A)); + exports.B = B; +}); diff --git a/tests/baselines/reference/mergedDeclarations6.symbols b/tests/baselines/reference/mergedDeclarations6.symbols new file mode 100644 index 00000000000..b0d49532384 --- /dev/null +++ b/tests/baselines/reference/mergedDeclarations6.symbols @@ -0,0 +1,38 @@ +=== tests/cases/compiler/a.ts === + +export class A { +>A : Symbol(A, Decl(a.ts, 0, 0), Decl(b.ts, 2, 22)) + + protected protected: any; +>protected : Symbol(protected, Decl(a.ts, 1, 16)) + + protected setProtected(val: any) { +>setProtected : Symbol(setProtected, Decl(a.ts, 2, 29)) +>val : Symbol(val, Decl(a.ts, 4, 27)) + + this.protected = val; +>this.protected : Symbol(protected, Decl(a.ts, 1, 16)) +>this : Symbol(A, Decl(a.ts, 0, 0), Decl(b.ts, 2, 22)) +>protected : Symbol(protected, Decl(a.ts, 1, 16)) +>val : Symbol(val, Decl(a.ts, 4, 27)) + } +} + +=== tests/cases/compiler/b.ts === +import {A} from './a'; +>A : Symbol(A, Decl(b.ts, 0, 8)) + +declare module "./a" { + interface A { } +>A : Symbol(A, Decl(a.ts, 0, 0), Decl(b.ts, 2, 22)) +} + +export class B extends A { +>B : Symbol(B, Decl(b.ts, 4, 1)) +>A : Symbol(A, Decl(b.ts, 0, 8)) + + protected setProtected() { +>setProtected : Symbol(setProtected, Decl(b.ts, 6, 26)) + + } +} diff --git a/tests/baselines/reference/mergedDeclarations6.types b/tests/baselines/reference/mergedDeclarations6.types new file mode 100644 index 00000000000..6198c08f6b5 --- /dev/null +++ b/tests/baselines/reference/mergedDeclarations6.types @@ -0,0 +1,39 @@ +=== tests/cases/compiler/a.ts === + +export class A { +>A : A + + protected protected: any; +>protected : any + + protected setProtected(val: any) { +>setProtected : (val: any) => void +>val : any + + this.protected = val; +>this.protected = val : any +>this.protected : any +>this : this +>protected : any +>val : any + } +} + +=== tests/cases/compiler/b.ts === +import {A} from './a'; +>A : typeof A + +declare module "./a" { + interface A { } +>A : A +} + +export class B extends A { +>B : B +>A : A + + protected setProtected() { +>setProtected : () => void + + } +} diff --git a/tests/cases/compiler/mergedDeclarations5.ts b/tests/cases/compiler/mergedDeclarations5.ts new file mode 100644 index 00000000000..df5734453d3 --- /dev/null +++ b/tests/cases/compiler/mergedDeclarations5.ts @@ -0,0 +1,10 @@ +// @filename: a.ts +class A { + protected foo() {} +} +// @filename: b.ts +interface A { } + +class B extends A { + protected foo() {} +} \ No newline at end of file diff --git a/tests/cases/compiler/mergedDeclarations6.ts b/tests/cases/compiler/mergedDeclarations6.ts new file mode 100644 index 00000000000..406bed518c1 --- /dev/null +++ b/tests/cases/compiler/mergedDeclarations6.ts @@ -0,0 +1,23 @@ +// @module: amd + +// @filename: a.ts +export class A { + protected protected: any; + + protected setProtected(val: any) { + this.protected = val; + } +} + +// @filename: b.ts +import {A} from './a'; + +declare module "./a" { + interface A { } +} + +export class B extends A { + protected setProtected() { + + } +} \ No newline at end of file From f0abb861589a6e66f79ade5970091e8f1becd727 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sun, 31 Jan 2016 08:08:19 -0800 Subject: [PATCH 132/160] Removing MultiLine, Synthetic, DeclarationFile, and OctalLiteral flags --- src/compiler/binder.ts | 2 +- src/compiler/checker.ts | 6 +++--- src/compiler/emitter.ts | 6 +++--- src/compiler/parser.ts | 10 ++++++---- src/compiler/types.ts | 8 ++++---- src/compiler/utilities.ts | 5 ++--- src/services/breakpoints.ts | 2 +- src/services/services.ts | 5 +++-- 8 files changed, 23 insertions(+), 21 deletions(-) diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index cc81f92fbfc..6401c7ed872 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -1110,7 +1110,7 @@ namespace ts { } function checkStrictModeNumericLiteral(node: LiteralExpression) { - if (inStrictMode && node.flags & NodeFlags.OctalLiteral) { + if (inStrictMode && node.isOctalLiteral) { file.bindDiagnostics.push(createDiagnosticForNode(node, Diagnostics.Octal_literals_are_not_allowed_in_strict_mode)); } } diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index db3517970d9..88f000c5a74 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -16749,7 +16749,7 @@ namespace ts { // Grammar checking for computedPropertName and shorthandPropertyAssignment checkGrammarForInvalidQuestionMark(prop, (prop).questionToken, Diagnostics.An_object_member_cannot_be_declared_optional); if (name.kind === SyntaxKind.NumericLiteral) { - checkGrammarNumericLiteral(name); + checkGrammarNumericLiteral(name); } currentKind = Property; } @@ -17250,9 +17250,9 @@ namespace ts { } } - function checkGrammarNumericLiteral(node: Identifier): boolean { + function checkGrammarNumericLiteral(node: LiteralExpression): boolean { // Grammar checking - if (node.flags & NodeFlags.OctalLiteral && languageVersion >= ScriptTarget.ES5) { + if (node.isOctalLiteral && languageVersion >= ScriptTarget.ES5) { return grammarErrorOnNode(node, Diagnostics.Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher); } } diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index a62739e1334..7e4b81db07a 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -1780,7 +1780,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge write("]"); } else { - emitListWithSpread(elements, /*needsUniqueCopy*/ true, /*multiLine*/(node.flags & NodeFlags.MultiLine) !== 0, + emitListWithSpread(elements, /*needsUniqueCopy*/ true, /*multiLine*/ node.multiLine, /*trailingComma*/ elements.hasTrailingComma, /*useConcat*/ true); } } @@ -1803,7 +1803,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge emitLinePreservingList(node, properties, /*allowTrailingComma*/ languageVersion >= ScriptTarget.ES5, /*spacesBetweenBraces*/ true); } else { - const multiLine = (node.flags & NodeFlags.MultiLine) !== 0; + const multiLine = node.multiLine; if (!multiLine) { write(" "); } @@ -1826,7 +1826,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge } function emitDownlevelObjectLiteralWithComputedProperties(node: ObjectLiteralExpression, firstComputedPropertyIndex: number) { - const multiLine = (node.flags & NodeFlags.MultiLine) !== 0; + const multiLine = node.multiLine; const properties = node.properties; write("("); diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 787a022140f..4fd81ed246f 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -666,8 +666,8 @@ namespace ts { sourceFile.bindDiagnostics = []; sourceFile.languageVersion = languageVersion; sourceFile.fileName = normalizePath(fileName); - sourceFile.flags = fileExtensionIs(sourceFile.fileName, ".d.ts") ? NodeFlags.DeclarationFile : 0; sourceFile.languageVariant = getLanguageVariant(sourceFile.fileName); + sourceFile.isDeclarationFile = fileExtensionIs(sourceFile.fileName, ".d.ts"); return sourceFile; } @@ -1922,7 +1922,7 @@ namespace ts { && sourceText.charCodeAt(tokenPos) === CharacterCodes._0 && isOctalDigit(sourceText.charCodeAt(tokenPos + 1))) { - node.flags |= NodeFlags.OctalLiteral; + node.isOctalLiteral = true; } return node; @@ -3907,7 +3907,9 @@ namespace ts { function parseArrayLiteralExpression(): ArrayLiteralExpression { const node = createNode(SyntaxKind.ArrayLiteralExpression); parseExpected(SyntaxKind.OpenBracketToken); - if (scanner.hasPrecedingLineBreak()) node.flags |= NodeFlags.MultiLine; + if (scanner.hasPrecedingLineBreak()) { + node.multiLine = true; + } node.elements = parseDelimitedList(ParsingContext.ArrayLiteralMembers, parseArgumentOrArrayLiteralElement); parseExpected(SyntaxKind.CloseBracketToken); return finishNode(node); @@ -3978,7 +3980,7 @@ namespace ts { const node = createNode(SyntaxKind.ObjectLiteralExpression); parseExpected(SyntaxKind.OpenBraceToken); if (scanner.hasPrecedingLineBreak()) { - node.flags |= NodeFlags.MultiLine; + node.multiLine = true; } node.properties = parseDelimitedList(ParsingContext.ObjectLiteralMembers, parseObjectLiteralElement, /*considerSemicolonAsDelimeter*/ true); diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 5cba4283857..4421a882121 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -381,12 +381,8 @@ namespace ts { Abstract = 1 << 7, // Class/Method/ConstructSignature Async = 1 << 8, // Property/Method/Function Default = 1 << 9, // Function/Class (export default declaration) - MultiLine = 1 << 10, // Multi-line array or object literal - Synthetic = 1 << 11, // Synthetic node (for full fidelity) - DeclarationFile = 1 << 12, // Node is a .d.ts file Let = 1 << 13, // Variable declaration Const = 1 << 14, // Variable declaration - OctalLiteral = 1 << 15, // Octal numeric literal Namespace = 1 << 16, // Namespace declaration ExportContext = 1 << 17, // Export context (initialized by binding) ContainsThis = 1 << 18, // Interface contains references to "this" @@ -938,6 +934,7 @@ namespace ts { text: string; isUnterminated?: boolean; hasExtendedUnicodeEscape?: boolean; + isOctalLiteral?: boolean; } // The text property of a LiteralExpression stores the interpreted value of the literal in text form. For a StringLiteral, @@ -979,6 +976,7 @@ namespace ts { // @kind(SyntaxKind.ArrayLiteralExpression) export interface ArrayLiteralExpression extends PrimaryExpression { elements: NodeArray; + multiLine?: boolean; } // @kind(SyntaxKind.SpreadElementExpression) @@ -990,6 +988,7 @@ namespace ts { // @kind(SyntaxKind.ObjectLiteralExpression) export interface ObjectLiteralExpression extends PrimaryExpression, Declaration { properties: NodeArray; + multiLine?: boolean; } // @kind(SyntaxKind.PropertyAccessExpression) @@ -1546,6 +1545,7 @@ namespace ts { moduleName: string; referencedFiles: FileReference[]; languageVariant: LanguageVariant; + isDeclarationFile: boolean; // this map is used by transpiler to supply alternative names for dependencies (i.e. in case of bundling) /* @internal */ diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index bab66eb0688..7042200ba8e 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -414,7 +414,7 @@ namespace ts { } export function isDeclarationFile(file: SourceFile): boolean { - return (file.flags & NodeFlags.DeclarationFile) !== 0; + return file.isDeclarationFile; } export function isConstEnumDeclaration(node: Node): boolean { @@ -1309,10 +1309,9 @@ namespace ts { export function isInAmbientContext(node: Node): boolean { while (node) { - if (node.flags & (NodeFlags.Ambient | NodeFlags.DeclarationFile)) { + if (node.flags & NodeFlags.Ambient || (node.kind === SyntaxKind.SourceFile && (node as SourceFile).isDeclarationFile)) { return true; } - node = node.parent; } return false; diff --git a/src/services/breakpoints.ts b/src/services/breakpoints.ts index b7e909f69d8..4cd361734e3 100644 --- a/src/services/breakpoints.ts +++ b/src/services/breakpoints.ts @@ -10,7 +10,7 @@ namespace ts.BreakpointResolver { */ export function spanInSourceFileAtLocation(sourceFile: SourceFile, position: number) { // Cannot set breakpoint in dts file - if (sourceFile.flags & NodeFlags.DeclarationFile) { + if (sourceFile.isDeclarationFile) { return undefined; } diff --git a/src/services/services.ts b/src/services/services.ts index cb57d415c66..bbc61a533b1 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -237,14 +237,14 @@ namespace ts { while (pos < end) { const token = scanner.scan(); const textPos = scanner.getTextPos(); - nodes.push(createNode(token, pos, textPos, NodeFlags.Synthetic, this)); + nodes.push(createNode(token, pos, textPos, 0, this)); pos = textPos; } return pos; } private createSyntaxList(nodes: NodeArray): Node { - const list = createNode(SyntaxKind.SyntaxList, nodes.pos, nodes.end, NodeFlags.Synthetic, this); + const list = createNode(SyntaxKind.SyntaxList, nodes.pos, nodes.end, 0, this); list._children = []; let pos = nodes.pos; @@ -797,6 +797,7 @@ namespace ts { public parseDiagnostics: Diagnostic[]; public bindDiagnostics: Diagnostic[]; + public isDeclarationFile: boolean; public isDefaultLib: boolean; public hasNoDefaultLib: boolean; public externalModuleIndicator: Node; // The first node that causes this file to be an external module From 064de382cf347bae70b5e998b9b094aaab0522eb Mon Sep 17 00:00:00 2001 From: zhengbli Date: Sun, 31 Jan 2016 08:13:26 -0800 Subject: [PATCH 133/160] Routine update of lib.d.ts 20160131 --- src/lib/dom.generated.d.ts | 18 ++++++++++++------ src/lib/webworker.generated.d.ts | 11 ++++++----- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/src/lib/dom.generated.d.ts b/src/lib/dom.generated.d.ts index 9970749e5a8..ec71fa78e8d 100644 --- a/src/lib/dom.generated.d.ts +++ b/src/lib/dom.generated.d.ts @@ -378,6 +378,8 @@ interface AudioNode extends EventTarget { numberOfOutputs: number; connect(destination: AudioNode, output?: number, input?: number): void; disconnect(output?: number): void; + disconnect(destination: AudioNode, output?: number, input?: number): void; + disconnect(destination: AudioParam, output?: number): void; } declare var AudioNode: { @@ -6894,7 +6896,7 @@ interface IDBCursor { direction: string; key: any; primaryKey: any; - source: any; + source: IDBObjectStore | IDBIndex; advance(count: number): void; continue(key?: any): void; delete(): IDBRequest; @@ -6932,7 +6934,7 @@ interface IDBDatabase extends EventTarget { close(): void; createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore; deleteObjectStore(name: string): void; - transaction(storeNames: any, mode?: string): IDBTransaction; + transaction(storeNames: string | string[], mode?: string): IDBTransaction; addEventListener(type: "abort", listener: (ev: Event) => any, useCapture?: boolean): void; addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -6990,9 +6992,10 @@ declare var IDBKeyRange: { interface IDBObjectStore { indexNames: DOMStringList; - keyPath: string; + keyPath: string | string[]; name: string; transaction: IDBTransaction; + autoIncrement: boolean; add(value: any, key?: any): IDBRequest; clear(): IDBRequest; count(key?: any): IDBRequest; @@ -7031,7 +7034,7 @@ interface IDBRequest extends EventTarget { onsuccess: (ev: Event) => any; readyState: string; result: any; - source: any; + source: IDBObjectStore | IDBIndex | IDBCursor; transaction: IDBTransaction; addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void; addEventListener(type: "success", listener: (ev: Event) => any, useCapture?: boolean): void; @@ -10218,11 +10221,14 @@ declare var SVGViewElement: { } interface SVGZoomAndPan { + zoomAndPan: number; +} + +declare var SVGZoomAndPan: { SVG_ZOOMANDPAN_DISABLE: number; SVG_ZOOMANDPAN_MAGNIFY: number; SVG_ZOOMANDPAN_UNKNOWN: number; } -declare var SVGZoomAndPan: SVGZoomAndPan; interface SVGZoomEvent extends UIEvent { newScale: number; @@ -12685,7 +12691,7 @@ interface DecodeSuccessCallback { (decodedData: AudioBuffer): void; } interface DecodeErrorCallback { - (): void; + (error: DOMException): void; } interface FunctionStringCallback { (data: string): void; diff --git a/src/lib/webworker.generated.d.ts b/src/lib/webworker.generated.d.ts index d2008542cc6..cd49a565f12 100644 --- a/src/lib/webworker.generated.d.ts +++ b/src/lib/webworker.generated.d.ts @@ -275,7 +275,7 @@ interface IDBCursor { direction: string; key: any; primaryKey: any; - source: any; + source: IDBObjectStore | IDBIndex; advance(count: number): void; continue(key?: any): void; delete(): IDBRequest; @@ -313,7 +313,7 @@ interface IDBDatabase extends EventTarget { close(): void; createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore; deleteObjectStore(name: string): void; - transaction(storeNames: any, mode?: string): IDBTransaction; + transaction(storeNames: string | string[], mode?: string): IDBTransaction; addEventListener(type: "abort", listener: (ev: Event) => any, useCapture?: boolean): void; addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -371,9 +371,10 @@ declare var IDBKeyRange: { interface IDBObjectStore { indexNames: DOMStringList; - keyPath: string; + keyPath: string | string[]; name: string; transaction: IDBTransaction; + autoIncrement: boolean; add(value: any, key?: any): IDBRequest; clear(): IDBRequest; count(key?: any): IDBRequest; @@ -412,7 +413,7 @@ interface IDBRequest extends EventTarget { onsuccess: (ev: Event) => any; readyState: string; result: any; - source: any; + source: IDBObjectStore | IDBIndex | IDBCursor; transaction: IDBTransaction; addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void; addEventListener(type: "success", listener: (ev: Event) => any, useCapture?: boolean): void; @@ -959,7 +960,7 @@ interface DecodeSuccessCallback { (decodedData: AudioBuffer): void; } interface DecodeErrorCallback { - (): void; + (error: DOMException): void; } interface FunctionStringCallback { (data: string): void; From 83859c0d91b3fb23ed5e7588d79de3a6bbae6b00 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sun, 31 Jan 2016 08:45:14 -0800 Subject: [PATCH 134/160] Merge ParserContextFlags into NodeFlags --- src/compiler/checker.ts | 16 ++++----- src/compiler/parser.ts | 58 ++++++++++++++++---------------- src/compiler/types.ts | 69 ++++++++++++--------------------------- src/compiler/utilities.ts | 14 ++++---- src/harness/harness.ts | 2 +- 5 files changed, 66 insertions(+), 93 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 88f000c5a74..fafcffbe582 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -2634,7 +2634,7 @@ namespace ts { // Return the inferred type for a variable, parameter, or property declaration function getTypeForVariableLikeDeclaration(declaration: VariableLikeDeclaration): Type { - if (declaration.parserContextFlags & ParserContextFlags.JavaScriptFile) { + if (declaration.parserContextFlags & NodeFlags.JavaScriptFile) { // If this is a variable in a JavaScript file, then use the JSDoc type (if it has // one as its type), otherwise fallback to the below standard TS codepaths to // try to figure it out. @@ -3981,7 +3981,7 @@ namespace ts { } function getTypeParametersFromJSDocTemplate(declaration: SignatureDeclaration): TypeParameter[] { - if (declaration.parserContextFlags & ParserContextFlags.JavaScriptFile) { + if (declaration.parserContextFlags & NodeFlags.JavaScriptFile) { const templateTag = getJSDocTemplateTag(declaration); if (templateTag) { return getTypeParametersFromDeclaration(templateTag.typeParameters); @@ -4015,7 +4015,7 @@ namespace ts { } function isOptionalParameter(node: ParameterDeclaration) { - if (node.parserContextFlags & ParserContextFlags.JavaScriptFile) { + if (node.parserContextFlags & NodeFlags.JavaScriptFile) { if (node.type && node.type.kind === SyntaxKind.JSDocOptionalType) { return true; } @@ -4124,7 +4124,7 @@ namespace ts { returnType = getTypeFromTypeNode(declaration.type); } else { - if (declaration.parserContextFlags & ParserContextFlags.JavaScriptFile) { + if (declaration.parserContextFlags & NodeFlags.JavaScriptFile) { const type = getReturnTypeFromJSDocComment(declaration); if (type && type !== unknownType) { returnType = type; @@ -7183,7 +7183,7 @@ namespace ts { } } - if (node.parserContextFlags & ParserContextFlags.Await) { + if (node.parserContextFlags & NodeFlags.Await) { getNodeLinks(container).flags |= NodeCheckFlags.CaptureArguments; } } @@ -10783,7 +10783,7 @@ namespace ts { function checkAwaitExpression(node: AwaitExpression): Type { // Grammar checking if (produceDiagnostics) { - if (!(node.parserContextFlags & ParserContextFlags.Await)) { + if (!(node.parserContextFlags & NodeFlags.Await)) { grammarErrorOnFirstToken(node, Diagnostics.await_expression_is_only_allowed_within_an_async_function); } @@ -11239,7 +11239,7 @@ namespace ts { function checkYieldExpression(node: YieldExpression): Type { // Grammar checking if (produceDiagnostics) { - if (!(node.parserContextFlags & ParserContextFlags.Yield) || isYieldExpressionInClass(node)) { + if (!(node.parserContextFlags & NodeFlags.Yield) || isYieldExpressionInClass(node)) { grammarErrorOnFirstToken(node, Diagnostics.A_yield_expression_is_only_allowed_in_a_generator_body); } @@ -13701,7 +13701,7 @@ namespace ts { function checkWithStatement(node: WithStatement) { // Grammar checking for withStatement if (!checkGrammarStatementInAmbientContext(node)) { - if (node.parserContextFlags & ParserContextFlags.Await) { + if (node.parserContextFlags & NodeFlags.Await) { grammarErrorOnFirstToken(node, Diagnostics.with_statements_are_not_allowed_in_an_async_function_block); } } diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 4fd81ed246f..bbf1c2bddac 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -438,7 +438,7 @@ namespace ts { // Share a single scanner across all calls to parse a source file. This helps speed things // up by avoiding the cost of creating/compiling scanners over and over again. const scanner = createScanner(ScriptTarget.Latest, /*skipTrivia*/ true); - const disallowInAndDecoratorContext = ParserContextFlags.DisallowIn | ParserContextFlags.Decorator; + const disallowInAndDecoratorContext = NodeFlags.DisallowIn | NodeFlags.Decorator; // capture constructors in 'initializeState' to avoid null checks let NodeConstructor: new (kind: SyntaxKind, pos: number, end: number) => Node; @@ -502,7 +502,7 @@ namespace ts { // Note: it should not be necessary to save/restore these flags during speculative/lookahead // parsing. These context flags are naturally stored and restored through normal recursive // descent parsing and unwinding. - let contextFlags: ParserContextFlags; + let contextFlags: NodeFlags; // Whether or not we've had a parse error since creating the last AST node. If we have // encountered an error, it will be stored on the next AST node we create. Parse errors @@ -562,7 +562,7 @@ namespace ts { identifierCount = 0; nodeCount = 0; - contextFlags = isJavaScriptFile ? ParserContextFlags.JavaScriptFile : ParserContextFlags.None; + contextFlags = isJavaScriptFile ? NodeFlags.JavaScriptFile : NodeFlags.None; parseErrorBeforeNextFinishedNode = false; // Initialize and prime the scanner before parsing the source elements. @@ -588,8 +588,8 @@ namespace ts { function parseSourceFileWorker(fileName: string, languageVersion: ScriptTarget, setParentNodes: boolean): SourceFile { sourceFile = createSourceFile(fileName, languageVersion); - if (contextFlags & ParserContextFlags.JavaScriptFile) { - sourceFile.parserContextFlags = ParserContextFlags.JavaScriptFile; + if (contextFlags & NodeFlags.JavaScriptFile) { + sourceFile.parserContextFlags = NodeFlags.JavaScriptFile; } // Prime the scanner. @@ -616,7 +616,7 @@ namespace ts { function addJSDocComment(node: T): T { - if (contextFlags & ParserContextFlags.JavaScriptFile) { + if (contextFlags & NodeFlags.JavaScriptFile) { const comments = getLeadingCommentRangesOfNode(node, sourceFile); if (comments) { for (const comment of comments) { @@ -672,7 +672,7 @@ namespace ts { return sourceFile; } - function setContextFlag(val: boolean, flag: ParserContextFlags) { + function setContextFlag(val: boolean, flag: NodeFlags) { if (val) { contextFlags |= flag; } @@ -682,22 +682,22 @@ namespace ts { } function setDisallowInContext(val: boolean) { - setContextFlag(val, ParserContextFlags.DisallowIn); + setContextFlag(val, NodeFlags.DisallowIn); } function setYieldContext(val: boolean) { - setContextFlag(val, ParserContextFlags.Yield); + setContextFlag(val, NodeFlags.Yield); } function setDecoratorContext(val: boolean) { - setContextFlag(val, ParserContextFlags.Decorator); + setContextFlag(val, NodeFlags.Decorator); } function setAwaitContext(val: boolean) { - setContextFlag(val, ParserContextFlags.Await); + setContextFlag(val, NodeFlags.Await); } - function doOutsideOfContext(context: ParserContextFlags, func: () => T): T { + function doOutsideOfContext(context: NodeFlags, func: () => T): T { // contextFlagsToClear will contain only the context flags that are // currently set that we need to temporarily clear // We don't just blindly reset to the previous flags to ensure @@ -718,7 +718,7 @@ namespace ts { return func(); } - function doInsideOfContext(context: ParserContextFlags, func: () => T): T { + function doInsideOfContext(context: NodeFlags, func: () => T): T { // contextFlagsToSet will contain only the context flags that // are not currently set that we need to temporarily enable. // We don't just blindly reset to the previous flags to ensure @@ -740,51 +740,51 @@ namespace ts { } function allowInAnd(func: () => T): T { - return doOutsideOfContext(ParserContextFlags.DisallowIn, func); + return doOutsideOfContext(NodeFlags.DisallowIn, func); } function disallowInAnd(func: () => T): T { - return doInsideOfContext(ParserContextFlags.DisallowIn, func); + return doInsideOfContext(NodeFlags.DisallowIn, func); } function doInYieldContext(func: () => T): T { - return doInsideOfContext(ParserContextFlags.Yield, func); + return doInsideOfContext(NodeFlags.Yield, func); } function doInDecoratorContext(func: () => T): T { - return doInsideOfContext(ParserContextFlags.Decorator, func); + return doInsideOfContext(NodeFlags.Decorator, func); } function doInAwaitContext(func: () => T): T { - return doInsideOfContext(ParserContextFlags.Await, func); + return doInsideOfContext(NodeFlags.Await, func); } function doOutsideOfAwaitContext(func: () => T): T { - return doOutsideOfContext(ParserContextFlags.Await, func); + return doOutsideOfContext(NodeFlags.Await, func); } function doInYieldAndAwaitContext(func: () => T): T { - return doInsideOfContext(ParserContextFlags.Yield | ParserContextFlags.Await, func); + return doInsideOfContext(NodeFlags.Yield | NodeFlags.Await, func); } - function inContext(flags: ParserContextFlags) { + function inContext(flags: NodeFlags) { return (contextFlags & flags) !== 0; } function inYieldContext() { - return inContext(ParserContextFlags.Yield); + return inContext(NodeFlags.Yield); } function inDisallowInContext() { - return inContext(ParserContextFlags.DisallowIn); + return inContext(NodeFlags.DisallowIn); } function inDecoratorContext() { - return inContext(ParserContextFlags.Decorator); + return inContext(NodeFlags.Decorator); } function inAwaitContext() { - return inContext(ParserContextFlags.Await); + return inContext(NodeFlags.Await); } function parseErrorAtCurrentToken(message: DiagnosticMessage, arg0?: any): void { @@ -1004,7 +1004,7 @@ namespace ts { // flag so that we don't mark any subsequent nodes. if (parseErrorBeforeNextFinishedNode) { parseErrorBeforeNextFinishedNode = false; - node.parserContextFlags |= ParserContextFlags.ThisNodeHasError; + node.parserContextFlags |= NodeFlags.ThisNodeHasError; } return node; @@ -1453,7 +1453,7 @@ namespace ts { // differently depending on what mode it is in. // // This also applies to all our other context flags as well. - const nodeContextFlags = node.parserContextFlags & ParserContextFlags.ParserGeneratedFlags; + const nodeContextFlags = node.parserContextFlags & NodeFlags.ParserGeneratedFlags; if (nodeContextFlags !== contextFlags) { return undefined; } @@ -2512,7 +2512,7 @@ namespace ts { function parseType(): TypeNode { // The rules about 'yield' only apply to actual code/expression contexts. They don't // apply to 'type' contexts. So we disable these parameters here before moving on. - return doOutsideOfContext(ParserContextFlags.TypeExcludesFlags, parseTypeWorker); + return doOutsideOfContext(NodeFlags.TypeExcludesFlags, parseTypeWorker); } function parseTypeWorker(): TypeNode { @@ -4785,7 +4785,7 @@ namespace ts { // The checker may still error in the static case to explicitly disallow the yield expression. property.initializer = modifiers && modifiers.flags & NodeFlags.Static ? allowInAnd(parseNonParameterInitializer) - : doOutsideOfContext(ParserContextFlags.Yield | ParserContextFlags.DisallowIn, parseNonParameterInitializer); + : doOutsideOfContext(NodeFlags.Yield | NodeFlags.DisallowIn, parseNonParameterInitializer); parseSemicolon(); return finishNode(property); diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 4421a882121..4b619041cb8 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -381,18 +381,26 @@ namespace ts { Abstract = 1 << 7, // Class/Method/ConstructSignature Async = 1 << 8, // Property/Method/Function Default = 1 << 9, // Function/Class (export default declaration) - Let = 1 << 13, // Variable declaration - Const = 1 << 14, // Variable declaration - Namespace = 1 << 16, // Namespace declaration - ExportContext = 1 << 17, // Export context (initialized by binding) - ContainsThis = 1 << 18, // Interface contains references to "this" - HasImplicitReturn = 1 << 19, // If function implicitly returns on one of codepaths (initialized by binding) - HasExplicitReturn = 1 << 20, // If function has explicit reachable return on one of codepaths (initialized by binding) - GlobalAugmentation = 1 << 21, // Set if module declaration is an augmentation for the global scope - HasClassExtends = 1 << 22, // If the file has a non-ambient class with an extends clause in ES5 or lower (initialized by binding) - HasDecorators = 1 << 23, // If the file has decorators (initialized by binding) - HasParamDecorators = 1 << 24, // If the file has parameter decorators (initialized by binding) - HasAsyncFunctions = 1 << 25, // If the file has async functions (initialized by binding) + Let = 1 << 10, // Variable declaration + Const = 1 << 11, // Variable declaration + Namespace = 1 << 12, // Namespace declaration + ExportContext = 1 << 13, // Export context (initialized by binding) + ContainsThis = 1 << 14, // Interface contains references to "this" + HasImplicitReturn = 1 << 15, // If function implicitly returns on one of codepaths (initialized by binding) + HasExplicitReturn = 1 << 16, // If function has explicit reachable return on one of codepaths (initialized by binding) + GlobalAugmentation = 1 << 17, // Set if module declaration is an augmentation for the global scope + HasClassExtends = 1 << 18, // If the file has a non-ambient class with an extends clause in ES5 or lower (initialized by binding) + HasDecorators = 1 << 19, // If the file has decorators (initialized by binding) + HasParamDecorators = 1 << 20, // If the file has parameter decorators (initialized by binding) + HasAsyncFunctions = 1 << 21, // If the file has async functions (initialized by binding) + DisallowIn = 1 << 22, // If node was parsed in a context where 'in-expressions' are not allowed + Yield = 1 << 23, // If node was parsed in the 'yield' context created when parsing a generator + Decorator = 1 << 24, // If node was parsed as part of a decorator + Await = 1 << 25, // If node was parsed in the 'await' context created when parsing an async function + ThisNodeHasError = 1 << 26, // If the parser encountered an error when parsing the code that created this node + JavaScriptFile = 1 << 27, // If node was parsed in a JavaScript + ThisNodeOrAnySubNodesHasError = 1 << 28, // If this node or any of its children had an error + HasAggregatedChildData = 1 << 29, // If we've computed data from children and cached it in this node Modifier = Export | Ambient | Public | Private | Protected | Static | Abstract | Default | Async, AccessibilityModifier = Public | Private | Protected, @@ -400,47 +408,12 @@ namespace ts { ReachabilityCheckFlags = HasImplicitReturn | HasExplicitReturn, EmitHelperFlags = HasClassExtends | HasDecorators | HasParamDecorators | HasAsyncFunctions, - } - - /* @internal */ - export const enum ParserContextFlags { - None = 0, - - // If this node was parsed in a context where 'in-expressions' are not allowed. - DisallowIn = 1 << 0, - - // If this node was parsed in the 'yield' context created when parsing a generator. - Yield = 1 << 1, - - // If this node was parsed as part of a decorator - Decorator = 1 << 2, - - // If this node was parsed in the 'await' context created when parsing an async function. - Await = 1 << 3, - - // If the parser encountered an error when parsing the code that created this node. Note - // the parser only sets this directly on the node it creates right after encountering the - // error. - ThisNodeHasError = 1 << 4, - - // This node was parsed in a JavaScript file and can be processed differently. For example - // its type can be specified usign a JSDoc comment. - JavaScriptFile = 1 << 5, // Context flags set directly by the parser. ParserGeneratedFlags = DisallowIn | Yield | Decorator | ThisNodeHasError | Await, // Exclude these flags when parsing a Type TypeExcludesFlags = Yield | Await, - - // Context flags computed by aggregating child flags upwards. - - // Used during incremental parsing to determine if this node or any of its children had an - // error. Computed only once and then cached. - ThisNodeOrAnySubNodesHasError = 1 << 6, - - // Used to know if we've computed data from children and cached it in this node. - HasAggregatedChildData = 1 << 7 } export const enum JsxFlags { @@ -470,7 +443,7 @@ namespace ts { flags: NodeFlags; // Specific context the parser was in when this node was created. Normally undefined. // Only set when the parser was in some interesting context (like async/yield). - /* @internal */ parserContextFlags?: ParserContextFlags; + /* @internal */ parserContextFlags?: NodeFlags; decorators?: NodeArray; // Array of decorators (in document order) modifiers?: ModifiersArray; // Array of modifiers /* @internal */ id?: number; // Unique id (used to look up NodeLinks) diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 7042200ba8e..9cb1b7e784e 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -121,26 +121,26 @@ namespace ts { // Returns true if this node contains a parse error anywhere underneath it. export function containsParseError(node: Node): boolean { aggregateChildData(node); - return (node.parserContextFlags & ParserContextFlags.ThisNodeOrAnySubNodesHasError) !== 0; + return (node.parserContextFlags & NodeFlags.ThisNodeOrAnySubNodesHasError) !== 0; } function aggregateChildData(node: Node): void { - if (!(node.parserContextFlags & ParserContextFlags.HasAggregatedChildData)) { + if (!(node.parserContextFlags & NodeFlags.HasAggregatedChildData)) { // A node is considered to contain a parse error if: // a) the parser explicitly marked that it had an error // b) any of it's children reported that it had an error. - const thisNodeOrAnySubNodesHasError = ((node.parserContextFlags & ParserContextFlags.ThisNodeHasError) !== 0) || + const thisNodeOrAnySubNodesHasError = ((node.parserContextFlags & NodeFlags.ThisNodeHasError) !== 0) || forEachChild(node, containsParseError); // If so, mark ourselves accordingly. if (thisNodeOrAnySubNodesHasError) { - node.parserContextFlags |= ParserContextFlags.ThisNodeOrAnySubNodesHasError; + node.parserContextFlags |= NodeFlags.ThisNodeOrAnySubNodesHasError; } // Also mark that we've propogated the child information to this node. This way we can // always consult the bit directly on this node without needing to check its children // again. - node.parserContextFlags |= ParserContextFlags.HasAggregatedChildData; + node.parserContextFlags |= NodeFlags.HasAggregatedChildData; } } @@ -1078,7 +1078,7 @@ namespace ts { } export function isInJavaScriptFile(node: Node): boolean { - return node && !!(node.parserContextFlags & ParserContextFlags.JavaScriptFile); + return node && !!(node.parserContextFlags & NodeFlags.JavaScriptFile); } /** @@ -1266,7 +1266,7 @@ namespace ts { export function isRestParameter(node: ParameterDeclaration) { if (node) { - if (node.parserContextFlags & ParserContextFlags.JavaScriptFile) { + if (node.parserContextFlags & NodeFlags.JavaScriptFile) { if (node.type && node.type.kind === SyntaxKind.JSDocVariadicType) { return true; } diff --git a/src/harness/harness.ts b/src/harness/harness.ts index 2b0c95c0a61..6bc46667fed 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -284,7 +284,7 @@ namespace Utils { // Clear the flag that are produced by aggregating child values.. That is ephemeral // data we don't care about in the dump. We only care what the parser set directly // on the ast. - let value = n.parserContextFlags & ts.ParserContextFlags.ParserGeneratedFlags; + let value = n.parserContextFlags & ts.NodeFlags.ParserGeneratedFlags; if (value) { o[propertyName] = getParserContextFlagName(value); } From f4ee49f24e05a4a0f946194eb3890d39690f1c59 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sun, 31 Jan 2016 08:57:32 -0800 Subject: [PATCH 135/160] Renaming parsing context flags to NodeFlags.xxxContext --- src/compiler/checker.ts | 8 ++++---- src/compiler/parser.ts | 34 +++++++++++++++++----------------- src/compiler/types.ts | 12 ++++++------ 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index fafcffbe582..91ce1be5d74 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -7183,7 +7183,7 @@ namespace ts { } } - if (node.parserContextFlags & NodeFlags.Await) { + if (node.parserContextFlags & NodeFlags.AwaitContext) { getNodeLinks(container).flags |= NodeCheckFlags.CaptureArguments; } } @@ -10783,7 +10783,7 @@ namespace ts { function checkAwaitExpression(node: AwaitExpression): Type { // Grammar checking if (produceDiagnostics) { - if (!(node.parserContextFlags & NodeFlags.Await)) { + if (!(node.parserContextFlags & NodeFlags.AwaitContext)) { grammarErrorOnFirstToken(node, Diagnostics.await_expression_is_only_allowed_within_an_async_function); } @@ -11239,7 +11239,7 @@ namespace ts { function checkYieldExpression(node: YieldExpression): Type { // Grammar checking if (produceDiagnostics) { - if (!(node.parserContextFlags & NodeFlags.Yield) || isYieldExpressionInClass(node)) { + if (!(node.parserContextFlags & NodeFlags.YieldContext) || isYieldExpressionInClass(node)) { grammarErrorOnFirstToken(node, Diagnostics.A_yield_expression_is_only_allowed_in_a_generator_body); } @@ -13701,7 +13701,7 @@ namespace ts { function checkWithStatement(node: WithStatement) { // Grammar checking for withStatement if (!checkGrammarStatementInAmbientContext(node)) { - if (node.parserContextFlags & NodeFlags.Await) { + if (node.parserContextFlags & NodeFlags.AwaitContext) { grammarErrorOnFirstToken(node, Diagnostics.with_statements_are_not_allowed_in_an_async_function_block); } } diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index bbf1c2bddac..d52d1272697 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -438,7 +438,7 @@ namespace ts { // Share a single scanner across all calls to parse a source file. This helps speed things // up by avoiding the cost of creating/compiling scanners over and over again. const scanner = createScanner(ScriptTarget.Latest, /*skipTrivia*/ true); - const disallowInAndDecoratorContext = NodeFlags.DisallowIn | NodeFlags.Decorator; + const disallowInAndDecoratorContext = NodeFlags.DisallowInContext | NodeFlags.DecoratorContext; // capture constructors in 'initializeState' to avoid null checks let NodeConstructor: new (kind: SyntaxKind, pos: number, end: number) => Node; @@ -682,19 +682,19 @@ namespace ts { } function setDisallowInContext(val: boolean) { - setContextFlag(val, NodeFlags.DisallowIn); + setContextFlag(val, NodeFlags.DisallowInContext); } function setYieldContext(val: boolean) { - setContextFlag(val, NodeFlags.Yield); + setContextFlag(val, NodeFlags.YieldContext); } function setDecoratorContext(val: boolean) { - setContextFlag(val, NodeFlags.Decorator); + setContextFlag(val, NodeFlags.DecoratorContext); } function setAwaitContext(val: boolean) { - setContextFlag(val, NodeFlags.Await); + setContextFlag(val, NodeFlags.AwaitContext); } function doOutsideOfContext(context: NodeFlags, func: () => T): T { @@ -740,31 +740,31 @@ namespace ts { } function allowInAnd(func: () => T): T { - return doOutsideOfContext(NodeFlags.DisallowIn, func); + return doOutsideOfContext(NodeFlags.DisallowInContext, func); } function disallowInAnd(func: () => T): T { - return doInsideOfContext(NodeFlags.DisallowIn, func); + return doInsideOfContext(NodeFlags.DisallowInContext, func); } function doInYieldContext(func: () => T): T { - return doInsideOfContext(NodeFlags.Yield, func); + return doInsideOfContext(NodeFlags.YieldContext, func); } function doInDecoratorContext(func: () => T): T { - return doInsideOfContext(NodeFlags.Decorator, func); + return doInsideOfContext(NodeFlags.DecoratorContext, func); } function doInAwaitContext(func: () => T): T { - return doInsideOfContext(NodeFlags.Await, func); + return doInsideOfContext(NodeFlags.AwaitContext, func); } function doOutsideOfAwaitContext(func: () => T): T { - return doOutsideOfContext(NodeFlags.Await, func); + return doOutsideOfContext(NodeFlags.AwaitContext, func); } function doInYieldAndAwaitContext(func: () => T): T { - return doInsideOfContext(NodeFlags.Yield | NodeFlags.Await, func); + return doInsideOfContext(NodeFlags.YieldContext | NodeFlags.AwaitContext, func); } function inContext(flags: NodeFlags) { @@ -772,19 +772,19 @@ namespace ts { } function inYieldContext() { - return inContext(NodeFlags.Yield); + return inContext(NodeFlags.YieldContext); } function inDisallowInContext() { - return inContext(NodeFlags.DisallowIn); + return inContext(NodeFlags.DisallowInContext); } function inDecoratorContext() { - return inContext(NodeFlags.Decorator); + return inContext(NodeFlags.DecoratorContext); } function inAwaitContext() { - return inContext(NodeFlags.Await); + return inContext(NodeFlags.AwaitContext); } function parseErrorAtCurrentToken(message: DiagnosticMessage, arg0?: any): void { @@ -4785,7 +4785,7 @@ namespace ts { // The checker may still error in the static case to explicitly disallow the yield expression. property.initializer = modifiers && modifiers.flags & NodeFlags.Static ? allowInAnd(parseNonParameterInitializer) - : doOutsideOfContext(NodeFlags.Yield | NodeFlags.DisallowIn, parseNonParameterInitializer); + : doOutsideOfContext(NodeFlags.YieldContext | NodeFlags.DisallowInContext, parseNonParameterInitializer); parseSemicolon(); return finishNode(property); diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 4b619041cb8..3e5ac5094dd 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -393,10 +393,10 @@ namespace ts { HasDecorators = 1 << 19, // If the file has decorators (initialized by binding) HasParamDecorators = 1 << 20, // If the file has parameter decorators (initialized by binding) HasAsyncFunctions = 1 << 21, // If the file has async functions (initialized by binding) - DisallowIn = 1 << 22, // If node was parsed in a context where 'in-expressions' are not allowed - Yield = 1 << 23, // If node was parsed in the 'yield' context created when parsing a generator - Decorator = 1 << 24, // If node was parsed as part of a decorator - Await = 1 << 25, // If node was parsed in the 'await' context created when parsing an async function + DisallowInContext = 1 << 22, // If node was parsed in a context where 'in-expressions' are not allowed + YieldContext = 1 << 23, // If node was parsed in the 'yield' context created when parsing a generator + DecoratorContext = 1 << 24, // If node was parsed as part of a decorator + AwaitContext = 1 << 25, // If node was parsed in the 'await' context created when parsing an async function ThisNodeHasError = 1 << 26, // If the parser encountered an error when parsing the code that created this node JavaScriptFile = 1 << 27, // If node was parsed in a JavaScript ThisNodeOrAnySubNodesHasError = 1 << 28, // If this node or any of its children had an error @@ -410,10 +410,10 @@ namespace ts { EmitHelperFlags = HasClassExtends | HasDecorators | HasParamDecorators | HasAsyncFunctions, // Context flags set directly by the parser. - ParserGeneratedFlags = DisallowIn | Yield | Decorator | ThisNodeHasError | Await, + ParserGeneratedFlags = DisallowInContext | YieldContext | DecoratorContext | ThisNodeHasError | AwaitContext, // Exclude these flags when parsing a Type - TypeExcludesFlags = Yield | Await, + TypeExcludesFlags = YieldContext | AwaitContext, } export const enum JsxFlags { From 4d2cd6f88bc0e1c4fde15e9fe5494136428b4b37 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Sun, 31 Jan 2016 12:10:33 -0800 Subject: [PATCH 136/160] properly dotted namespace names in System modules --- src/compiler/emitter.ts | 4 +-- .../reference/dottedNamesInSystem.js | 35 +++++++++++++++++++ .../reference/dottedNamesInSystem.symbols | 22 ++++++++++++ .../reference/dottedNamesInSystem.types | 23 ++++++++++++ tests/cases/compiler/dottedNamesInSystem.ts | 8 +++++ 5 files changed, 90 insertions(+), 2 deletions(-) create mode 100644 tests/baselines/reference/dottedNamesInSystem.js create mode 100644 tests/baselines/reference/dottedNamesInSystem.symbols create mode 100644 tests/baselines/reference/dottedNamesInSystem.types create mode 100644 tests/cases/compiler/dottedNamesInSystem.ts diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index a62739e1334..98ad7c874d6 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -2583,12 +2583,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge return false; } - let current: Node = node; + let current = getRootDeclaration(node).parent; while (current) { if (current.kind === SyntaxKind.SourceFile) { return !isExported || ((getCombinedNodeFlags(node) & NodeFlags.Export) !== 0); } - else if (isFunctionLike(current) || current.kind === SyntaxKind.ModuleBlock) { + else if (isDeclaration(current)) { return false; } else { diff --git a/tests/baselines/reference/dottedNamesInSystem.js b/tests/baselines/reference/dottedNamesInSystem.js new file mode 100644 index 00000000000..4f1814f393d --- /dev/null +++ b/tests/baselines/reference/dottedNamesInSystem.js @@ -0,0 +1,35 @@ +//// [dottedNamesInSystem.ts] +export namespace A.B.C { + export function foo() {} +} + +export function bar() { + return A.B.C.foo(); +} + +//// [dottedNamesInSystem.js] +System.register([], function(exports_1, context_1) { + "use strict"; + var __moduleName = context_1 && context_1.id; + var A; + function bar() { + return A.B.C.foo(); + } + exports_1("bar", bar); + return { + setters:[], + execute: function() { + (function (A) { + var B; + (function (B) { + var C; + (function (C) { + function foo() { } + C.foo = foo; + })(C = B.C || (B.C = {})); + })(B = A.B || (A.B = {})); + })(A = A || (A = {})); + exports_1("A", A); + } + } +}); diff --git a/tests/baselines/reference/dottedNamesInSystem.symbols b/tests/baselines/reference/dottedNamesInSystem.symbols new file mode 100644 index 00000000000..bfbc57ed1ba --- /dev/null +++ b/tests/baselines/reference/dottedNamesInSystem.symbols @@ -0,0 +1,22 @@ +=== tests/cases/compiler/dottedNamesInSystem.ts === +export namespace A.B.C { +>A : Symbol(A, Decl(dottedNamesInSystem.ts, 0, 0)) +>B : Symbol(B, Decl(dottedNamesInSystem.ts, 0, 19)) +>C : Symbol(C, Decl(dottedNamesInSystem.ts, 0, 21)) + + export function foo() {} +>foo : Symbol(foo, Decl(dottedNamesInSystem.ts, 0, 24)) +} + +export function bar() { +>bar : Symbol(bar, Decl(dottedNamesInSystem.ts, 2, 1)) + + return A.B.C.foo(); +>A.B.C.foo : Symbol(A.B.C.foo, Decl(dottedNamesInSystem.ts, 0, 24)) +>A.B.C : Symbol(A.B.C, Decl(dottedNamesInSystem.ts, 0, 21)) +>A.B : Symbol(A.B, Decl(dottedNamesInSystem.ts, 0, 19)) +>A : Symbol(A, Decl(dottedNamesInSystem.ts, 0, 0)) +>B : Symbol(A.B, Decl(dottedNamesInSystem.ts, 0, 19)) +>C : Symbol(A.B.C, Decl(dottedNamesInSystem.ts, 0, 21)) +>foo : Symbol(A.B.C.foo, Decl(dottedNamesInSystem.ts, 0, 24)) +} diff --git a/tests/baselines/reference/dottedNamesInSystem.types b/tests/baselines/reference/dottedNamesInSystem.types new file mode 100644 index 00000000000..78de0e33883 --- /dev/null +++ b/tests/baselines/reference/dottedNamesInSystem.types @@ -0,0 +1,23 @@ +=== tests/cases/compiler/dottedNamesInSystem.ts === +export namespace A.B.C { +>A : typeof A +>B : typeof B +>C : typeof C + + export function foo() {} +>foo : () => void +} + +export function bar() { +>bar : () => void + + return A.B.C.foo(); +>A.B.C.foo() : void +>A.B.C.foo : () => void +>A.B.C : typeof A.B.C +>A.B : typeof A.B +>A : typeof A +>B : typeof A.B +>C : typeof A.B.C +>foo : () => void +} diff --git a/tests/cases/compiler/dottedNamesInSystem.ts b/tests/cases/compiler/dottedNamesInSystem.ts new file mode 100644 index 00000000000..43b8eb233b9 --- /dev/null +++ b/tests/cases/compiler/dottedNamesInSystem.ts @@ -0,0 +1,8 @@ +// @module: system +export namespace A.B.C { + export function foo() {} +} + +export function bar() { + return A.B.C.foo(); +} \ No newline at end of file From 4421c52b83db2e747b53e623c1994d31c393e3b0 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sun, 31 Jan 2016 14:00:54 -0800 Subject: [PATCH 137/160] Remove parserContextFlags from Node type --- src/compiler/checker.ts | 16 ++++++++-------- src/compiler/parser.ts | 11 ++++------- src/compiler/types.ts | 7 ++----- src/compiler/utilities.ts | 14 +++++++------- src/harness/harness.ts | 23 +++++++---------------- 5 files changed, 28 insertions(+), 43 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 91ce1be5d74..afbb77a08a4 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -2634,7 +2634,7 @@ namespace ts { // Return the inferred type for a variable, parameter, or property declaration function getTypeForVariableLikeDeclaration(declaration: VariableLikeDeclaration): Type { - if (declaration.parserContextFlags & NodeFlags.JavaScriptFile) { + if (declaration.flags & NodeFlags.JavaScriptFile) { // If this is a variable in a JavaScript file, then use the JSDoc type (if it has // one as its type), otherwise fallback to the below standard TS codepaths to // try to figure it out. @@ -3981,7 +3981,7 @@ namespace ts { } function getTypeParametersFromJSDocTemplate(declaration: SignatureDeclaration): TypeParameter[] { - if (declaration.parserContextFlags & NodeFlags.JavaScriptFile) { + if (declaration.flags & NodeFlags.JavaScriptFile) { const templateTag = getJSDocTemplateTag(declaration); if (templateTag) { return getTypeParametersFromDeclaration(templateTag.typeParameters); @@ -4015,7 +4015,7 @@ namespace ts { } function isOptionalParameter(node: ParameterDeclaration) { - if (node.parserContextFlags & NodeFlags.JavaScriptFile) { + if (node.flags & NodeFlags.JavaScriptFile) { if (node.type && node.type.kind === SyntaxKind.JSDocOptionalType) { return true; } @@ -4124,7 +4124,7 @@ namespace ts { returnType = getTypeFromTypeNode(declaration.type); } else { - if (declaration.parserContextFlags & NodeFlags.JavaScriptFile) { + if (declaration.flags & NodeFlags.JavaScriptFile) { const type = getReturnTypeFromJSDocComment(declaration); if (type && type !== unknownType) { returnType = type; @@ -7183,7 +7183,7 @@ namespace ts { } } - if (node.parserContextFlags & NodeFlags.AwaitContext) { + if (node.flags & NodeFlags.AwaitContext) { getNodeLinks(container).flags |= NodeCheckFlags.CaptureArguments; } } @@ -10783,7 +10783,7 @@ namespace ts { function checkAwaitExpression(node: AwaitExpression): Type { // Grammar checking if (produceDiagnostics) { - if (!(node.parserContextFlags & NodeFlags.AwaitContext)) { + if (!(node.flags & NodeFlags.AwaitContext)) { grammarErrorOnFirstToken(node, Diagnostics.await_expression_is_only_allowed_within_an_async_function); } @@ -11239,7 +11239,7 @@ namespace ts { function checkYieldExpression(node: YieldExpression): Type { // Grammar checking if (produceDiagnostics) { - if (!(node.parserContextFlags & NodeFlags.YieldContext) || isYieldExpressionInClass(node)) { + if (!(node.flags & NodeFlags.YieldContext) || isYieldExpressionInClass(node)) { grammarErrorOnFirstToken(node, Diagnostics.A_yield_expression_is_only_allowed_in_a_generator_body); } @@ -13701,7 +13701,7 @@ namespace ts { function checkWithStatement(node: WithStatement) { // Grammar checking for withStatement if (!checkGrammarStatementInAmbientContext(node)) { - if (node.parserContextFlags & NodeFlags.AwaitContext) { + if (node.flags & NodeFlags.AwaitContext) { grammarErrorOnFirstToken(node, Diagnostics.with_statements_are_not_allowed_in_an_async_function_block); } } diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index d52d1272697..4ec83277e3e 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -587,10 +587,7 @@ namespace ts { function parseSourceFileWorker(fileName: string, languageVersion: ScriptTarget, setParentNodes: boolean): SourceFile { sourceFile = createSourceFile(fileName, languageVersion); - - if (contextFlags & NodeFlags.JavaScriptFile) { - sourceFile.parserContextFlags = NodeFlags.JavaScriptFile; - } + sourceFile.flags = contextFlags; // Prime the scanner. token = nextToken(); @@ -996,7 +993,7 @@ namespace ts { node.end = end === undefined ? scanner.getStartPos() : end; if (contextFlags) { - node.parserContextFlags = contextFlags; + node.flags |= contextFlags; } // Keep track on the node if we encountered an error while parsing it. If we did, then @@ -1004,7 +1001,7 @@ namespace ts { // flag so that we don't mark any subsequent nodes. if (parseErrorBeforeNextFinishedNode) { parseErrorBeforeNextFinishedNode = false; - node.parserContextFlags |= NodeFlags.ThisNodeHasError; + node.flags |= NodeFlags.ThisNodeHasError; } return node; @@ -1453,7 +1450,7 @@ namespace ts { // differently depending on what mode it is in. // // This also applies to all our other context flags as well. - const nodeContextFlags = node.parserContextFlags & NodeFlags.ParserGeneratedFlags; + const nodeContextFlags = node.flags & NodeFlags.ContextFlags; if (nodeContextFlags !== contextFlags) { return undefined; } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 3e5ac5094dd..5e09c792f91 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -409,8 +409,8 @@ namespace ts { ReachabilityCheckFlags = HasImplicitReturn | HasExplicitReturn, EmitHelperFlags = HasClassExtends | HasDecorators | HasParamDecorators | HasAsyncFunctions, - // Context flags set directly by the parser. - ParserGeneratedFlags = DisallowInContext | YieldContext | DecoratorContext | ThisNodeHasError | AwaitContext, + // Parsing context flags + ContextFlags = DisallowInContext | YieldContext | DecoratorContext | AwaitContext, // Exclude these flags when parsing a Type TypeExcludesFlags = YieldContext | AwaitContext, @@ -441,9 +441,6 @@ namespace ts { export interface Node extends TextRange { kind: SyntaxKind; flags: NodeFlags; - // Specific context the parser was in when this node was created. Normally undefined. - // Only set when the parser was in some interesting context (like async/yield). - /* @internal */ parserContextFlags?: NodeFlags; decorators?: NodeArray; // Array of decorators (in document order) modifiers?: ModifiersArray; // Array of modifiers /* @internal */ id?: number; // Unique id (used to look up NodeLinks) diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 9cb1b7e784e..02b8385d0ff 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -121,26 +121,26 @@ namespace ts { // Returns true if this node contains a parse error anywhere underneath it. export function containsParseError(node: Node): boolean { aggregateChildData(node); - return (node.parserContextFlags & NodeFlags.ThisNodeOrAnySubNodesHasError) !== 0; + return (node.flags & NodeFlags.ThisNodeOrAnySubNodesHasError) !== 0; } function aggregateChildData(node: Node): void { - if (!(node.parserContextFlags & NodeFlags.HasAggregatedChildData)) { + if (!(node.flags & NodeFlags.HasAggregatedChildData)) { // A node is considered to contain a parse error if: // a) the parser explicitly marked that it had an error // b) any of it's children reported that it had an error. - const thisNodeOrAnySubNodesHasError = ((node.parserContextFlags & NodeFlags.ThisNodeHasError) !== 0) || + const thisNodeOrAnySubNodesHasError = ((node.flags & NodeFlags.ThisNodeHasError) !== 0) || forEachChild(node, containsParseError); // If so, mark ourselves accordingly. if (thisNodeOrAnySubNodesHasError) { - node.parserContextFlags |= NodeFlags.ThisNodeOrAnySubNodesHasError; + node.flags |= NodeFlags.ThisNodeOrAnySubNodesHasError; } // Also mark that we've propogated the child information to this node. This way we can // always consult the bit directly on this node without needing to check its children // again. - node.parserContextFlags |= NodeFlags.HasAggregatedChildData; + node.flags |= NodeFlags.HasAggregatedChildData; } } @@ -1078,7 +1078,7 @@ namespace ts { } export function isInJavaScriptFile(node: Node): boolean { - return node && !!(node.parserContextFlags & NodeFlags.JavaScriptFile); + return node && !!(node.flags & NodeFlags.JavaScriptFile); } /** @@ -1266,7 +1266,7 @@ namespace ts { export function isRestParameter(node: ParameterDeclaration) { if (node) { - if (node.parserContextFlags & NodeFlags.JavaScriptFile) { + if (node.flags & NodeFlags.JavaScriptFile) { if (node.type && node.type.kind === SyntaxKind.JSDocVariadicType) { return true; } diff --git a/src/harness/harness.ts b/src/harness/harness.ts index 6bc46667fed..848b0d4e063 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -245,7 +245,6 @@ namespace Utils { } function getNodeFlagName(f: number) { return getFlagName((ts).NodeFlags, f); } - function getParserContextFlagName(f: number) { return getFlagName((ts).ParserContextFlags, f); } function serializeNode(n: ts.Node): any { const o: any = { kind: getKindName(n.kind) }; @@ -274,19 +273,12 @@ namespace Utils { break; case "flags": - // Print out flags with their enum names. - if (n.flags) { - o[propertyName] = getNodeFlagName(n.flags); - } - break; - - case "parserContextFlags": - // Clear the flag that are produced by aggregating child values.. That is ephemeral - // data we don't care about in the dump. We only care what the parser set directly - // on the ast. - let value = n.parserContextFlags & ts.NodeFlags.ParserGeneratedFlags; - if (value) { - o[propertyName] = getParserContextFlagName(value); + // Clear the flags that are produced by aggregating child values. That is ephemeral + // data we don't care about in the dump. We only care what the parser set directly + // on the AST. + const flags = n.flags & ~(ts.NodeFlags.JavaScriptFile | ts.NodeFlags.HasAggregatedChildData); + if (flags) { + o[propertyName] = getNodeFlagName(flags); } break; @@ -353,12 +345,11 @@ namespace Utils { assert.equal(node1.pos, node2.pos, "node1.pos !== node2.pos"); assert.equal(node1.end, node2.end, "node1.end !== node2.end"); assert.equal(node1.kind, node2.kind, "node1.kind !== node2.kind"); - assert.equal(node1.flags, node2.flags, "node1.flags !== node2.flags"); // call this on both nodes to ensure all propagated flags have been set (and thus can be // compared). assert.equal(ts.containsParseError(node1), ts.containsParseError(node2)); - assert.equal(node1.parserContextFlags, node2.parserContextFlags, "node1.parserContextFlags !== node2.parserContextFlags"); + assert.equal(node1.flags, node2.flags, "node1.flags !== node2.flags"); ts.forEachChild(node1, child1 => { From dc657b869609b42c273b9b4d2944943208d93386 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Mon, 1 Feb 2016 06:55:53 -0800 Subject: [PATCH 138/160] Adding /*@internal*/ directives --- src/compiler/types.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 5e09c792f91..60f9e0d0cef 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -904,6 +904,7 @@ namespace ts { text: string; isUnterminated?: boolean; hasExtendedUnicodeEscape?: boolean; + /* @internal */ isOctalLiteral?: boolean; } @@ -946,6 +947,7 @@ namespace ts { // @kind(SyntaxKind.ArrayLiteralExpression) export interface ArrayLiteralExpression extends PrimaryExpression { elements: NodeArray; + /* @internal */ multiLine?: boolean; } @@ -958,6 +960,7 @@ namespace ts { // @kind(SyntaxKind.ObjectLiteralExpression) export interface ObjectLiteralExpression extends PrimaryExpression, Declaration { properties: NodeArray; + /* @internal */ multiLine?: boolean; } From 95196886f7fb37078ddcbc2b85c8d171fc9e5a6e Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Mon, 1 Feb 2016 10:14:14 -0800 Subject: [PATCH 139/160] Fix lint --- src/compiler/checker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 389fed35916..5adcbcf5906 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -10347,7 +10347,7 @@ namespace ts { if (returnTag && returnTag.typeExpression) { return getTypeFromTypeNode(returnTag.typeExpression.type); } - + return undefined; } From b0b0712c73d75b49ae6f374ab51574825a44be14 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Mon, 1 Feb 2016 10:36:47 -0800 Subject: [PATCH 140/160] suppress validation of output paths in transpile scenarios --- src/compiler/program.ts | 2 +- src/compiler/types.ts | 2 ++ src/services/services.ts | 3 +++ tests/cases/unittests/transpile.ts | 9 +++++++++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 6d4d7b54253..8ec821cb665 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -1717,7 +1717,7 @@ namespace ts { } // If the emit is enabled make sure that every output file is unique and not overwriting any of the input files - if (!options.noEmit) { + if (!options.noEmit && !options.suppressOutputPathCheck) { const emitHost = getEmitHost(); const emitFilesSeen = createFileMap(!host.useCaseSensitiveFileNames() ? key => key.toLocaleLowerCase() : undefined); forEachExpectedEmitFile(emitHost, (emitFileNames, sourceFiles, isBundledEmit) => { diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 60f9e0d0cef..5545fbd162e 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -2426,6 +2426,8 @@ namespace ts { // Skip checking lib.d.ts to help speed up tests. /* @internal */ skipDefaultLibCheck?: boolean; + // Do not perform validation of output file name in transpile scenarios + /* @internal */ suppressOutputPathCheck?: boolean; [option: string]: string | number | boolean | TsConfigOnlyOptions; } diff --git a/src/services/services.ts b/src/services/services.ts index 6d12f29d508..96d09fd0603 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -1876,6 +1876,9 @@ namespace ts { options.isolatedModules = true; + // transpileModule does not write anything to disk so there is no need to verify that there are no conflicts between input and output paths. + options.suppressOutputPathCheck = true; + // Filename can be non-ts file. options.allowNonTsExtensions = true; diff --git a/tests/cases/unittests/transpile.ts b/tests/cases/unittests/transpile.ts index d9fdaeb32ec..6f46bb53405 100644 --- a/tests/cases/unittests/transpile.ts +++ b/tests/cases/unittests/transpile.ts @@ -291,5 +291,14 @@ var x = 0;`, options: { compilerOptions: { jsx: JsxEmit.React, newLine: NewLineKind.LineFeed } } }) }); + it("transpile .js files", () => { + const input = "const a = 10;"; + const output = `"use strict";\nvar a = 10;\n`; + test(input, { + expectedOutput: output, + options: { compilerOptions: { newLine: NewLineKind.LineFeed, module: ModuleKind.CommonJS }, fileName: "input.js", reportDiagnostics: true }, + expectedDiagnosticCodes: [] + }); + }) }); } From e6c6d3090a85efeab90f8b755882d8c8010c9846 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Mon, 1 Feb 2016 13:35:57 -0800 Subject: [PATCH 141/160] properly classify dotted tag names in jsx --- src/services/services.ts | 76 +++++++++++-------- .../fourslash/syntacticClassificationsJsx2.ts | 27 +++++++ 2 files changed, 71 insertions(+), 32 deletions(-) create mode 100644 tests/cases/fourslash/syntacticClassificationsJsx2.ts diff --git a/src/services/services.ts b/src/services/services.ts index 6d12f29d508..fdc578b33fd 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -6860,21 +6860,58 @@ namespace ts { } } - function classifyTokenOrJsxText(token: Node): void { - if (nodeIsMissing(token)) { - return; + /** + * Returns true if node should be treated as classified and no further processing is required. + * False will mean that node is not classified and traverse routine should recurse into node contents. + */ + function tryClassifyNode(node: Node): boolean { + if (nodeIsMissing(node)) { + return true; } - const tokenStart = token.kind === SyntaxKind.JsxText ? token.pos : classifyLeadingTriviaAndGetTokenStart(token); + const classifiedElementName = tryClassifyJsxElementName(node); + if (!isToken(node) && node.kind !== SyntaxKind.JsxText && classifiedElementName === undefined) { + return false; + } - const tokenWidth = token.end - tokenStart; + const tokenStart = node.kind === SyntaxKind.JsxText ? node.pos : classifyLeadingTriviaAndGetTokenStart(node); + + const tokenWidth = node.end - tokenStart; Debug.assert(tokenWidth >= 0); if (tokenWidth > 0) { - const type = classifyTokenType(token.kind, token); + const type = classifiedElementName || classifyTokenType(node.kind, node); if (type) { pushClassification(tokenStart, tokenWidth, type); } } + + return true; + } + + function tryClassifyJsxElementName(token: Node): ClassificationType { + switch (token.parent && token.parent.kind) { + case SyntaxKind.JsxOpeningElement: + if ((token.parent).tagName === token) { + return ClassificationType.jsxOpenTagName; + } + break; + case SyntaxKind.JsxClosingElement: + if ((token.parent).tagName === token) { + return ClassificationType.jsxCloseTagName; + } + break; + case SyntaxKind.JsxSelfClosingElement: + if ((token.parent).tagName === token) { + return ClassificationType.jsxSelfClosingTagName; + } + break; + case SyntaxKind.JsxAttribute: + if ((token.parent).name === token) { + return ClassificationType.jsxAttribute; + } + break; + } + return undefined; } // for accurate classification, the actual token should be passed in. however, for @@ -6967,28 +7004,6 @@ namespace ts { return ClassificationType.parameterName; } return; - - case SyntaxKind.JsxOpeningElement: - if ((token.parent).tagName === token) { - return ClassificationType.jsxOpenTagName; - } - return; - - case SyntaxKind.JsxClosingElement: - if ((token.parent).tagName === token) { - return ClassificationType.jsxCloseTagName; - } - return; - - case SyntaxKind.JsxSelfClosingElement: - if ((token.parent).tagName === token) { - return ClassificationType.jsxSelfClosingTagName; - } - return; - case SyntaxKind.JsxAttribute: - if ((token.parent).name === token) { - return ClassificationType.jsxAttribute; - } } } return ClassificationType.identifier; @@ -7007,10 +7022,7 @@ namespace ts { const children = element.getChildren(sourceFile); for (let i = 0, n = children.length; i < n; i++) { const child = children[i]; - if (isToken(child) || child.kind === SyntaxKind.JsxText) { - classifyTokenOrJsxText(child); - } - else { + if (!tryClassifyNode(child)) { // Recurse into our child nodes. processElement(child); } diff --git a/tests/cases/fourslash/syntacticClassificationsJsx2.ts b/tests/cases/fourslash/syntacticClassificationsJsx2.ts new file mode 100644 index 00000000000..9110c6ce4b9 --- /dev/null +++ b/tests/cases/fourslash/syntacticClassificationsJsx2.ts @@ -0,0 +1,27 @@ +/// + +// @Filename: file1.tsx +////let x = +//// some jsx text +////; +//// +////let y = + +const c = classification; +verify.syntacticClassificationsAre( + c.keyword("let"), c.identifier("x"), c.operator("="), + c.punctuation("<"), + c.jsxOpenTagName("div.name"), + c.jsxAttribute("b"), c.operator("="), c.jsxAttributeStringLiteralValue(`"some-value"`), + c.jsxAttribute("c"), c.operator("="), c.punctuation("{"), c.numericLiteral("1"), c.punctuation("}"), + c.punctuation(">"), + c.jsxText(` + some jsx text +`), + c.punctuation("<"), c.punctuation("/"), c.jsxCloseTagName("div.name"), c.punctuation(">"), c.punctuation(";"), + c.keyword("let"), c.identifier("y"), c.operator("="), + c.punctuation("<"), + c.jsxSelfClosingTagName("element.name"), + c.jsxAttribute("attr"), c.operator("="), c.jsxAttributeStringLiteralValue(`"123"`), + c.punctuation("/"), c.punctuation(">") +) \ No newline at end of file From dd0a2e0340dd83d7bc3d19ec9f7be3bddf8de76e Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 1 Feb 2016 13:21:02 -0800 Subject: [PATCH 142/160] Added tests. --- tests/cases/conformance/salsa/exportDefaultInJsFile01.ts | 6 ++++++ tests/cases/conformance/salsa/exportDefaultInJsFile02.ts | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 tests/cases/conformance/salsa/exportDefaultInJsFile01.ts create mode 100644 tests/cases/conformance/salsa/exportDefaultInJsFile02.ts diff --git a/tests/cases/conformance/salsa/exportDefaultInJsFile01.ts b/tests/cases/conformance/salsa/exportDefaultInJsFile01.ts new file mode 100644 index 00000000000..bf2f3a4e99b --- /dev/null +++ b/tests/cases/conformance/salsa/exportDefaultInJsFile01.ts @@ -0,0 +1,6 @@ +// @allowJS: true +// @target: es3 +// @module: commonjs + +// @filename: myFile01.js +export default "hello"; \ No newline at end of file diff --git a/tests/cases/conformance/salsa/exportDefaultInJsFile02.ts b/tests/cases/conformance/salsa/exportDefaultInJsFile02.ts new file mode 100644 index 00000000000..1075b135f17 --- /dev/null +++ b/tests/cases/conformance/salsa/exportDefaultInJsFile02.ts @@ -0,0 +1,6 @@ +// @allowJS: true +// @target: es2015 +// @module: es2015 + +// @filename: myFile02.js +export default "hello"; \ No newline at end of file From bf4b63d3ba0e318ada17ae05ccdda5a007c11405 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 1 Feb 2016 13:28:58 -0800 Subject: [PATCH 143/160] Only error on 'export =' declarations. --- src/compiler/program.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 8ec821cb665..9a06a49370e 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -1071,8 +1071,11 @@ namespace ts { diagnostics.push(createDiagnosticForNode(node, Diagnostics.import_can_only_be_used_in_a_ts_file)); return true; case SyntaxKind.ExportAssignment: - diagnostics.push(createDiagnosticForNode(node, Diagnostics.export_can_only_be_used_in_a_ts_file)); - return true; + if ((node).isExportEquals) { + diagnostics.push(createDiagnosticForNode(node, Diagnostics.export_can_only_be_used_in_a_ts_file)); + return true; + } + break; case SyntaxKind.ClassDeclaration: let classDeclaration = node; if (checkModifiers(classDeclaration.modifiers) || From 25d21406263452517f949c796bc11b62b6c0b176 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 1 Feb 2016 13:29:49 -0800 Subject: [PATCH 144/160] Accepted baselines. --- .../baselines/reference/exportDefaultInJsFile01.errors.txt | 7 +++++++ .../baselines/reference/exportDefaultInJsFile02.errors.txt | 7 +++++++ 2 files changed, 14 insertions(+) create mode 100644 tests/baselines/reference/exportDefaultInJsFile01.errors.txt create mode 100644 tests/baselines/reference/exportDefaultInJsFile02.errors.txt diff --git a/tests/baselines/reference/exportDefaultInJsFile01.errors.txt b/tests/baselines/reference/exportDefaultInJsFile01.errors.txt new file mode 100644 index 00000000000..34035e1e14e --- /dev/null +++ b/tests/baselines/reference/exportDefaultInJsFile01.errors.txt @@ -0,0 +1,7 @@ +error TS5055: Cannot write file 'tests/cases/conformance/salsa/myFile01.js' because it would overwrite input file. + + +!!! error TS5055: Cannot write file 'tests/cases/conformance/salsa/myFile01.js' because it would overwrite input file. +==== tests/cases/conformance/salsa/myFile01.js (0 errors) ==== + + export default "hello"; \ No newline at end of file diff --git a/tests/baselines/reference/exportDefaultInJsFile02.errors.txt b/tests/baselines/reference/exportDefaultInJsFile02.errors.txt new file mode 100644 index 00000000000..5e17306e066 --- /dev/null +++ b/tests/baselines/reference/exportDefaultInJsFile02.errors.txt @@ -0,0 +1,7 @@ +error TS5055: Cannot write file 'tests/cases/conformance/salsa/myFile02.js' because it would overwrite input file. + + +!!! error TS5055: Cannot write file 'tests/cases/conformance/salsa/myFile02.js' because it would overwrite input file. +==== tests/cases/conformance/salsa/myFile02.js (0 errors) ==== + + export default "hello"; \ No newline at end of file From 73d9a941c8a848f40cd5b5216e8cbee9b985d11f Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 1 Feb 2016 14:15:52 -0800 Subject: [PATCH 145/160] Accepted that other baseline. --- .../jsFileCompilationBindMultipleDefaultExports.errors.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/baselines/reference/jsFileCompilationBindMultipleDefaultExports.errors.txt b/tests/baselines/reference/jsFileCompilationBindMultipleDefaultExports.errors.txt index 733f66922ab..05fecf03d30 100644 --- a/tests/baselines/reference/jsFileCompilationBindMultipleDefaultExports.errors.txt +++ b/tests/baselines/reference/jsFileCompilationBindMultipleDefaultExports.errors.txt @@ -1,10 +1,9 @@ tests/cases/compiler/a.js(1,22): error TS2528: A module cannot have multiple default exports. tests/cases/compiler/a.js(3,1): error TS2528: A module cannot have multiple default exports. -tests/cases/compiler/a.js(3,1): error TS8003: 'export=' can only be used in a .ts file. tests/cases/compiler/a.js(3,16): error TS1109: Expression expected. -==== tests/cases/compiler/a.js (4 errors) ==== +==== tests/cases/compiler/a.js (3 errors) ==== export default class a { ~ !!! error TS2528: A module cannot have multiple default exports. @@ -12,7 +11,5 @@ tests/cases/compiler/a.js(3,16): error TS1109: Expression expected. export default var a = 10; ~~~~~~~~~~~~~~ !!! error TS2528: A module cannot have multiple default exports. - ~~~~~~~~~~~~~~ -!!! error TS8003: 'export=' can only be used in a .ts file. ~~~ !!! error TS1109: Expression expected. \ No newline at end of file From 4f2cd6c4a2813e57bc2822251d569a881d0ef8e0 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Mon, 1 Feb 2016 15:19:13 -0800 Subject: [PATCH 146/160] don't do 'directoryExists' check in classic resolution scheme --- src/compiler/program.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 8ec821cb665..dc0c04bd930 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -88,6 +88,8 @@ namespace ts { host: ModuleResolutionHost; compilerOptions: CompilerOptions; traceEnabled: boolean; + // skip .tsx files if jsx is not enabled + skipTsx: boolean; } export function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations { @@ -369,7 +371,7 @@ namespace ts { const traceEnabled = isTraceEnabled(compilerOptions, host); const failedLookupLocations: string[] = []; - const state = {compilerOptions, host, traceEnabled}; + const state = {compilerOptions, host, traceEnabled, skipTsx: false}; let resolvedFileName = tryLoadModuleUsingOptionalResolutionSettings(moduleName, containingDirectory, nodeLoadModuleByRelativeName, failedLookupLocations, supportedExtensions, state); @@ -418,6 +420,9 @@ namespace ts { return forEach(extensions, tryLoad); function tryLoad(ext: string): string { + if (ext === ".tsx" && state.skipTsx) { + return undefined; + } const fileName = fileExtensionIs(candidate, ext) ? candidate : candidate + ext; if (!onlyRecordFailures && state.host.fileExists(fileName)) { if (state.traceEnabled) { @@ -517,7 +522,7 @@ namespace ts { export function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations { const traceEnabled = isTraceEnabled(compilerOptions, host); - const state = { compilerOptions, host, traceEnabled }; + const state = { compilerOptions, host, traceEnabled, skipTsx: !compilerOptions.jsx }; const failedLookupLocations: string[] = []; const supportedExtensions = getSupportedExtensions(compilerOptions); let containingDirectory = getDirectoryPath(containingFile); @@ -531,7 +536,7 @@ namespace ts { while (true) { const searchName = normalizePath(combinePaths(containingDirectory, moduleName)); const directoryName = getDirectoryPath(searchName); - referencedSourceFile = loadModuleFromFile(searchName, supportedExtensions, failedLookupLocations, !directoryProbablyExists(directoryName, host), state); + referencedSourceFile = loadModuleFromFile(searchName, supportedExtensions, failedLookupLocations, /*onlyRecordFailures*/ false, state); if (referencedSourceFile) { break; } From 1f1f4d2442c4380062faa92786cb4198ebe960ec Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Mon, 1 Feb 2016 15:34:03 -0800 Subject: [PATCH 147/160] fix linter issues --- src/compiler/program.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/compiler/program.ts b/src/compiler/program.ts index dc0c04bd930..0a88365ede3 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -535,7 +535,6 @@ namespace ts { let referencedSourceFile: string; while (true) { const searchName = normalizePath(combinePaths(containingDirectory, moduleName)); - const directoryName = getDirectoryPath(searchName); referencedSourceFile = loadModuleFromFile(searchName, supportedExtensions, failedLookupLocations, /*onlyRecordFailures*/ false, state); if (referencedSourceFile) { break; From f94c7202d224a1042428498087880324a64b4341 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Mon, 1 Feb 2016 15:54:14 -0800 Subject: [PATCH 148/160] update baselines --- ...athMappingBasedModuleResolution3_classic.trace.json | 3 --- ...athMappingBasedModuleResolution4_classic.trace.json | 3 --- ...athMappingBasedModuleResolution5_classic.trace.json | 5 ----- ...athMappingBasedModuleResolution6_classic.trace.json | 3 --- ...athMappingBasedModuleResolution7_classic.trace.json | 10 ---------- tests/cases/unittests/moduleResolution.ts | 7 +++++-- 6 files changed, 5 insertions(+), 26 deletions(-) diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.trace.json index ac82f87bcee..513198c50b0 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.trace.json @@ -14,13 +14,10 @@ "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'file4'", "Resolving module name 'file4' relative to base url 'c:/root' - 'c:/root/file4'.", "File 'c:/root/file4.ts' does not exist.", - "File 'c:/root/file4.tsx' does not exist.", "File 'c:/root/file4.d.ts' does not exist.", "File 'c:/root/folder2/file4.ts' does not exist.", - "File 'c:/root/folder2/file4.tsx' does not exist.", "File 'c:/root/folder2/file4.d.ts' does not exist.", "File 'c:/root/file4.ts' does not exist.", - "File 'c:/root/file4.tsx' does not exist.", "File 'c:/root/file4.d.ts' does not exist.", "File 'c:/file4.ts' exist - use it as a module resolution result.", "======== Module name 'file4' was successfully resolved to 'c:/file4.ts'. ========" diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution4_classic.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution4_classic.trace.json index ac82f87bcee..513198c50b0 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution4_classic.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution4_classic.trace.json @@ -14,13 +14,10 @@ "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'file4'", "Resolving module name 'file4' relative to base url 'c:/root' - 'c:/root/file4'.", "File 'c:/root/file4.ts' does not exist.", - "File 'c:/root/file4.tsx' does not exist.", "File 'c:/root/file4.d.ts' does not exist.", "File 'c:/root/folder2/file4.ts' does not exist.", - "File 'c:/root/folder2/file4.tsx' does not exist.", "File 'c:/root/folder2/file4.d.ts' does not exist.", "File 'c:/root/file4.ts' does not exist.", - "File 'c:/root/file4.tsx' does not exist.", "File 'c:/root/file4.d.ts' does not exist.", "File 'c:/file4.ts' exist - use it as a module resolution result.", "======== Module name 'file4' was successfully resolved to 'c:/file4.ts'. ========" diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution5_classic.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution5_classic.trace.json index 293291e4acf..099acae2aca 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution5_classic.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution5_classic.trace.json @@ -14,7 +14,6 @@ "Module name 'folder3/file2', matched pattern '*'.", "Trying substitution '*', candidate module location: 'folder3/file2'.", "File 'c:/root/folder3/file2.ts' does not exist.", - "File 'c:/root/folder3/file2.tsx' does not exist.", "File 'c:/root/folder3/file2.d.ts' does not exist.", "Trying substitution 'generated/*', candidate module location: 'generated/folder3/file2'.", "File 'c:/root/generated/folder3/file2.ts' exist - use it as a module resolution result.", @@ -34,17 +33,13 @@ "Module name 'file4', matched pattern '*'.", "Trying substitution '*', candidate module location: 'file4'.", "File 'c:/root/file4.ts' does not exist.", - "File 'c:/root/file4.tsx' does not exist.", "File 'c:/root/file4.d.ts' does not exist.", "Trying substitution 'generated/*', candidate module location: 'generated/file4'.", "File 'c:/root/generated/file4.ts' does not exist.", - "File 'c:/root/generated/file4.tsx' does not exist.", "File 'c:/root/generated/file4.d.ts' does not exist.", "File 'c:/root/folder1/file4.ts' does not exist.", - "File 'c:/root/folder1/file4.tsx' does not exist.", "File 'c:/root/folder1/file4.d.ts' does not exist.", "File 'c:/root/file4.ts' does not exist.", - "File 'c:/root/file4.tsx' does not exist.", "File 'c:/root/file4.d.ts' does not exist.", "File 'c:/file4.ts' exist - use it as a module resolution result.", "======== Module name 'file4' was successfully resolved to 'c:/file4.ts'. ========" diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution6_classic.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution6_classic.trace.json index 229ef51a924..0493e9c216b 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution6_classic.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution6_classic.trace.json @@ -7,7 +7,6 @@ "Longest matching prefix for 'c:/root/src/project/file3' is 'c:/root/src/'", "Loading 'project/file3' from the root dir 'c:/root/src/', candidate location 'c:/root/src/project/file3'", "File 'c:/root/src/project/file3.ts' does not exist.", - "File 'c:/root/src/project/file3.tsx' does not exist.", "File 'c:/root/src/project/file3.d.ts' does not exist.", "Trying other entries in 'rootDirs'", "Loading 'project/file3' from the root dir 'c:/root/generated/src', candidate location 'c:/root/generated/src/project/file3'", @@ -21,12 +20,10 @@ "Longest matching prefix for 'c:/root/generated/src/file2' is 'c:/root/generated/src/'", "Loading 'file2' from the root dir 'c:/root/generated/src/', candidate location 'c:/root/generated/src/file2'", "File 'c:/root/generated/src/file2.ts' does not exist.", - "File 'c:/root/generated/src/file2.tsx' does not exist.", "File 'c:/root/generated/src/file2.d.ts' does not exist.", "Trying other entries in 'rootDirs'", "Loading 'file2' from the root dir 'c:/root/src', candidate location 'c:/root/src/file2'", "File 'c:/root/src/file2.ts' does not exist.", - "File 'c:/root/src/file2.tsx' does not exist.", "File 'c:/root/src/file2.d.ts' exist - use it as a module resolution result.", "======== Module name '../file2' was successfully resolved to 'c:/root/src/file2.d.ts'. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution7_classic.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution7_classic.trace.json index 8242f8fb442..b45cd4754c7 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution7_classic.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution7_classic.trace.json @@ -7,7 +7,6 @@ "Longest matching prefix for 'c:/root/src/project/file2' is 'c:/root/src/'", "Loading 'project/file2' from the root dir 'c:/root/src/', candidate location 'c:/root/src/project/file2'", "File 'c:/root/src/project/file2.ts' does not exist.", - "File 'c:/root/src/project/file2.tsx' does not exist.", "File 'c:/root/src/project/file2.d.ts' does not exist.", "Trying other entries in 'rootDirs'", "Loading 'project/file2' from the root dir 'c:/root/generated/src', candidate location 'c:/root/generated/src/project/file2'", @@ -20,20 +19,15 @@ "Module name 'module3', matched pattern '*'.", "Trying substitution '*', candidate module location: 'module3'.", "File 'c:/root/module3.ts' does not exist.", - "File 'c:/root/module3.tsx' does not exist.", "File 'c:/root/module3.d.ts' does not exist.", "Trying substitution 'c:/shared/*', candidate module location: 'c:/shared/module3'.", "File 'c:/shared/module3.ts' does not exist.", - "File 'c:/shared/module3.tsx' does not exist.", "File 'c:/shared/module3.d.ts' does not exist.", "File 'c:/root/src/module3.ts' does not exist.", - "File 'c:/root/src/module3.tsx' does not exist.", "File 'c:/root/src/module3.d.ts' does not exist.", "File 'c:/root/module3.ts' does not exist.", - "File 'c:/root/module3.tsx' does not exist.", "File 'c:/root/module3.d.ts' does not exist.", "File 'c:/module3.ts' does not exist.", - "File 'c:/module3.tsx' does not exist.", "File 'c:/module3.d.ts' exist - use it as a module resolution result.", "======== Module name 'module3' was successfully resolved to 'c:/module3.d.ts'. ========", "======== Resolving module 'module1' from 'c:/root/generated/src/project/file2.ts'. ========", @@ -43,11 +37,9 @@ "Module name 'module1', matched pattern '*'.", "Trying substitution '*', candidate module location: 'module1'.", "File 'c:/root/module1.ts' does not exist.", - "File 'c:/root/module1.tsx' does not exist.", "File 'c:/root/module1.d.ts' does not exist.", "Trying substitution 'c:/shared/*', candidate module location: 'c:/shared/module1'.", "File 'c:/shared/module1.ts' does not exist.", - "File 'c:/shared/module1.tsx' does not exist.", "File 'c:/shared/module1.d.ts' exist - use it as a module resolution result.", "======== Module name 'module1' was successfully resolved to 'c:/shared/module1.d.ts'. ========", "======== Resolving module 'templates/module2' from 'c:/root/generated/src/project/file2.ts'. ========", @@ -66,12 +58,10 @@ "Longest matching prefix for 'c:/root/generated/src/file3' is 'c:/root/generated/src/'", "Loading 'file3' from the root dir 'c:/root/generated/src/', candidate location 'c:/root/generated/src/file3'", "File 'c:/root/generated/src/file3.ts' does not exist.", - "File 'c:/root/generated/src/file3.tsx' does not exist.", "File 'c:/root/generated/src/file3.d.ts' does not exist.", "Trying other entries in 'rootDirs'", "Loading 'file3' from the root dir 'c:/root/src', candidate location 'c:/root/src/file3'", "File 'c:/root/src/file3.ts' does not exist.", - "File 'c:/root/src/file3.tsx' does not exist.", "File 'c:/root/src/file3.d.ts' exist - use it as a module resolution result.", "======== Module name '../file3' was successfully resolved to 'c:/root/src/file3.d.ts'. ========" ] \ No newline at end of file diff --git a/tests/cases/unittests/moduleResolution.ts b/tests/cases/unittests/moduleResolution.ts index 6bbbdcc90b4..1173f579f2c 100644 --- a/tests/cases/unittests/moduleResolution.ts +++ b/tests/cases/unittests/moduleResolution.ts @@ -532,7 +532,7 @@ import b = require("./moduleB.ts"); const m1: File = { name: "/root/x/m1.ts" }; // load from base url const m2: File = { name: "/m2.ts" }; // fallback to classic - const options: CompilerOptions = { moduleResolution: ModuleResolutionKind.Classic, baseUrl: "/root/x" }; + const options: CompilerOptions = { moduleResolution: ModuleResolutionKind.Classic, baseUrl: "/root/x", jsx: JsxEmit.React }; const host = createModuleResolutionHost(hasDirectoryExists, main, m1, m2); check("m1", main, m1); @@ -565,6 +565,7 @@ import b = require("./moduleB.ts"); const options: CompilerOptions = { moduleResolution: ModuleResolutionKind.NodeJs, baseUrl: "/root", + jsx: JsxEmit.React, paths: { "*": [ "*", @@ -676,8 +677,8 @@ import b = require("./moduleB.ts"); }); it ("classic + baseUrl + path mappings", () => { + // classic mode does not use directoryExists test(/*hasDirectoryExists*/ false); - test(/*hasDirectoryExists*/ true); function test(hasDirectoryExists: boolean) { const main: File = { name: "/root/folder1/main.ts" }; @@ -690,6 +691,7 @@ import b = require("./moduleB.ts"); const options: CompilerOptions = { moduleResolution: ModuleResolutionKind.Classic, baseUrl: "/root", + jsx: JsxEmit.React, paths: { "*": [ "*", @@ -822,6 +824,7 @@ import b = require("./moduleB.ts"); const host = createModuleResolutionHost(hasDirectoryExists, file1, file2, file3, file4); const options: CompilerOptions = { moduleResolution: ModuleResolutionKind.Classic, + jsx: JsxEmit.React, rootDirs: [ "/root", "/root/generated/" From bcf22157d8934ca31836a75c6c00e8ddb78125b8 Mon Sep 17 00:00:00 2001 From: Kanchalai Tanglertsampan Date: Fri, 29 Jan 2016 18:20:05 -0800 Subject: [PATCH 149/160] Fix lastEncodedSourceMapSpan from being set to undefined --- src/compiler/sourcemap.ts | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/compiler/sourcemap.ts b/src/compiler/sourcemap.ts index 8abf1432b0c..86bad38cb6e 100644 --- a/src/compiler/sourcemap.ts +++ b/src/compiler/sourcemap.ts @@ -16,6 +16,14 @@ namespace ts { } let nullSourceMapWriter: SourceMapWriter; + // Used for initialize lastEncodedSourceMapSpan and reset lastEncodedSourceMapSpan when updateLastEncodedAndRecordedSpans + const defaultLastEncodedSourceMapSpan: SourceMapSpan = { + emittedLine: 1, + emittedColumn: 1, + sourceLine: 1, + sourceColumn: 1, + sourceIndex: 0 + }; export function getNullSourceMapWriter(): SourceMapWriter { if (nullSourceMapWriter === undefined) { @@ -79,13 +87,7 @@ namespace ts { // Last recorded and encoded spans lastRecordedSourceMapSpan = undefined; - lastEncodedSourceMapSpan = { - emittedLine: 1, - emittedColumn: 1, - sourceLine: 1, - sourceColumn: 1, - sourceIndex: 0 - }; + lastEncodedSourceMapSpan = defaultLastEncodedSourceMapSpan; lastEncodedNameIndex = 0; // Initialize source map data @@ -159,10 +161,12 @@ namespace ts { // Pop sourceMapDecodedMappings to remove last entry sourceMapData.sourceMapDecodedMappings.pop(); - // Change the last encoded source map + // Point the lastEncodedSourceMapSpace to the previous encoded sourceMapSpan + // If the list is empty which indicates that we are at the beginning of the file, + // we have to reset it to default value (same value when we first initialize sourceMapWriter) lastEncodedSourceMapSpan = sourceMapData.sourceMapDecodedMappings.length ? sourceMapData.sourceMapDecodedMappings[sourceMapData.sourceMapDecodedMappings.length - 1] : - undefined; + defaultLastEncodedSourceMapSpan; // TODO: Update lastEncodedNameIndex // Since we dont support this any more, lets not worry about it right now. From 8ce886c4369e0289a61a2a261308e3e2e5872c5e Mon Sep 17 00:00:00 2001 From: Kanchalai Tanglertsampan Date: Fri, 29 Jan 2016 18:20:17 -0800 Subject: [PATCH 150/160] Update baselines --- ...ationDestructuringObjectBindingPattern1.js | 7 +++ ...nDestructuringObjectBindingPattern1.js.map | 2 + ...cturingObjectBindingPattern1.sourcemap.txt | 24 +++++++++ ...DestructuringObjectBindingPattern1.symbols | 6 +++ ...onDestructuringObjectBindingPattern1.types | 8 +++ ...ationDestructuringObjectBindingPattern2.js | 9 ++++ ...nDestructuringObjectBindingPattern2.js.map | 2 + ...cturingObjectBindingPattern2.sourcemap.txt | 52 +++++++++++++++++++ ...DestructuringObjectBindingPattern2.symbols | 12 +++++ ...onDestructuringObjectBindingPattern2.types | 17 ++++++ 10 files changed, 139 insertions(+) create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern1.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern1.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern1.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern1.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern1.types create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern2.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern2.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern2.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern2.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern2.types diff --git a/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern1.js b/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern1.js new file mode 100644 index 00000000000..c4e56eefe1e --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern1.js @@ -0,0 +1,7 @@ +//// [sourceMapValidationDestructuringObjectBindingPattern1.ts] + +var {x} = { x: 20 }; + +//// [sourceMapValidationDestructuringObjectBindingPattern1.js] +var x = { x: 20 }.x; +//# sourceMappingURL=sourceMapValidationDestructuringObjectBindingPattern1.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern1.js.map b/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern1.js.map new file mode 100644 index 00000000000..c428ab3f5fc --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern1.js.map @@ -0,0 +1,2 @@ +//// [sourceMapValidationDestructuringObjectBindingPattern1.js.map] +{"version":3,"file":"sourceMapValidationDestructuringObjectBindingPattern1.js","sourceRoot":"","sources":["sourceMapValidationDestructuringObjectBindingPattern1.ts"],"names":[],"mappings":"AACK,mBAAC,CAAc"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern1.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern1.sourcemap.txt new file mode 100644 index 00000000000..5dd6c7410dd --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern1.sourcemap.txt @@ -0,0 +1,24 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringObjectBindingPattern1.js +mapUrl: sourceMapValidationDestructuringObjectBindingPattern1.js.map +sourceRoot: +sources: sourceMapValidationDestructuringObjectBindingPattern1.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringObjectBindingPattern1.js +sourceFile:sourceMapValidationDestructuringObjectBindingPattern1.ts +------------------------------------------------------------------- +>>>var x = { x: 20 }.x; +1 > +2 >^^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >var { +2 >x +3 > } = { x: 20 }; +1 >Emitted(1, 1) Source(2, 6) + SourceIndex(0) +2 >Emitted(1, 20) Source(2, 7) + SourceIndex(0) +3 >Emitted(1, 21) Source(2, 21) + SourceIndex(0) +--- +>>>//# sourceMappingURL=sourceMapValidationDestructuringObjectBindingPattern1.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern1.symbols b/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern1.symbols new file mode 100644 index 00000000000..b504acdb9b0 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern1.symbols @@ -0,0 +1,6 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringObjectBindingPattern1.ts === + +var {x} = { x: 20 }; +>x : Symbol(x, Decl(sourceMapValidationDestructuringObjectBindingPattern1.ts, 1, 5)) +>x : Symbol(x, Decl(sourceMapValidationDestructuringObjectBindingPattern1.ts, 1, 11)) + diff --git a/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern1.types b/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern1.types new file mode 100644 index 00000000000..0c051f80c45 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern1.types @@ -0,0 +1,8 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringObjectBindingPattern1.ts === + +var {x} = { x: 20 }; +>x : number +>{ x: 20 } : { x: number; } +>x : number +>20 : number + diff --git a/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern2.js b/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern2.js new file mode 100644 index 00000000000..38cc7985925 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern2.js @@ -0,0 +1,9 @@ +//// [sourceMapValidationDestructuringObjectBindingPattern2.ts] + +var {x} = { x: 20 }; +var { a, b } = { a: 30, b: 40 }; + +//// [sourceMapValidationDestructuringObjectBindingPattern2.js] +var x = { x: 20 }.x; +var _a = { a: 30, b: 40 }, a = _a.a, b = _a.b; +//# sourceMappingURL=sourceMapValidationDestructuringObjectBindingPattern2.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern2.js.map b/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern2.js.map new file mode 100644 index 00000000000..af59ee6fae0 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern2.js.map @@ -0,0 +1,2 @@ +//// [sourceMapValidationDestructuringObjectBindingPattern2.js.map] +{"version":3,"file":"sourceMapValidationDestructuringObjectBindingPattern2.js","sourceRoot":"","sources":["sourceMapValidationDestructuringObjectBindingPattern2.ts"],"names":[],"mappings":"AACK,mBAAC,CAAc;AACpB,IAAA,qBAA+B,EAAzB,QAAC,EAAE,QAAC,CAAsB"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern2.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern2.sourcemap.txt new file mode 100644 index 00000000000..38dc23ba462 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern2.sourcemap.txt @@ -0,0 +1,52 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringObjectBindingPattern2.js +mapUrl: sourceMapValidationDestructuringObjectBindingPattern2.js.map +sourceRoot: +sources: sourceMapValidationDestructuringObjectBindingPattern2.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringObjectBindingPattern2.js +sourceFile:sourceMapValidationDestructuringObjectBindingPattern2.ts +------------------------------------------------------------------- +>>>var x = { x: 20 }.x; +1 > +2 >^^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >var { +2 >x +3 > } = { x: 20 }; +1 >Emitted(1, 1) Source(2, 6) + SourceIndex(0) +2 >Emitted(1, 20) Source(2, 7) + SourceIndex(0) +3 >Emitted(1, 21) Source(2, 21) + SourceIndex(0) +--- +>>>var _a = { a: 30, b: 40 }, a = _a.a, b = _a.b; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^ +8 > ^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 > +3 > var { a, b } = { a: 30, b: 40 } +4 > +5 > a +6 > , +7 > b +8 > } = { a: 30, b: 40 }; +1->Emitted(2, 1) Source(3, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(3, 1) + SourceIndex(0) +3 >Emitted(2, 26) Source(3, 32) + SourceIndex(0) +4 >Emitted(2, 28) Source(3, 7) + SourceIndex(0) +5 >Emitted(2, 36) Source(3, 8) + SourceIndex(0) +6 >Emitted(2, 38) Source(3, 10) + SourceIndex(0) +7 >Emitted(2, 46) Source(3, 11) + SourceIndex(0) +8 >Emitted(2, 47) Source(3, 33) + SourceIndex(0) +--- +>>>//# sourceMappingURL=sourceMapValidationDestructuringObjectBindingPattern2.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern2.symbols b/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern2.symbols new file mode 100644 index 00000000000..dcc213f135c --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern2.symbols @@ -0,0 +1,12 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringObjectBindingPattern2.ts === + +var {x} = { x: 20 }; +>x : Symbol(x, Decl(sourceMapValidationDestructuringObjectBindingPattern2.ts, 1, 5)) +>x : Symbol(x, Decl(sourceMapValidationDestructuringObjectBindingPattern2.ts, 1, 11)) + +var { a, b } = { a: 30, b: 40 }; +>a : Symbol(a, Decl(sourceMapValidationDestructuringObjectBindingPattern2.ts, 2, 5)) +>b : Symbol(b, Decl(sourceMapValidationDestructuringObjectBindingPattern2.ts, 2, 8)) +>a : Symbol(a, Decl(sourceMapValidationDestructuringObjectBindingPattern2.ts, 2, 16)) +>b : Symbol(b, Decl(sourceMapValidationDestructuringObjectBindingPattern2.ts, 2, 23)) + diff --git a/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern2.types b/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern2.types new file mode 100644 index 00000000000..bbec608f686 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern2.types @@ -0,0 +1,17 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringObjectBindingPattern2.ts === + +var {x} = { x: 20 }; +>x : number +>{ x: 20 } : { x: number; } +>x : number +>20 : number + +var { a, b } = { a: 30, b: 40 }; +>a : number +>b : number +>{ a: 30, b: 40 } : { a: number; b: number; } +>a : number +>30 : number +>b : number +>40 : number + From d81565398801e83e41e4392d8f8f325e099611b0 Mon Sep 17 00:00:00 2001 From: Kanchalai Tanglertsampan Date: Mon, 1 Feb 2016 09:45:27 -0800 Subject: [PATCH 151/160] Rename test cases so they are consistent with the rest --- ...tionDestructuringVariableStatementObjectBindingPattern1.ts | 3 +++ ...tionDestructuringVariableStatementObjectBindingPattern2.ts | 4 ++++ 2 files changed, 7 insertions(+) create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.ts create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.ts diff --git a/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.ts b/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.ts new file mode 100644 index 00000000000..80adb1cf0c1 --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.ts @@ -0,0 +1,3 @@ +// @sourcemap: true + +var {x} = { x: 20 }; \ No newline at end of file diff --git a/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.ts b/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.ts new file mode 100644 index 00000000000..93465864cd6 --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.ts @@ -0,0 +1,4 @@ +// @sourcemap: true + +var {x} = { x: 20 }; +var { a, b } = { a: 30, b: 40 }; \ No newline at end of file From c7bbda8a3e23c35c76d748b74d2136671ea88ed2 Mon Sep 17 00:00:00 2001 From: Kanchalai Tanglertsampan Date: Mon, 1 Feb 2016 11:23:03 -0800 Subject: [PATCH 152/160] Remove old baselines --- ...ationDestructuringObjectBindingPattern1.js | 7 --- ...nDestructuringObjectBindingPattern1.js.map | 2 - ...cturingObjectBindingPattern1.sourcemap.txt | 24 --------- ...DestructuringObjectBindingPattern1.symbols | 6 --- ...onDestructuringObjectBindingPattern1.types | 8 --- ...ationDestructuringObjectBindingPattern2.js | 9 ---- ...nDestructuringObjectBindingPattern2.js.map | 2 - ...cturingObjectBindingPattern2.sourcemap.txt | 52 ------------------- ...DestructuringObjectBindingPattern2.symbols | 12 ----- ...onDestructuringObjectBindingPattern2.types | 17 ------ 10 files changed, 139 deletions(-) delete mode 100644 tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern1.js delete mode 100644 tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern1.js.map delete mode 100644 tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern1.sourcemap.txt delete mode 100644 tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern1.symbols delete mode 100644 tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern1.types delete mode 100644 tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern2.js delete mode 100644 tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern2.js.map delete mode 100644 tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern2.sourcemap.txt delete mode 100644 tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern2.symbols delete mode 100644 tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern2.types diff --git a/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern1.js b/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern1.js deleted file mode 100644 index c4e56eefe1e..00000000000 --- a/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern1.js +++ /dev/null @@ -1,7 +0,0 @@ -//// [sourceMapValidationDestructuringObjectBindingPattern1.ts] - -var {x} = { x: 20 }; - -//// [sourceMapValidationDestructuringObjectBindingPattern1.js] -var x = { x: 20 }.x; -//# sourceMappingURL=sourceMapValidationDestructuringObjectBindingPattern1.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern1.js.map b/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern1.js.map deleted file mode 100644 index c428ab3f5fc..00000000000 --- a/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern1.js.map +++ /dev/null @@ -1,2 +0,0 @@ -//// [sourceMapValidationDestructuringObjectBindingPattern1.js.map] -{"version":3,"file":"sourceMapValidationDestructuringObjectBindingPattern1.js","sourceRoot":"","sources":["sourceMapValidationDestructuringObjectBindingPattern1.ts"],"names":[],"mappings":"AACK,mBAAC,CAAc"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern1.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern1.sourcemap.txt deleted file mode 100644 index 5dd6c7410dd..00000000000 --- a/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern1.sourcemap.txt +++ /dev/null @@ -1,24 +0,0 @@ -=================================================================== -JsFile: sourceMapValidationDestructuringObjectBindingPattern1.js -mapUrl: sourceMapValidationDestructuringObjectBindingPattern1.js.map -sourceRoot: -sources: sourceMapValidationDestructuringObjectBindingPattern1.ts -=================================================================== -------------------------------------------------------------------- -emittedFile:tests/cases/compiler/sourceMapValidationDestructuringObjectBindingPattern1.js -sourceFile:sourceMapValidationDestructuringObjectBindingPattern1.ts -------------------------------------------------------------------- ->>>var x = { x: 20 }.x; -1 > -2 >^^^^^^^^^^^^^^^^^^^ -3 > ^ -4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > - >var { -2 >x -3 > } = { x: 20 }; -1 >Emitted(1, 1) Source(2, 6) + SourceIndex(0) -2 >Emitted(1, 20) Source(2, 7) + SourceIndex(0) -3 >Emitted(1, 21) Source(2, 21) + SourceIndex(0) ---- ->>>//# sourceMappingURL=sourceMapValidationDestructuringObjectBindingPattern1.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern1.symbols b/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern1.symbols deleted file mode 100644 index b504acdb9b0..00000000000 --- a/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern1.symbols +++ /dev/null @@ -1,6 +0,0 @@ -=== tests/cases/compiler/sourceMapValidationDestructuringObjectBindingPattern1.ts === - -var {x} = { x: 20 }; ->x : Symbol(x, Decl(sourceMapValidationDestructuringObjectBindingPattern1.ts, 1, 5)) ->x : Symbol(x, Decl(sourceMapValidationDestructuringObjectBindingPattern1.ts, 1, 11)) - diff --git a/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern1.types b/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern1.types deleted file mode 100644 index 0c051f80c45..00000000000 --- a/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern1.types +++ /dev/null @@ -1,8 +0,0 @@ -=== tests/cases/compiler/sourceMapValidationDestructuringObjectBindingPattern1.ts === - -var {x} = { x: 20 }; ->x : number ->{ x: 20 } : { x: number; } ->x : number ->20 : number - diff --git a/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern2.js b/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern2.js deleted file mode 100644 index 38cc7985925..00000000000 --- a/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern2.js +++ /dev/null @@ -1,9 +0,0 @@ -//// [sourceMapValidationDestructuringObjectBindingPattern2.ts] - -var {x} = { x: 20 }; -var { a, b } = { a: 30, b: 40 }; - -//// [sourceMapValidationDestructuringObjectBindingPattern2.js] -var x = { x: 20 }.x; -var _a = { a: 30, b: 40 }, a = _a.a, b = _a.b; -//# sourceMappingURL=sourceMapValidationDestructuringObjectBindingPattern2.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern2.js.map b/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern2.js.map deleted file mode 100644 index af59ee6fae0..00000000000 --- a/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern2.js.map +++ /dev/null @@ -1,2 +0,0 @@ -//// [sourceMapValidationDestructuringObjectBindingPattern2.js.map] -{"version":3,"file":"sourceMapValidationDestructuringObjectBindingPattern2.js","sourceRoot":"","sources":["sourceMapValidationDestructuringObjectBindingPattern2.ts"],"names":[],"mappings":"AACK,mBAAC,CAAc;AACpB,IAAA,qBAA+B,EAAzB,QAAC,EAAE,QAAC,CAAsB"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern2.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern2.sourcemap.txt deleted file mode 100644 index 38dc23ba462..00000000000 --- a/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern2.sourcemap.txt +++ /dev/null @@ -1,52 +0,0 @@ -=================================================================== -JsFile: sourceMapValidationDestructuringObjectBindingPattern2.js -mapUrl: sourceMapValidationDestructuringObjectBindingPattern2.js.map -sourceRoot: -sources: sourceMapValidationDestructuringObjectBindingPattern2.ts -=================================================================== -------------------------------------------------------------------- -emittedFile:tests/cases/compiler/sourceMapValidationDestructuringObjectBindingPattern2.js -sourceFile:sourceMapValidationDestructuringObjectBindingPattern2.ts -------------------------------------------------------------------- ->>>var x = { x: 20 }.x; -1 > -2 >^^^^^^^^^^^^^^^^^^^ -3 > ^ -4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > - >var { -2 >x -3 > } = { x: 20 }; -1 >Emitted(1, 1) Source(2, 6) + SourceIndex(0) -2 >Emitted(1, 20) Source(2, 7) + SourceIndex(0) -3 >Emitted(1, 21) Source(2, 21) + SourceIndex(0) ---- ->>>var _a = { a: 30, b: 40 }, a = _a.a, b = _a.b; -1-> -2 >^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^ -8 > ^ -9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1-> - > -2 > -3 > var { a, b } = { a: 30, b: 40 } -4 > -5 > a -6 > , -7 > b -8 > } = { a: 30, b: 40 }; -1->Emitted(2, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(2, 5) Source(3, 1) + SourceIndex(0) -3 >Emitted(2, 26) Source(3, 32) + SourceIndex(0) -4 >Emitted(2, 28) Source(3, 7) + SourceIndex(0) -5 >Emitted(2, 36) Source(3, 8) + SourceIndex(0) -6 >Emitted(2, 38) Source(3, 10) + SourceIndex(0) -7 >Emitted(2, 46) Source(3, 11) + SourceIndex(0) -8 >Emitted(2, 47) Source(3, 33) + SourceIndex(0) ---- ->>>//# sourceMappingURL=sourceMapValidationDestructuringObjectBindingPattern2.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern2.symbols b/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern2.symbols deleted file mode 100644 index dcc213f135c..00000000000 --- a/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern2.symbols +++ /dev/null @@ -1,12 +0,0 @@ -=== tests/cases/compiler/sourceMapValidationDestructuringObjectBindingPattern2.ts === - -var {x} = { x: 20 }; ->x : Symbol(x, Decl(sourceMapValidationDestructuringObjectBindingPattern2.ts, 1, 5)) ->x : Symbol(x, Decl(sourceMapValidationDestructuringObjectBindingPattern2.ts, 1, 11)) - -var { a, b } = { a: 30, b: 40 }; ->a : Symbol(a, Decl(sourceMapValidationDestructuringObjectBindingPattern2.ts, 2, 5)) ->b : Symbol(b, Decl(sourceMapValidationDestructuringObjectBindingPattern2.ts, 2, 8)) ->a : Symbol(a, Decl(sourceMapValidationDestructuringObjectBindingPattern2.ts, 2, 16)) ->b : Symbol(b, Decl(sourceMapValidationDestructuringObjectBindingPattern2.ts, 2, 23)) - diff --git a/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern2.types b/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern2.types deleted file mode 100644 index bbec608f686..00000000000 --- a/tests/baselines/reference/sourceMapValidationDestructuringObjectBindingPattern2.types +++ /dev/null @@ -1,17 +0,0 @@ -=== tests/cases/compiler/sourceMapValidationDestructuringObjectBindingPattern2.ts === - -var {x} = { x: 20 }; ->x : number ->{ x: 20 } : { x: number; } ->x : number ->20 : number - -var { a, b } = { a: 30, b: 40 }; ->a : number ->b : number ->{ a: 30, b: 40 } : { a: number; b: number; } ->a : number ->30 : number ->b : number ->40 : number - From 0db90b786986c99770b35a280547f967153a7daa Mon Sep 17 00:00:00 2001 From: Kanchalai Tanglertsampan Date: Mon, 1 Feb 2016 11:23:17 -0800 Subject: [PATCH 153/160] Add more tests and baselines --- ...ngVariableStatementArrayBindingPattern4.js | 7 +++ ...riableStatementArrayBindingPattern4.js.map | 2 + ...tatementArrayBindingPattern4.sourcemap.txt | 24 +++++++++ ...iableStatementArrayBindingPattern4.symbols | 5 ++ ...ariableStatementArrayBindingPattern4.types | 8 +++ ...ngVariableStatementArrayBindingPattern5.js | 9 ++++ ...riableStatementArrayBindingPattern5.js.map | 2 + ...tatementArrayBindingPattern5.sourcemap.txt | 52 +++++++++++++++++++ ...iableStatementArrayBindingPattern5.symbols | 9 ++++ ...ariableStatementArrayBindingPattern5.types | 15 ++++++ ...ngVariableStatementArrayBindingPattern6.js | 7 +++ ...riableStatementArrayBindingPattern6.js.map | 2 + ...tatementArrayBindingPattern6.sourcemap.txt | 30 +++++++++++ ...iableStatementArrayBindingPattern6.symbols | 5 ++ ...ariableStatementArrayBindingPattern6.types | 9 ++++ ...ngVariableStatementArrayBindingPattern7.js | 7 +++ ...riableStatementArrayBindingPattern7.js.map | 2 + ...tatementArrayBindingPattern7.sourcemap.txt | 45 ++++++++++++++++ ...iableStatementArrayBindingPattern7.symbols | 6 +++ ...ariableStatementArrayBindingPattern7.types | 10 ++++ ...gVariableStatementObjectBindingPattern1.js | 7 +++ ...iableStatementObjectBindingPattern1.js.map | 2 + ...atementObjectBindingPattern1.sourcemap.txt | 24 +++++++++ ...ableStatementObjectBindingPattern1.symbols | 6 +++ ...riableStatementObjectBindingPattern1.types | 8 +++ ...gVariableStatementObjectBindingPattern2.js | 9 ++++ ...iableStatementObjectBindingPattern2.js.map | 2 + ...atementObjectBindingPattern2.sourcemap.txt | 52 +++++++++++++++++++ ...ableStatementObjectBindingPattern2.symbols | 12 +++++ ...riableStatementObjectBindingPattern2.types | 17 ++++++ ...gVariableStatementObjectBindingPattern3.js | 7 +++ ...iableStatementObjectBindingPattern3.js.map | 2 + ...atementObjectBindingPattern3.sourcemap.txt | 30 +++++++++++ ...ableStatementObjectBindingPattern3.symbols | 6 +++ ...riableStatementObjectBindingPattern3.types | 9 ++++ ...gVariableStatementObjectBindingPattern4.js | 8 +++ ...iableStatementObjectBindingPattern4.js.map | 2 + ...atementObjectBindingPattern4.sourcemap.txt | 47 +++++++++++++++++ ...ableStatementObjectBindingPattern4.symbols | 10 ++++ ...riableStatementObjectBindingPattern4.types | 14 +++++ ...ngVariableStatementArrayBindingPattern4.ts | 3 ++ ...ngVariableStatementArrayBindingPattern5.ts | 4 ++ ...ngVariableStatementArrayBindingPattern6.ts | 3 ++ ...ngVariableStatementArrayBindingPattern7.ts | 3 ++ ...gVariableStatementObjectBindingPattern3.ts | 3 ++ ...gVariableStatementObjectBindingPattern4.ts | 4 ++ 46 files changed, 550 insertions(+) create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.types create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.types create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.types create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.types create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.types create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.types create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.types create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.types create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.ts create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.ts create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.ts create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.ts create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.ts create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.ts diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.js b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.js new file mode 100644 index 00000000000..d4c419278c7 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.js @@ -0,0 +1,7 @@ +//// [sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.ts] + +var [x] = [1, 2]; + +//// [sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.js] +var x = [1, 2][0]; +//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.js.map new file mode 100644 index 00000000000..96fd86faa4e --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.js.map @@ -0,0 +1,2 @@ +//// [sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.js.map] +{"version":3,"file":"sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.ts"],"names":[],"mappings":"AACK,iBAAC,CAAW"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.sourcemap.txt new file mode 100644 index 00000000000..a52c7701db2 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.sourcemap.txt @@ -0,0 +1,24 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.js +mapUrl: sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.js.map +sourceRoot: +sources: sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.js +sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.ts +------------------------------------------------------------------- +>>>var x = [1, 2][0]; +1 > +2 >^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >var [ +2 >x +3 > ] = [1, 2]; +1 >Emitted(1, 1) Source(2, 6) + SourceIndex(0) +2 >Emitted(1, 18) Source(2, 7) + SourceIndex(0) +3 >Emitted(1, 19) Source(2, 18) + SourceIndex(0) +--- +>>>//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.symbols b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.symbols new file mode 100644 index 00000000000..4695a8cd598 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.symbols @@ -0,0 +1,5 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.ts === + +var [x] = [1, 2]; +>x : Symbol(x, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.ts, 1, 5)) + diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.types b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.types new file mode 100644 index 00000000000..461939a11aa --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.types @@ -0,0 +1,8 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.ts === + +var [x] = [1, 2]; +>x : number +>[1, 2] : [number, number] +>1 : number +>2 : number + diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.js b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.js new file mode 100644 index 00000000000..10df853c220 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.js @@ -0,0 +1,9 @@ +//// [sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.ts] + +var [x] = [1, 2]; +var [y, z] = [1, 2]; + +//// [sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.js] +var x = [1, 2][0]; +var _a = [1, 2], y = _a[0], z = _a[1]; +//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.js.map new file mode 100644 index 00000000000..337a73240b9 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.js.map @@ -0,0 +1,2 @@ +//// [sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.js.map] +{"version":3,"file":"sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.ts"],"names":[],"mappings":"AACK,iBAAC,CAAW;AACjB,IAAA,WAAmB,EAAd,SAAC,EAAE,SAAC,CAAW"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.sourcemap.txt new file mode 100644 index 00000000000..338b6424185 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.sourcemap.txt @@ -0,0 +1,52 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.js +mapUrl: sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.js.map +sourceRoot: +sources: sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.js +sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.ts +------------------------------------------------------------------- +>>>var x = [1, 2][0]; +1 > +2 >^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^-> +1 > + >var [ +2 >x +3 > ] = [1, 2]; +1 >Emitted(1, 1) Source(2, 6) + SourceIndex(0) +2 >Emitted(1, 18) Source(2, 7) + SourceIndex(0) +3 >Emitted(1, 19) Source(2, 18) + SourceIndex(0) +--- +>>>var _a = [1, 2], y = _a[0], z = _a[1]; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^ +8 > ^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 > +3 > var [y, z] = [1, 2] +4 > +5 > y +6 > , +7 > z +8 > ] = [1, 2]; +1->Emitted(2, 1) Source(3, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(3, 1) + SourceIndex(0) +3 >Emitted(2, 16) Source(3, 20) + SourceIndex(0) +4 >Emitted(2, 18) Source(3, 6) + SourceIndex(0) +5 >Emitted(2, 27) Source(3, 7) + SourceIndex(0) +6 >Emitted(2, 29) Source(3, 9) + SourceIndex(0) +7 >Emitted(2, 38) Source(3, 10) + SourceIndex(0) +8 >Emitted(2, 39) Source(3, 21) + SourceIndex(0) +--- +>>>//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.symbols b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.symbols new file mode 100644 index 00000000000..59543290772 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.symbols @@ -0,0 +1,9 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.ts === + +var [x] = [1, 2]; +>x : Symbol(x, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.ts, 1, 5)) + +var [y, z] = [1, 2]; +>y : Symbol(y, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.ts, 2, 5)) +>z : Symbol(z, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.ts, 2, 7)) + diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.types b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.types new file mode 100644 index 00000000000..1ef747517e4 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.types @@ -0,0 +1,15 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.ts === + +var [x] = [1, 2]; +>x : number +>[1, 2] : [number, number] +>1 : number +>2 : number + +var [y, z] = [1, 2]; +>y : number +>z : number +>[1, 2] : [number, number] +>1 : number +>2 : number + diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.js b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.js new file mode 100644 index 00000000000..d4baadb6562 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.js @@ -0,0 +1,7 @@ +//// [sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.ts] + +var [x = 20] = [1, 2]; + +//// [sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.js] +var _a = [1, 2][0], x = _a === void 0 ? 20 : _a; +//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.js.map new file mode 100644 index 00000000000..9594cc22809 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.js.map @@ -0,0 +1,2 @@ +//// [sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.js.map] +{"version":3,"file":"sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.ts"],"names":[],"mappings":"AACK,kBAAM,EAAN,2BAAM,CAAW"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.sourcemap.txt new file mode 100644 index 00000000000..90ebe4dc9ac --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.sourcemap.txt @@ -0,0 +1,30 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.js +mapUrl: sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.js.map +sourceRoot: +sources: sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.js +sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.ts +------------------------------------------------------------------- +>>>var _a = [1, 2][0], x = _a === void 0 ? 20 : _a; +1 > +2 >^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >var [ +2 >x = 20 +3 > +4 > x = 20 +5 > ] = [1, 2]; +1 >Emitted(1, 1) Source(2, 6) + SourceIndex(0) +2 >Emitted(1, 19) Source(2, 12) + SourceIndex(0) +3 >Emitted(1, 21) Source(2, 6) + SourceIndex(0) +4 >Emitted(1, 48) Source(2, 12) + SourceIndex(0) +5 >Emitted(1, 49) Source(2, 23) + SourceIndex(0) +--- +>>>//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.symbols b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.symbols new file mode 100644 index 00000000000..6c368f4996e --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.symbols @@ -0,0 +1,5 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.ts === + +var [x = 20] = [1, 2]; +>x : Symbol(x, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.ts, 1, 5)) + diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.types b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.types new file mode 100644 index 00000000000..1b94874ae7c --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.types @@ -0,0 +1,9 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.ts === + +var [x = 20] = [1, 2]; +>x : number +>20 : number +>[1, 2] : [number, number] +>1 : number +>2 : number + diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.js b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.js new file mode 100644 index 00000000000..73d2e85e9da --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.js @@ -0,0 +1,7 @@ +//// [sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.ts] + +var [x = 20, j] = [1, 2]; + +//// [sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.js] +var _a = [1, 2], _b = _a[0], x = _b === void 0 ? 20 : _b, j = _a[1]; +//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.js.map new file mode 100644 index 00000000000..0def6b1a730 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.js.map @@ -0,0 +1,2 @@ +//// [sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.js.map] +{"version":3,"file":"sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.ts"],"names":[],"mappings":"AACA,IAAA,WAAwB,EAAnB,UAAM,EAAN,2BAAM,EAAE,SAAC,CAAW"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.sourcemap.txt new file mode 100644 index 00000000000..f2a95375f2a --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.sourcemap.txt @@ -0,0 +1,45 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.js +mapUrl: sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.js.map +sourceRoot: +sources: sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.js +sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.ts +------------------------------------------------------------------- +>>>var _a = [1, 2], _b = _a[0], x = _b === void 0 ? 20 : _b, j = _a[1]; +1 > +2 >^^^^ +3 > ^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^ +10> ^ +11> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 > +3 > var [x = 20, j] = [1, 2] +4 > +5 > x = 20 +6 > +7 > x = 20 +8 > , +9 > j +10> ] = [1, 2]; +1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(2, 1) + SourceIndex(0) +3 >Emitted(1, 16) Source(2, 25) + SourceIndex(0) +4 >Emitted(1, 18) Source(2, 6) + SourceIndex(0) +5 >Emitted(1, 28) Source(2, 12) + SourceIndex(0) +6 >Emitted(1, 30) Source(2, 6) + SourceIndex(0) +7 >Emitted(1, 57) Source(2, 12) + SourceIndex(0) +8 >Emitted(1, 59) Source(2, 14) + SourceIndex(0) +9 >Emitted(1, 68) Source(2, 15) + SourceIndex(0) +10>Emitted(1, 69) Source(2, 26) + SourceIndex(0) +--- +>>>//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.symbols b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.symbols new file mode 100644 index 00000000000..4f57dffff26 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.symbols @@ -0,0 +1,6 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.ts === + +var [x = 20, j] = [1, 2]; +>x : Symbol(x, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.ts, 1, 5)) +>j : Symbol(j, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.ts, 1, 12)) + diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.types b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.types new file mode 100644 index 00000000000..9b369e410a4 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.types @@ -0,0 +1,10 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.ts === + +var [x = 20, j] = [1, 2]; +>x : number +>20 : number +>j : number +>[1, 2] : [number, number] +>1 : number +>2 : number + diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.js b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.js new file mode 100644 index 00000000000..8259981857c --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.js @@ -0,0 +1,7 @@ +//// [sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.ts] + +var {x} = { x: 20 }; + +//// [sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.js] +var x = { x: 20 }.x; +//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.js.map new file mode 100644 index 00000000000..5ecd5985927 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.js.map @@ -0,0 +1,2 @@ +//// [sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.js.map] +{"version":3,"file":"sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.ts"],"names":[],"mappings":"AACK,mBAAC,CAAc"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.sourcemap.txt new file mode 100644 index 00000000000..8e5860c7a77 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.sourcemap.txt @@ -0,0 +1,24 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.js +mapUrl: sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.js.map +sourceRoot: +sources: sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.js +sourceFile:sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.ts +------------------------------------------------------------------- +>>>var x = { x: 20 }.x; +1 > +2 >^^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >var { +2 >x +3 > } = { x: 20 }; +1 >Emitted(1, 1) Source(2, 6) + SourceIndex(0) +2 >Emitted(1, 20) Source(2, 7) + SourceIndex(0) +3 >Emitted(1, 21) Source(2, 21) + SourceIndex(0) +--- +>>>//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.symbols b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.symbols new file mode 100644 index 00000000000..950fca4eb00 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.symbols @@ -0,0 +1,6 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.ts === + +var {x} = { x: 20 }; +>x : Symbol(x, Decl(sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.ts, 1, 5)) +>x : Symbol(x, Decl(sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.ts, 1, 11)) + diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.types b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.types new file mode 100644 index 00000000000..c975a9eaae5 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.types @@ -0,0 +1,8 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.ts === + +var {x} = { x: 20 }; +>x : number +>{ x: 20 } : { x: number; } +>x : number +>20 : number + diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.js b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.js new file mode 100644 index 00000000000..d4d52e5e8d9 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.js @@ -0,0 +1,9 @@ +//// [sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.ts] + +var {x} = { x: 20 }; +var { a, b } = { a: 30, b: 40 }; + +//// [sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.js] +var x = { x: 20 }.x; +var _a = { a: 30, b: 40 }, a = _a.a, b = _a.b; +//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.js.map new file mode 100644 index 00000000000..6d3a8b40d22 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.js.map @@ -0,0 +1,2 @@ +//// [sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.js.map] +{"version":3,"file":"sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.ts"],"names":[],"mappings":"AACK,mBAAC,CAAc;AACpB,IAAA,qBAA+B,EAAzB,QAAC,EAAE,QAAC,CAAsB"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.sourcemap.txt new file mode 100644 index 00000000000..e9454cb2bfa --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.sourcemap.txt @@ -0,0 +1,52 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.js +mapUrl: sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.js.map +sourceRoot: +sources: sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.js +sourceFile:sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.ts +------------------------------------------------------------------- +>>>var x = { x: 20 }.x; +1 > +2 >^^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >var { +2 >x +3 > } = { x: 20 }; +1 >Emitted(1, 1) Source(2, 6) + SourceIndex(0) +2 >Emitted(1, 20) Source(2, 7) + SourceIndex(0) +3 >Emitted(1, 21) Source(2, 21) + SourceIndex(0) +--- +>>>var _a = { a: 30, b: 40 }, a = _a.a, b = _a.b; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^ +8 > ^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 > +3 > var { a, b } = { a: 30, b: 40 } +4 > +5 > a +6 > , +7 > b +8 > } = { a: 30, b: 40 }; +1->Emitted(2, 1) Source(3, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(3, 1) + SourceIndex(0) +3 >Emitted(2, 26) Source(3, 32) + SourceIndex(0) +4 >Emitted(2, 28) Source(3, 7) + SourceIndex(0) +5 >Emitted(2, 36) Source(3, 8) + SourceIndex(0) +6 >Emitted(2, 38) Source(3, 10) + SourceIndex(0) +7 >Emitted(2, 46) Source(3, 11) + SourceIndex(0) +8 >Emitted(2, 47) Source(3, 33) + SourceIndex(0) +--- +>>>//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.symbols b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.symbols new file mode 100644 index 00000000000..4fa80ecf05e --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.symbols @@ -0,0 +1,12 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.ts === + +var {x} = { x: 20 }; +>x : Symbol(x, Decl(sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.ts, 1, 5)) +>x : Symbol(x, Decl(sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.ts, 1, 11)) + +var { a, b } = { a: 30, b: 40 }; +>a : Symbol(a, Decl(sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.ts, 2, 5)) +>b : Symbol(b, Decl(sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.ts, 2, 8)) +>a : Symbol(a, Decl(sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.ts, 2, 16)) +>b : Symbol(b, Decl(sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.ts, 2, 23)) + diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.types b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.types new file mode 100644 index 00000000000..a694d4ecd29 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.types @@ -0,0 +1,17 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.ts === + +var {x} = { x: 20 }; +>x : number +>{ x: 20 } : { x: number; } +>x : number +>20 : number + +var { a, b } = { a: 30, b: 40 }; +>a : number +>b : number +>{ a: 30, b: 40 } : { a: number; b: number; } +>a : number +>30 : number +>b : number +>40 : number + diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.js b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.js new file mode 100644 index 00000000000..f146e4bb8a7 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.js @@ -0,0 +1,7 @@ +//// [sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.ts] + +var {x = 500} = { x: 20 }; + +//// [sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.js] +var _a = { x: 20 }.x, x = _a === void 0 ? 500 : _a; +//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.js.map new file mode 100644 index 00000000000..975a48aa0ee --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.js.map @@ -0,0 +1,2 @@ +//// [sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.js.map] +{"version":3,"file":"sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.ts"],"names":[],"mappings":"AACK,oBAAO,EAAP,4BAAO,CAAc"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.sourcemap.txt new file mode 100644 index 00000000000..2fa0c81199b --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.sourcemap.txt @@ -0,0 +1,30 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.js +mapUrl: sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.js.map +sourceRoot: +sources: sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.js +sourceFile:sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.ts +------------------------------------------------------------------- +>>>var _a = { x: 20 }.x, x = _a === void 0 ? 500 : _a; +1 > +2 >^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >var { +2 >x = 500 +3 > +4 > x = 500 +5 > } = { x: 20 }; +1 >Emitted(1, 1) Source(2, 6) + SourceIndex(0) +2 >Emitted(1, 21) Source(2, 13) + SourceIndex(0) +3 >Emitted(1, 23) Source(2, 6) + SourceIndex(0) +4 >Emitted(1, 51) Source(2, 13) + SourceIndex(0) +5 >Emitted(1, 52) Source(2, 27) + SourceIndex(0) +--- +>>>//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.symbols b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.symbols new file mode 100644 index 00000000000..a668ab8e733 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.symbols @@ -0,0 +1,6 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.ts === + +var {x = 500} = { x: 20 }; +>x : Symbol(x, Decl(sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.ts, 1, 5)) +>x : Symbol(x, Decl(sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.ts, 1, 17)) + diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.types b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.types new file mode 100644 index 00000000000..bec1b195c98 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.types @@ -0,0 +1,9 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.ts === + +var {x = 500} = { x: 20 }; +>x : number +>500 : number +>{ x: 20 } : { x?: number; } +>x : number +>20 : number + diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.js b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.js new file mode 100644 index 00000000000..d785d2dd1fd --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.js @@ -0,0 +1,8 @@ +//// [sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.ts] + +var {x = 500, + y} = { x: 20, y: "hi" }; + +//// [sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.js] +var _a = { x: 20, y: "hi" }, _b = _a.x, x = _b === void 0 ? 500 : _b, y = _a.y; +//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.js.map new file mode 100644 index 00000000000..e0b108863b0 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.js.map @@ -0,0 +1,2 @@ +//// [sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.js.map] +{"version":3,"file":"sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.ts"],"names":[],"mappings":"AACA,IAAA,uBAC4B,EADvB,SAAO,EAAP,4BAAO,EACP,QAAC,CAAuB"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.sourcemap.txt new file mode 100644 index 00000000000..6ae979f8ade --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.sourcemap.txt @@ -0,0 +1,47 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.js +mapUrl: sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.js.map +sourceRoot: +sources: sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.js +sourceFile:sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.ts +------------------------------------------------------------------- +>>>var _a = { x: 20, y: "hi" }, _b = _a.x, x = _b === void 0 ? 500 : _b, y = _a.y; +1 > +2 >^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^ +10> ^ +11> ^^^^^^^^^^^^^^^^^^-> +1 > + > +2 > +3 > var {x = 500, + > y} = { x: 20, y: "hi" } +4 > +5 > x = 500 +6 > +7 > x = 500 +8 > , + > +9 > y +10> } = { x: 20, y: "hi" }; +1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(2, 1) + SourceIndex(0) +3 >Emitted(1, 28) Source(3, 29) + SourceIndex(0) +4 >Emitted(1, 30) Source(2, 6) + SourceIndex(0) +5 >Emitted(1, 39) Source(2, 13) + SourceIndex(0) +6 >Emitted(1, 41) Source(2, 6) + SourceIndex(0) +7 >Emitted(1, 69) Source(2, 13) + SourceIndex(0) +8 >Emitted(1, 71) Source(3, 6) + SourceIndex(0) +9 >Emitted(1, 79) Source(3, 7) + SourceIndex(0) +10>Emitted(1, 80) Source(3, 30) + SourceIndex(0) +--- +>>>//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.symbols b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.symbols new file mode 100644 index 00000000000..8404c342c0b --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.symbols @@ -0,0 +1,10 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.ts === + +var {x = 500, +>x : Symbol(x, Decl(sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.ts, 1, 5)) + + y} = { x: 20, y: "hi" }; +>y : Symbol(y, Decl(sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.ts, 1, 13)) +>x : Symbol(x, Decl(sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.ts, 2, 11)) +>y : Symbol(y, Decl(sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.ts, 2, 18)) + diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.types b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.types new file mode 100644 index 00000000000..1d00ac2d56b --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.types @@ -0,0 +1,14 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.ts === + +var {x = 500, +>x : number +>500 : number + + y} = { x: 20, y: "hi" }; +>y : string +>{ x: 20, y: "hi" } : { x?: number; y: string; } +>x : number +>20 : number +>y : string +>"hi" : string + diff --git a/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.ts b/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.ts new file mode 100644 index 00000000000..da41b8ca49f --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.ts @@ -0,0 +1,3 @@ +// @sourcemap: true + +var [x] = [1, 2]; \ No newline at end of file diff --git a/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.ts b/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.ts new file mode 100644 index 00000000000..8e9d05fadd5 --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.ts @@ -0,0 +1,4 @@ +// @sourcemap: true + +var [x] = [1, 2]; +var [y, z] = [1, 2]; \ No newline at end of file diff --git a/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.ts b/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.ts new file mode 100644 index 00000000000..6c3ea7bedd7 --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.ts @@ -0,0 +1,3 @@ +// @sourcemap: true + +var [x = 20] = [1, 2]; \ No newline at end of file diff --git a/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.ts b/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.ts new file mode 100644 index 00000000000..d9d91eb578b --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.ts @@ -0,0 +1,3 @@ +// @sourcemap: true + +var [x = 20, j] = [1, 2]; \ No newline at end of file diff --git a/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.ts b/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.ts new file mode 100644 index 00000000000..5af6b55272f --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.ts @@ -0,0 +1,3 @@ +// @sourcemap: true + +var {x = 500} = { x: 20 }; \ No newline at end of file diff --git a/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.ts b/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.ts new file mode 100644 index 00000000000..e0afcb60c27 --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.ts @@ -0,0 +1,4 @@ +// @sourcemap: true + +var {x = 500, + y} = { x: 20, y: "hi" }; \ No newline at end of file From a4c6f666862d14e187bb7e09615fdfc0c92ab875 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Mon, 1 Feb 2016 20:59:37 -0800 Subject: [PATCH 154/160] Treat multiple prototype property assignments as union property declarations --- src/compiler/checker.ts | 2 +- .../getJavaScriptSemanticDiagnostics24.ts | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 tests/cases/fourslash/getJavaScriptSemanticDiagnostics24.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 61c05d7688c..5cce092febe 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -2827,7 +2827,7 @@ namespace ts { } // Handle module.exports = expr if (declaration.kind === SyntaxKind.BinaryExpression) { - return links.type = checkExpression((declaration).right); + return links.type = getUnionType(map(symbol.declarations, (decl: BinaryExpression) => checkExpressionCached(decl.right))); } if (declaration.kind === SyntaxKind.PropertyAccessExpression) { // Declarations only exist for property access expressions for certain diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics24.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics24.ts new file mode 100644 index 00000000000..cf70f883e99 --- /dev/null +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics24.ts @@ -0,0 +1,16 @@ +/// + +// @allowJs: true +// @Filename: a.js +//// function Person(age) { +//// if (age >= 18) { +//// this.canVote = true; +//// } else { +//// this.canVote = 23; +//// } +//// } +//// let x = new Person(100); +//// x.canVote/**/; + +goTo.marker(); +verify.quickInfoIs('(property) Person.canVote: boolean | number'); From 3dfd378b7e0cf6fb685c63410439fdd12a672fb9 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Mon, 1 Feb 2016 21:20:37 -0800 Subject: [PATCH 155/160] Add some tests --- .../fourslash/getJavaScriptCompletions16.ts | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/tests/cases/fourslash/getJavaScriptCompletions16.ts b/tests/cases/fourslash/getJavaScriptCompletions16.ts index 07c50d3f892..4d4b76d98d6 100644 --- a/tests/cases/fourslash/getJavaScriptCompletions16.ts +++ b/tests/cases/fourslash/getJavaScriptCompletions16.ts @@ -10,9 +10,26 @@ //// * @param {number} a //// */ //// constructor(a, b) { -//// a./**/ +//// a/*body*/ +//// } +//// +//// /** +//// * @param {number} a +//// */ +//// method(a) { +//// a/*method*/ //// } //// } +//// let x = new Something(/*sig*/); -goTo.marker(); +goTo.marker('body'); +edit.insert('.'); +verify.completionListContains('toFixed', undefined, undefined, 'method'); +edit.backspace(); + +goTo.marker('sig'); +verify.currentSignatureHelpIs('Something(a: number, b: any): Something'); + +goTo.marker('method'); +edit.insert('.'); verify.completionListContains('toFixed', undefined, undefined, 'method'); From b15ff81384f33e17bb8e10e10d5992cd6727e68c Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Mon, 1 Feb 2016 21:48:16 -0800 Subject: [PATCH 156/160] Add malformed parameter test --- tests/cases/fourslash/getJavaScriptQuickInfo7.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/cases/fourslash/getJavaScriptQuickInfo7.ts b/tests/cases/fourslash/getJavaScriptQuickInfo7.ts index 9faf97e7951..5aa8474757d 100644 --- a/tests/cases/fourslash/getJavaScriptQuickInfo7.ts +++ b/tests/cases/fourslash/getJavaScriptQuickInfo7.ts @@ -5,8 +5,9 @@ //// /** //// * This is a very cool function that is very nice. //// * @returns something +//// * @param p anotherthing //// */ -//// function a1() { +//// function a1(p) { //// try { //// throw new Error('x'); //// } catch (x) { x--; } From dbfc269e42a04cd8be5262a4f8a8b5c1c4b38343 Mon Sep 17 00:00:00 2001 From: T18970237136 Date: Tue, 2 Feb 2016 08:54:07 +0100 Subject: [PATCH 157/160] Add missing semicolon when emitting return statement. Fixes #6824. --- src/compiler/emitter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 337a480f36a..e86d86603b4 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -3162,7 +3162,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge } else { // top level converted loop - return unwrapped value - write(`return ${loopResult}.value`); + write(`return ${loopResult}.value;`); } writeLine(); } From 757f4703a9d1bd205d727a9a1efeca9326f57dbb Mon Sep 17 00:00:00 2001 From: T18970237136 Date: Tue, 2 Feb 2016 10:30:39 +0100 Subject: [PATCH 158/160] Update test files. --- .../reference/capturedLetConstInLoop11.js | 2 +- .../reference/capturedLetConstInLoop5.js | 40 +++++++++---------- .../reference/capturedLetConstInLoop8.js | 4 +- .../reference/capturedLetConstInLoop9.js | 2 +- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/tests/baselines/reference/capturedLetConstInLoop11.js b/tests/baselines/reference/capturedLetConstInLoop11.js index fa295739d02..9190dd3ec02 100644 --- a/tests/baselines/reference/capturedLetConstInLoop11.js +++ b/tests/baselines/reference/capturedLetConstInLoop11.js @@ -30,6 +30,6 @@ function foo() { }; for (;;) { var state_2 = _loop_2(); - if (typeof state_2 === "object") return state_2.value + if (typeof state_2 === "object") return state_2.value; } } diff --git a/tests/baselines/reference/capturedLetConstInLoop5.js b/tests/baselines/reference/capturedLetConstInLoop5.js index 7807edd122e..a1a4d4b0a8f 100644 --- a/tests/baselines/reference/capturedLetConstInLoop5.js +++ b/tests/baselines/reference/capturedLetConstInLoop5.js @@ -294,7 +294,7 @@ function foo0(x) { for (var _i = 0, _a = []; _i < _a.length; _i++) { var x_1 = _a[_i]; var state_1 = _loop_1(x_1); - if (typeof state_1 === "object") return state_1.value + if (typeof state_1 === "object") return state_1.value; } use(v); } @@ -310,7 +310,7 @@ function foo00(x) { var v; for (var x_2 in []) { var state_2 = _loop_2(x_2); - if (typeof state_2 === "object") return state_2.value + if (typeof state_2 === "object") return state_2.value; } use(v); } @@ -326,7 +326,7 @@ function foo1(x) { var v; for (var x_3 = 0; x_3 < 1; ++x_3) { var state_3 = _loop_3(x_3); - if (typeof state_3 === "object") return state_3.value + if (typeof state_3 === "object") return state_3.value; } use(v); } @@ -343,7 +343,7 @@ function foo2(x) { var v; while (1 === 1) { var state_4 = _loop_4(); - if (typeof state_4 === "object") return state_4.value + if (typeof state_4 === "object") return state_4.value; } use(v); } @@ -359,7 +359,7 @@ function foo3(x) { var v; do { var state_5 = _loop_5(); - if (typeof state_5 === "object") return state_5.value + if (typeof state_5 === "object") return state_5.value; } while (1 === 1); use(v); } @@ -376,7 +376,7 @@ function foo4(x) { var v; for (var y = 0; y < 1; ++y) { var state_6 = _loop_6(y); - if (typeof state_6 === "object") return state_6.value + if (typeof state_6 === "object") return state_6.value; } use(v); } @@ -392,7 +392,7 @@ function foo5(x) { var v; for (var x_7 = 0, y = 1; x_7 < 1; ++x_7) { var state_7 = _loop_7(x_7, y); - if (typeof state_7 === "object") return state_7.value + if (typeof state_7 === "object") return state_7.value; } use(v); } @@ -409,7 +409,7 @@ function foo6(x) { var v; while (1 === 1) { var state_8 = _loop_8(); - if (typeof state_8 === "object") return state_8.value + if (typeof state_8 === "object") return state_8.value; } ; use(v); @@ -427,7 +427,7 @@ function foo7(x) { var v; do { var state_9 = _loop_9(); - if (typeof state_9 === "object") return state_9.value + if (typeof state_9 === "object") return state_9.value; } while (1 === 1); use(v); } @@ -444,7 +444,7 @@ function foo8(x) { var v; for (var y = 0; y < 1; ++y) { var state_10 = _loop_10(y); - if (typeof state_10 === "object") return state_10.value + if (typeof state_10 === "object") return state_10.value; } use(v); } @@ -462,7 +462,7 @@ function foo0_c(x) { for (var _i = 0, _a = []; _i < _a.length; _i++) { var x_11 = _a[_i]; var state_11 = _loop_11(x_11); - if (typeof state_11 === "object") return state_11.value + if (typeof state_11 === "object") return state_11.value; } use(v); } @@ -478,7 +478,7 @@ function foo00_c(x) { var v; for (var x_12 in []) { var state_12 = _loop_12(x_12); - if (typeof state_12 === "object") return state_12.value + if (typeof state_12 === "object") return state_12.value; } use(v); } @@ -494,7 +494,7 @@ function foo1_c(x) { var v; for (var x_13 = 0; x_13 < 1;) { var state_13 = _loop_13(x_13); - if (typeof state_13 === "object") return state_13.value + if (typeof state_13 === "object") return state_13.value; } use(v); } @@ -511,7 +511,7 @@ function foo2_c(x) { var v; while (1 === 1) { var state_14 = _loop_14(); - if (typeof state_14 === "object") return state_14.value + if (typeof state_14 === "object") return state_14.value; } use(v); } @@ -527,7 +527,7 @@ function foo3_c(x) { var v; do { var state_15 = _loop_15(); - if (typeof state_15 === "object") return state_15.value + if (typeof state_15 === "object") return state_15.value; } while (1 === 1); use(v); } @@ -544,7 +544,7 @@ function foo4_c(x) { var v; for (var y = 0; y < 1;) { var state_16 = _loop_16(y); - if (typeof state_16 === "object") return state_16.value + if (typeof state_16 === "object") return state_16.value; } use(v); } @@ -560,7 +560,7 @@ function foo5_c(x) { var v; for (var x_17 = 0, y = 1; x_17 < 1;) { var state_17 = _loop_17(x_17, y); - if (typeof state_17 === "object") return state_17.value + if (typeof state_17 === "object") return state_17.value; } use(v); } @@ -577,7 +577,7 @@ function foo6_c(x) { var v; while (1 === 1) { var state_18 = _loop_18(); - if (typeof state_18 === "object") return state_18.value + if (typeof state_18 === "object") return state_18.value; } use(v); } @@ -594,7 +594,7 @@ function foo7_c(x) { var v; do { var state_19 = _loop_19(); - if (typeof state_19 === "object") return state_19.value + if (typeof state_19 === "object") return state_19.value; } while (1 === 1); use(v); } @@ -611,7 +611,7 @@ function foo8_c(x) { var v; for (var y = 0; y < 1;) { var state_20 = _loop_20(y); - if (typeof state_20 === "object") return state_20.value + if (typeof state_20 === "object") return state_20.value; } use(v); } diff --git a/tests/baselines/reference/capturedLetConstInLoop8.js b/tests/baselines/reference/capturedLetConstInLoop8.js index b10beb7b44e..560b99bb566 100644 --- a/tests/baselines/reference/capturedLetConstInLoop8.js +++ b/tests/baselines/reference/capturedLetConstInLoop8.js @@ -198,7 +198,7 @@ function foo() { }; l1: for (var x = 0; x < 1; ++x) { var state_2 = _loop_1(x); - if (typeof state_2 === "object") return state_2.value + if (typeof state_2 === "object") return state_2.value; if (state_2 === "break") break; if (state_2 === "continue") continue; switch(state_2) { @@ -280,7 +280,7 @@ function foo_c() { }; l1: for (var x = 0; x < 1;) { var state_4 = _loop_3(x); - if (typeof state_4 === "object") return state_4.value + if (typeof state_4 === "object") return state_4.value; if (state_4 === "break") break; if (state_4 === "continue") continue; switch(state_4) { diff --git a/tests/baselines/reference/capturedLetConstInLoop9.js b/tests/baselines/reference/capturedLetConstInLoop9.js index cbd4f7efe79..1f79b1694cb 100644 --- a/tests/baselines/reference/capturedLetConstInLoop9.js +++ b/tests/baselines/reference/capturedLetConstInLoop9.js @@ -225,7 +225,7 @@ function foo() { l0: for (var _f = 0, _g = []; _f < _g.length; _f++) { var a = _g[_f]; var state_4 = _loop_3(a); - if (typeof state_4 === "object") return state_4.value + if (typeof state_4 === "object") return state_4.value; if (state_4 === "break") break; switch(state_4) { case "break-l0": break l0; From fb99a6697d10d3b6143fef06ec33278a94ecbcb6 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Tue, 2 Feb 2016 11:36:38 -0800 Subject: [PATCH 159/160] do not error if typings for external library is empty .d.ts file --- src/compiler/program.ts | 2 +- tests/baselines/reference/noErrorOnEmptyDts.js | 13 +++++++++++++ tests/baselines/reference/noErrorOnEmptyDts.symbols | 8 ++++++++ tests/baselines/reference/noErrorOnEmptyDts.types | 8 ++++++++ tests/cases/compiler/noErrorOnEmptyDts.ts | 8 ++++++++ 5 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 tests/baselines/reference/noErrorOnEmptyDts.js create mode 100644 tests/baselines/reference/noErrorOnEmptyDts.symbols create mode 100644 tests/baselines/reference/noErrorOnEmptyDts.types create mode 100644 tests/cases/compiler/noErrorOnEmptyDts.ts diff --git a/src/compiler/program.ts b/src/compiler/program.ts index fd3d44ff3f0..9852b2354e2 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -1490,7 +1490,7 @@ namespace ts { if (importedFile && resolution.isExternalLibraryImport) { // Since currently irrespective of allowJs, we only look for supportedTypeScript extension external module files, // this check is ok. Otherwise this would be never true for javascript file - if (!isExternalModule(importedFile)) { + if (!isExternalModule(importedFile) && importedFile.statements.length) { const start = getTokenPosOfNode(file.imports[i], file); fileProcessingDiagnostics.add(createFileDiagnostic(file, start, file.imports[i].end - start, Diagnostics.Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_the_package_definition, importedFile.fileName)); } diff --git a/tests/baselines/reference/noErrorOnEmptyDts.js b/tests/baselines/reference/noErrorOnEmptyDts.js new file mode 100644 index 00000000000..83595e3d2ad --- /dev/null +++ b/tests/baselines/reference/noErrorOnEmptyDts.js @@ -0,0 +1,13 @@ +//// [tests/cases/compiler/noErrorOnEmptyDts.ts] //// + +//// [test.d.ts] + + +// comment + +//// [main.ts] +import "test" + +//// [main.js] +"use strict"; +require("test"); diff --git a/tests/baselines/reference/noErrorOnEmptyDts.symbols b/tests/baselines/reference/noErrorOnEmptyDts.symbols new file mode 100644 index 00000000000..78446a19fb8 --- /dev/null +++ b/tests/baselines/reference/noErrorOnEmptyDts.symbols @@ -0,0 +1,8 @@ +=== c:/node_modules/test.d.ts === + +No type information for this code. +No type information for this code.// comment +No type information for this code. +No type information for this code.=== c:/app/main.ts === +import "test" +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/noErrorOnEmptyDts.types b/tests/baselines/reference/noErrorOnEmptyDts.types new file mode 100644 index 00000000000..78446a19fb8 --- /dev/null +++ b/tests/baselines/reference/noErrorOnEmptyDts.types @@ -0,0 +1,8 @@ +=== c:/node_modules/test.d.ts === + +No type information for this code. +No type information for this code.// comment +No type information for this code. +No type information for this code.=== c:/app/main.ts === +import "test" +No type information for this code. \ No newline at end of file diff --git a/tests/cases/compiler/noErrorOnEmptyDts.ts b/tests/cases/compiler/noErrorOnEmptyDts.ts new file mode 100644 index 00000000000..1266ea2bd75 --- /dev/null +++ b/tests/cases/compiler/noErrorOnEmptyDts.ts @@ -0,0 +1,8 @@ +// @module: commonjs + +// @filename: c:/node_modules/test.d.ts + +// comment + +// @filename: c:/app/main.ts +import "test" \ No newline at end of file From 8e472db66f78e32bfba57a9c873f2525499864b7 Mon Sep 17 00:00:00 2001 From: Tim Viiding-Spader Date: Tue, 2 Feb 2016 15:44:47 -0600 Subject: [PATCH 160/160] Delete mention of nonexistent watcherPath param It doesn't exist now. It didn't exist in the commit that first mentioned it. --- src/compiler/sys.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index bf25d39aa43..9c3972b2756 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -373,9 +373,6 @@ namespace ts { } } - /** - * @param watcherPath is the path from which the watcher is triggered. - */ function fileEventHandler(eventName: string, relativeFileName: string, baseDirPath: Path) { // When files are deleted from disk, the triggered "rename" event would have a relativefileName of "undefined" const filePath = typeof relativeFileName !== "string"