Skip to content

Commit 68c0e52

Browse files
committed
Accept new symbol baselines, ensure expected ordering for default libs
1 parent 8d230fc commit 68c0e52

File tree

1,516 files changed

+9031
-9008
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,516 files changed

+9031
-9008
lines changed

src/compiler/commandLineParser.ts

+35-34
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,44 @@ namespace ts {
22
/* @internal */
33
export const compileOnSaveCommandLineOption: CommandLineOption = { name: "compileOnSave", type: "boolean" };
44

5-
const commandLineLibMap = createMapFromTemplate({
5+
// NOTE: The order here is important to default lib ordering
6+
const commandLineLibMap = createMapFromEntries([
67
// JavaScript only
7-
"es5": "lib.es5.d.ts",
8-
"es6": "lib.es2015.d.ts",
9-
"es2015": "lib.es2015.d.ts",
10-
"es7": "lib.es2016.d.ts",
11-
"es2016": "lib.es2016.d.ts",
12-
"es2017": "lib.es2017.d.ts",
13-
"es2018": "lib.es2018.d.ts",
14-
"esnext": "lib.esnext.d.ts",
8+
["es5", "lib.es5.d.ts"],
9+
["es6", "lib.es2015.d.ts"],
10+
["es2015", "lib.es2015.d.ts"],
11+
["es7", "lib.es2016.d.ts"],
12+
["es2016", "lib.es2016.d.ts"],
13+
["es2017", "lib.es2017.d.ts"],
14+
["es2018", "lib.es2018.d.ts"],
15+
["esnext", "lib.esnext.d.ts"],
1516
// Host only
16-
"dom": "lib.dom.d.ts",
17-
"dom.iterable": "lib.dom.iterable.d.ts",
18-
"webworker": "lib.webworker.d.ts",
19-
"scripthost": "lib.scripthost.d.ts",
17+
["dom", "lib.dom.d.ts"],
18+
["dom.iterable", "lib.dom.iterable.d.ts"],
19+
["webworker", "lib.webworker.d.ts"],
20+
["scripthost", "lib.scripthost.d.ts"],
2021
// ES2015 Or ESNext By-feature options
21-
"es2015.core": "lib.es2015.core.d.ts",
22-
"es2015.collection": "lib.es2015.collection.d.ts",
23-
"es2015.generator": "lib.es2015.generator.d.ts",
24-
"es2015.iterable": "lib.es2015.iterable.d.ts",
25-
"es2015.promise": "lib.es2015.promise.d.ts",
26-
"es2015.proxy": "lib.es2015.proxy.d.ts",
27-
"es2015.reflect": "lib.es2015.reflect.d.ts",
28-
"es2015.symbol": "lib.es2015.symbol.d.ts",
29-
"es2015.symbol.wellknown": "lib.es2015.symbol.wellknown.d.ts",
30-
"es2016.array.include": "lib.es2016.array.include.d.ts",
31-
"es2017.object": "lib.es2017.object.d.ts",
32-
"es2017.sharedmemory": "lib.es2017.sharedmemory.d.ts",
33-
"es2017.string": "lib.es2017.string.d.ts",
34-
"es2017.intl": "lib.es2017.intl.d.ts",
35-
"es2017.typedarrays": "lib.es2017.typedarrays.d.ts",
36-
"es2018.intl": "lib.es2018.intl.d.ts",
37-
"es2018.promise": "lib.es2018.promise.d.ts",
38-
"es2018.regexp": "lib.es2018.regexp.d.ts",
39-
"esnext.array": "lib.esnext.array.d.ts",
40-
"esnext.asynciterable": "lib.esnext.asynciterable.d.ts",
41-
});
22+
["es2015.core", "lib.es2015.core.d.ts"],
23+
["es2015.collection", "lib.es2015.collection.d.ts"],
24+
["es2015.generator", "lib.es2015.generator.d.ts"],
25+
["es2015.iterable", "lib.es2015.iterable.d.ts"],
26+
["es2015.promise", "lib.es2015.promise.d.ts"],
27+
["es2015.proxy", "lib.es2015.proxy.d.ts"],
28+
["es2015.reflect", "lib.es2015.reflect.d.ts"],
29+
["es2015.symbol", "lib.es2015.symbol.d.ts"],
30+
["es2015.symbol.wellknown", "lib.es2015.symbol.wellknown.d.ts"],
31+
["es2016.array.include", "lib.es2016.array.include.d.ts"],
32+
["es2017.object", "lib.es2017.object.d.ts"],
33+
["es2017.sharedmemory", "lib.es2017.sharedmemory.d.ts"],
34+
["es2017.string", "lib.es2017.string.d.ts"],
35+
["es2017.intl", "lib.es2017.intl.d.ts"],
36+
["es2017.typedarrays", "lib.es2017.typedarrays.d.ts"],
37+
["es2018.intl", "lib.es2018.intl.d.ts"],
38+
["es2018.promise", "lib.es2018.promise.d.ts"],
39+
["es2018.regexp", "lib.es2018.regexp.d.ts"],
40+
["esnext.array", "lib.esnext.array.d.ts"],
41+
["esnext.asynciterable", "lib.esnext.asynciterable.d.ts"],
42+
]);
4243

4344
// Internally we add some additional lib references that we only support when used as part of a
4445
// "lib" reference directive. They are not available on the command line or in tsconfig.json.

src/compiler/core.ts

+8
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@ namespace ts {
5959
return result;
6060
}
6161

62+
export function createMapFromEntries<T>(entries: [string, T][]): Map<T> {
63+
const map = createMap<T>();
64+
for (const [key, value] of entries) {
65+
map.set(key, value);
66+
}
67+
return map;
68+
}
69+
6270
export function createMapFromTemplate<T>(template?: MapLike<T>): Map<T> {
6371
const map: Map<T> = new MapCtr<T>();
6472

src/compiler/program.ts

+30-6
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,9 @@ namespace ts {
493493
*/
494494
export function createProgram(rootNames: ReadonlyArray<string>, options: CompilerOptions, host?: CompilerHost, oldProgram?: Program, configFileParsingDiagnostics?: ReadonlyArray<Diagnostic>): Program {
495495
let program: Program;
496-
let files: SourceFile[] = [];
496+
let processingDefaultLibFiles: SourceFile[] | undefined;
497+
let processingOtherFiles: SourceFile[] | undefined;
498+
let files: SourceFile[] | undefined;
497499
let commonSourceDirectory: string;
498500
let diagnosticsProducingTypeChecker: TypeChecker;
499501
let noDiagnosticsTypeChecker: TypeChecker;
@@ -584,6 +586,8 @@ namespace ts {
584586
const shouldCreateNewSourceFile = shouldProgramCreateNewSourceFiles(oldProgram, options);
585587
const structuralIsReused = tryReuseStructureFromOldProgram();
586588
if (structuralIsReused !== StructureIsReused.Completely) {
589+
processingDefaultLibFiles = [];
590+
processingOtherFiles = [];
587591
forEach(rootNames, name => processRootFile(name, /*isDefaultLib*/ false, /*ignoreNoDefaultLib*/ false));
588592

589593
// load type declarations specified via 'types' argument or implicitly from types/ and node_modules/@types folders
@@ -618,6 +622,9 @@ namespace ts {
618622
}
619623

620624
missingFilePaths = arrayFrom(filesByName.keys(), p => <Path>p).filter(p => !filesByName.get(p));
625+
files = stableSort(processingDefaultLibFiles, compareDefaultLibFiles).concat(processingOtherFiles);
626+
processingDefaultLibFiles = undefined;
627+
processingOtherFiles = undefined;
621628
}
622629

623630
Debug.assert(!!missingFilePaths);
@@ -677,6 +684,21 @@ namespace ts {
677684

678685
return program;
679686

687+
function compareDefaultLibFiles(a: SourceFile, b: SourceFile) {
688+
return compareValues(getDefaultLibFilePriority(a), getDefaultLibFilePriority(b));
689+
}
690+
691+
function getDefaultLibFilePriority(a: SourceFile) {
692+
if (containsPath(defaultLibraryPath, a.fileName, /*ignoreCase*/ false)) {
693+
const basename = getBaseFileName(a.fileName);
694+
if (basename === "lib.d.ts" || basename === "lib.es6.d.ts") return 0;
695+
const name = removeSuffix(removePrefix(basename, "lib."), ".d.ts");
696+
const index = libs.indexOf(name);
697+
if (index !== -1) return index + 1;
698+
}
699+
return libs.length + 2;
700+
}
701+
680702
function getResolvedModuleWithFailedLookupLocationsFromCache(moduleName: string, containingFile: string): ResolvedModuleWithFailedLookupLocations {
681703
return moduleResolutionCache && resolveModuleNameFromCache(moduleName, containingFile, moduleResolutionCache);
682704
}
@@ -1807,10 +1829,11 @@ namespace ts {
18071829
sourceFilesFoundSearchingNodeModules.set(file.path, false);
18081830
if (!options.noResolve) {
18091831
processReferencedFiles(file, isDefaultLib);
1810-
processLibReferenceDirectives(file);
18111832
processTypeReferenceDirectives(file);
18121833
}
18131834

1835+
processLibReferenceDirectives(file);
1836+
18141837
modulesWithElidedImports.set(file.path, false);
18151838
processImportedModules(file);
18161839
}
@@ -1846,7 +1869,7 @@ namespace ts {
18461869
redirectTargetsSet.set(fileFromPackageId.path, true);
18471870
filesByName.set(path, dupFile);
18481871
sourceFileToPackageName.set(path, packageId.name);
1849-
files.push(dupFile);
1872+
processingOtherFiles.push(dupFile);
18501873
return dupFile;
18511874
}
18521875
else if (file) {
@@ -1877,18 +1900,19 @@ namespace ts {
18771900

18781901
if (!options.noResolve) {
18791902
processReferencedFiles(file, isDefaultLib);
1880-
processLibReferenceDirectives(file);
18811903
processTypeReferenceDirectives(file);
18821904
}
18831905

1906+
processLibReferenceDirectives(file);
1907+
18841908
// always process imported modules to record module name resolutions
18851909
processImportedModules(file);
18861910

18871911
if (isDefaultLib) {
1888-
files.unshift(file);
1912+
processingDefaultLibFiles.push(file);
18891913
}
18901914
else {
1891-
files.push(file);
1915+
processingOtherFiles.push(file);
18921916
}
18931917
}
18941918

src/lib/es2015.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/// <reference lib="es5" />
12
/// <reference lib="es2015.core" />
23
/// <reference lib="es2015.collection" />
34
/// <reference lib="es2015.generator" />
@@ -7,4 +8,3 @@
78
/// <reference lib="es2015.reflect" />
89
/// <reference lib="es2015.symbol" />
910
/// <reference lib="es2015.symbol.wellknown" />
10-
/// <reference lib="es5" />

src/lib/es2015.full.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
/// <reference lib="dom" />
1212
/// <reference lib="webworker.importscripts" />
1313
/// <reference lib="scripthost" />
14-
/// <reference lib="dom.iterable" />
14+
/// <reference lib="dom.iterable" />

tests/baselines/reference/2dArrays.symbols

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ class Board {
2525
>allShipsSunk : Symbol(Board.allShipsSunk, Decl(2dArrays.ts, 9, 18))
2626

2727
return this.ships.every(function (val) { return val.isSunk; });
28-
>this.ships.every : Symbol(Array.every, Decl(lib.d.ts, --, --))
28+
>this.ships.every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --))
2929
>this.ships : Symbol(Board.ships, Decl(2dArrays.ts, 7, 13))
3030
>this : Symbol(Board, Decl(2dArrays.ts, 5, 1))
3131
>ships : Symbol(Board.ships, Decl(2dArrays.ts, 7, 13))
32-
>every : Symbol(Array.every, Decl(lib.d.ts, --, --))
32+
>every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --))
3333
>val : Symbol(val, Decl(2dArrays.ts, 12, 42))
3434
>val.isSunk : Symbol(Ship.isSunk, Decl(2dArrays.ts, 3, 12))
3535
>val : Symbol(val, Decl(2dArrays.ts, 12, 42))

tests/baselines/reference/ES5For-of1.symbols

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ for (var v of ['a', 'b', 'c']) {
33
>v : Symbol(v, Decl(ES5For-of1.ts, 0, 8))
44

55
console.log(v);
6-
>console.log : Symbol(Console.log, Decl(lib.d.ts, --, --))
7-
>console : Symbol(console, Decl(lib.d.ts, --, --))
8-
>log : Symbol(Console.log, Decl(lib.d.ts, --, --))
6+
>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
7+
>console : Symbol(console, Decl(lib.dom.d.ts, --, --))
8+
>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
99
>v : Symbol(v, Decl(ES5For-of1.ts, 0, 8))
1010
}

tests/baselines/reference/ES5For-of22.symbols

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ for (var x of [1, 2, 3]) {
66
>_a : Symbol(_a, Decl(ES5For-of22.ts, 1, 7))
77

88
console.log(x);
9-
>console.log : Symbol(Console.log, Decl(lib.d.ts, --, --))
10-
>console : Symbol(console, Decl(lib.d.ts, --, --))
11-
>log : Symbol(Console.log, Decl(lib.d.ts, --, --))
9+
>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
10+
>console : Symbol(console, Decl(lib.dom.d.ts, --, --))
11+
>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
1212
>x : Symbol(x, Decl(ES5For-of22.ts, 0, 8))
1313
}

tests/baselines/reference/ES5For-of23.symbols

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ for (var x of [1, 2, 3]) {
66
>_a : Symbol(_a, Decl(ES5For-of23.ts, 1, 7))
77

88
console.log(x);
9-
>console.log : Symbol(Console.log, Decl(lib.d.ts, --, --))
10-
>console : Symbol(console, Decl(lib.d.ts, --, --))
11-
>log : Symbol(Console.log, Decl(lib.d.ts, --, --))
9+
>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
10+
>console : Symbol(console, Decl(lib.dom.d.ts, --, --))
11+
>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
1212
>x : Symbol(x, Decl(ES5For-of23.ts, 0, 8))
1313
}

tests/baselines/reference/ES5For-of33.symbols

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ for (var v of ['a', 'b', 'c']) {
33
>v : Symbol(v, Decl(ES5For-of33.ts, 0, 8))
44

55
console.log(v);
6-
>console.log : Symbol(Console.log, Decl(lib.d.ts, --, --))
7-
>console : Symbol(console, Decl(lib.d.ts, --, --))
8-
>log : Symbol(Console.log, Decl(lib.d.ts, --, --))
6+
>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
7+
>console : Symbol(console, Decl(lib.dom.d.ts, --, --))
8+
>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
99
>v : Symbol(v, Decl(ES5For-of33.ts, 0, 8))
1010
}

tests/baselines/reference/ES5For-ofTypeCheck13.symbols

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
=== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck13.ts ===
22
const strSet: Set<string> = new Set()
33
>strSet : Symbol(strSet, Decl(ES5For-ofTypeCheck13.ts, 0, 5))
4-
>Set : Symbol(Set, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.collection.d.ts, --, --))
5-
>Set : Symbol(Set, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.collection.d.ts, --, --))
4+
>Set : Symbol(Set, Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
5+
>Set : Symbol(Set, Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
66

77
strSet.add('Hello')
88
>strSet.add : Symbol(Set.add, Decl(lib.es2015.collection.d.ts, --, --))

tests/baselines/reference/ES5For-ofTypeCheck14.symbols

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
=== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck14.ts ===
22
var union: string | Set<number>
33
>union : Symbol(union, Decl(ES5For-ofTypeCheck14.ts, 0, 3))
4-
>Set : Symbol(Set, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.collection.d.ts, --, --))
4+
>Set : Symbol(Set, Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
55

66
for (const e of union) { }
77
>e : Symbol(e, Decl(ES5For-ofTypeCheck14.ts, 1, 10))

tests/baselines/reference/ES5SymbolProperty1.symbols

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ interface SymbolConstructor {
66
>foo : Symbol(SymbolConstructor.foo, Decl(ES5SymbolProperty1.ts, 0, 29))
77
}
88
var Symbol: SymbolConstructor;
9-
>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(ES5SymbolProperty1.ts, 3, 3))
9+
>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(ES5SymbolProperty1.ts, 3, 3))
1010
>SymbolConstructor : Symbol(SymbolConstructor, Decl(ES5SymbolProperty1.ts, 0, 0))
1111

1212
var obj = {
@@ -15,13 +15,13 @@ var obj = {
1515
[Symbol.foo]: 0
1616
>[Symbol.foo] : Symbol([Symbol.foo], Decl(ES5SymbolProperty1.ts, 5, 11))
1717
>Symbol.foo : Symbol(SymbolConstructor.foo, Decl(ES5SymbolProperty1.ts, 0, 29))
18-
>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(ES5SymbolProperty1.ts, 3, 3))
18+
>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(ES5SymbolProperty1.ts, 3, 3))
1919
>foo : Symbol(SymbolConstructor.foo, Decl(ES5SymbolProperty1.ts, 0, 29))
2020
}
2121

2222
obj[Symbol.foo];
2323
>obj : Symbol(obj, Decl(ES5SymbolProperty1.ts, 5, 3))
2424
>Symbol.foo : Symbol(SymbolConstructor.foo, Decl(ES5SymbolProperty1.ts, 0, 29))
25-
>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(ES5SymbolProperty1.ts, 3, 3))
25+
>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(ES5SymbolProperty1.ts, 3, 3))
2626
>foo : Symbol(SymbolConstructor.foo, Decl(ES5SymbolProperty1.ts, 0, 29))
2727

Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
=== tests/cases/conformance/Symbols/ES5SymbolProperty3.ts ===
22
var Symbol: any;
3-
>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(ES5SymbolProperty3.ts, 0, 3))
3+
>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(ES5SymbolProperty3.ts, 0, 3))
44

55
class C {
66
>C : Symbol(C, Decl(ES5SymbolProperty3.ts, 0, 16))
77

88
[Symbol.iterator]() { }
99
>[Symbol.iterator] : Symbol(C[Symbol.iterator], Decl(ES5SymbolProperty3.ts, 2, 9))
10-
>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(ES5SymbolProperty3.ts, 0, 3))
10+
>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(ES5SymbolProperty3.ts, 0, 3))
1111
}
1212

1313
(new C)[Symbol.iterator]
1414
>C : Symbol(C, Decl(ES5SymbolProperty3.ts, 0, 16))
15-
>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(ES5SymbolProperty3.ts, 0, 3))
15+
>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(ES5SymbolProperty3.ts, 0, 3))
1616

Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
=== tests/cases/conformance/Symbols/ES5SymbolProperty4.ts ===
22
var Symbol: { iterator: string };
3-
>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(ES5SymbolProperty4.ts, 0, 3))
3+
>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(ES5SymbolProperty4.ts, 0, 3))
44
>iterator : Symbol(iterator, Decl(ES5SymbolProperty4.ts, 0, 13))
55

66
class C {
@@ -9,13 +9,13 @@ class C {
99
[Symbol.iterator]() { }
1010
>[Symbol.iterator] : Symbol(C[Symbol.iterator], Decl(ES5SymbolProperty4.ts, 2, 9))
1111
>Symbol.iterator : Symbol(iterator, Decl(ES5SymbolProperty4.ts, 0, 13))
12-
>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(ES5SymbolProperty4.ts, 0, 3))
12+
>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(ES5SymbolProperty4.ts, 0, 3))
1313
>iterator : Symbol(iterator, Decl(ES5SymbolProperty4.ts, 0, 13))
1414
}
1515

1616
(new C)[Symbol.iterator]
1717
>C : Symbol(C, Decl(ES5SymbolProperty4.ts, 0, 33))
1818
>Symbol.iterator : Symbol(iterator, Decl(ES5SymbolProperty4.ts, 0, 13))
19-
>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(ES5SymbolProperty4.ts, 0, 3))
19+
>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(ES5SymbolProperty4.ts, 0, 3))
2020
>iterator : Symbol(iterator, Decl(ES5SymbolProperty4.ts, 0, 13))
2121

Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
=== tests/cases/conformance/Symbols/ES5SymbolProperty5.ts ===
22
var Symbol: { iterator: symbol };
3-
>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(ES5SymbolProperty5.ts, 0, 3))
3+
>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(ES5SymbolProperty5.ts, 0, 3))
44
>iterator : Symbol(iterator, Decl(ES5SymbolProperty5.ts, 0, 13))
55

66
class C {
@@ -9,13 +9,13 @@ class C {
99
[Symbol.iterator]() { }
1010
>[Symbol.iterator] : Symbol(C[Symbol.iterator], Decl(ES5SymbolProperty5.ts, 2, 9))
1111
>Symbol.iterator : Symbol(iterator, Decl(ES5SymbolProperty5.ts, 0, 13))
12-
>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(ES5SymbolProperty5.ts, 0, 3))
12+
>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(ES5SymbolProperty5.ts, 0, 3))
1313
>iterator : Symbol(iterator, Decl(ES5SymbolProperty5.ts, 0, 13))
1414
}
1515

1616
(new C)[Symbol.iterator](0) // Should error
1717
>C : Symbol(C, Decl(ES5SymbolProperty5.ts, 0, 33))
1818
>Symbol.iterator : Symbol(iterator, Decl(ES5SymbolProperty5.ts, 0, 13))
19-
>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(ES5SymbolProperty5.ts, 0, 3))
19+
>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(ES5SymbolProperty5.ts, 0, 3))
2020
>iterator : Symbol(iterator, Decl(ES5SymbolProperty5.ts, 0, 13))
2121

0 commit comments

Comments
 (0)