Skip to content

Commit 2d7a0f4

Browse files
committed
Merge branch 'master' into constructorAccessibility
2 parents 208830e + af9dc41 commit 2d7a0f4

File tree

73 files changed

+156
-164
lines changed

Some content is hidden

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

73 files changed

+156
-164
lines changed

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ build.json
2828
*.actual
2929
tests/webhost/*.d.ts
3030
tests/webhost/webtsc.js
31-
tests/**/*.js
32-
tests/**/*.js.map
33-
tests/**/*.d.ts
31+
tests/cases/**/*.js
32+
tests/cases/**/*.js.map
33+
tests/cases/**/*.d.ts
3434
*.config
3535
scripts/debug.bat
3636
scripts/run.bat

src/compiler/program.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ namespace ts {
100100

101101
let moduleResolution = compilerOptions.moduleResolution;
102102
if (moduleResolution === undefined) {
103-
moduleResolution = compilerOptions.module === ModuleKind.CommonJS ? ModuleResolutionKind.NodeJs : ModuleResolutionKind.Classic;
103+
moduleResolution = getEmitModuleKind(compilerOptions) === ModuleKind.CommonJS ? ModuleResolutionKind.NodeJs : ModuleResolutionKind.Classic;
104104
if (traceEnabled) {
105105
trace(host, Diagnostics.Module_resolution_kind_is_not_specified_using_0, ModuleResolutionKind[moduleResolution]);
106106
}

src/compiler/utilities.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,8 @@ namespace ts {
387387
case SyntaxKind.FunctionDeclaration:
388388
case SyntaxKind.FunctionExpression:
389389
case SyntaxKind.MethodDeclaration:
390+
case SyntaxKind.GetAccessor:
391+
case SyntaxKind.SetAccessor:
390392
case SyntaxKind.TypeAliasDeclaration:
391393
errorNode = (<Declaration>node).name;
392394
break;

tests/baselines/reference/computedPropertyNames36_ES5.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tests/cases/conformance/es6/computedProperties/computedPropertyNames36_ES5.ts(8,5): error TS2411: Property '["get1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
1+
tests/cases/conformance/es6/computedProperties/computedPropertyNames36_ES5.ts(8,9): error TS2411: Property '["get1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
22

33

44
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames36_ES5.ts (1 errors) ====
@@ -10,7 +10,7 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames36_ES5.ts(8,
1010

1111
// Computed properties
1212
get ["get1"]() { return new Foo }
13-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13+
~~~~~~~~
1414
!!! error TS2411: Property '["get1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
1515
set ["set1"](p: Foo2) { }
1616
}

tests/baselines/reference/computedPropertyNames36_ES6.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tests/cases/conformance/es6/computedProperties/computedPropertyNames36_ES6.ts(8,5): error TS2411: Property '["get1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
1+
tests/cases/conformance/es6/computedProperties/computedPropertyNames36_ES6.ts(8,9): error TS2411: Property '["get1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
22

33

44
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames36_ES6.ts (1 errors) ====
@@ -10,7 +10,7 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames36_ES6.ts(8,
1010

1111
// Computed properties
1212
get ["get1"]() { return new Foo }
13-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13+
~~~~~~~~
1414
!!! error TS2411: Property '["get1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
1515
set ["set1"](p: Foo2) { }
1616
}

tests/baselines/reference/computedPropertyNames38_ES5.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tests/cases/conformance/es6/computedProperties/computedPropertyNames38_ES5.ts(8,5): error TS2411: Property '[1 << 6]' of type 'Foo' is not assignable to string index type 'Foo2'.
1+
tests/cases/conformance/es6/computedProperties/computedPropertyNames38_ES5.ts(8,9): error TS2411: Property '[1 << 6]' of type 'Foo' is not assignable to string index type 'Foo2'.
22

33

44
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames38_ES5.ts (1 errors) ====
@@ -10,7 +10,7 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames38_ES5.ts(8,
1010

1111
// Computed properties
1212
get [1 << 6]() { return new Foo }
13-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13+
~~~~~~~~
1414
!!! error TS2411: Property '[1 << 6]' of type 'Foo' is not assignable to string index type 'Foo2'.
1515
set [1 << 6](p: Foo2) { }
1616
}

tests/baselines/reference/computedPropertyNames38_ES6.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tests/cases/conformance/es6/computedProperties/computedPropertyNames38_ES6.ts(8,5): error TS2411: Property '[1 << 6]' of type 'Foo' is not assignable to string index type 'Foo2'.
1+
tests/cases/conformance/es6/computedProperties/computedPropertyNames38_ES6.ts(8,9): error TS2411: Property '[1 << 6]' of type 'Foo' is not assignable to string index type 'Foo2'.
22

33

44
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames38_ES6.ts (1 errors) ====
@@ -10,7 +10,7 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames38_ES6.ts(8,
1010

1111
// Computed properties
1212
get [1 << 6]() { return new Foo }
13-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13+
~~~~~~~~
1414
!!! error TS2411: Property '[1 << 6]' of type 'Foo' is not assignable to string index type 'Foo2'.
1515
set [1 << 6](p: Foo2) { }
1616
}

tests/baselines/reference/computedPropertyNames39_ES5.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tests/cases/conformance/es6/computedProperties/computedPropertyNames39_ES5.ts(8,5): error TS2412: Property '[1 << 6]' of type 'Foo' is not assignable to numeric index type 'Foo2'.
1+
tests/cases/conformance/es6/computedProperties/computedPropertyNames39_ES5.ts(8,9): error TS2412: Property '[1 << 6]' of type 'Foo' is not assignable to numeric index type 'Foo2'.
22

33

44
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames39_ES5.ts (1 errors) ====
@@ -10,7 +10,7 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames39_ES5.ts(8,
1010

1111
// Computed properties
1212
get [1 << 6]() { return new Foo }
13-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13+
~~~~~~~~
1414
!!! error TS2412: Property '[1 << 6]' of type 'Foo' is not assignable to numeric index type 'Foo2'.
1515
set [1 << 6](p: Foo2) { }
1616
}

tests/baselines/reference/computedPropertyNames39_ES6.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tests/cases/conformance/es6/computedProperties/computedPropertyNames39_ES6.ts(8,5): error TS2412: Property '[1 << 6]' of type 'Foo' is not assignable to numeric index type 'Foo2'.
1+
tests/cases/conformance/es6/computedProperties/computedPropertyNames39_ES6.ts(8,9): error TS2412: Property '[1 << 6]' of type 'Foo' is not assignable to numeric index type 'Foo2'.
22

33

44
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames39_ES6.ts (1 errors) ====
@@ -10,7 +10,7 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames39_ES6.ts(8,
1010

1111
// Computed properties
1212
get [1 << 6]() { return new Foo }
13-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13+
~~~~~~~~
1414
!!! error TS2412: Property '[1 << 6]' of type 'Foo' is not assignable to numeric index type 'Foo2'.
1515
set [1 << 6](p: Foo2) { }
1616
}

tests/baselines/reference/computedPropertyNames43_ES5.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tests/cases/conformance/es6/computedProperties/computedPropertyNames43_ES5.ts(10,5): error TS2411: Property '["get1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
1+
tests/cases/conformance/es6/computedProperties/computedPropertyNames43_ES5.ts(10,9): error TS2411: Property '["get1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
22

33

44
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames43_ES5.ts (1 errors) ====
@@ -12,7 +12,7 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames43_ES5.ts(10
1212
class D extends C {
1313
// Computed properties
1414
get ["get1"]() { return new Foo }
15-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15+
~~~~~~~~
1616
!!! error TS2411: Property '["get1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
1717
set ["set1"](p: Foo2) { }
1818
}

0 commit comments

Comments
 (0)