TypeScript/tests/baselines/reference/constDeclarations-access5.errors.txt
Mohamed Hegazy cb012e01fd Merge branch 'master' into es6ImportExportEmit
Conflicts:
	src/compiler/diagnosticInformationMap.generated.ts
	src/compiler/diagnosticMessages.json
2015-03-16 20:47:08 -07:00

108 lines
5.5 KiB
Plaintext

error TS1204: Cannot compile external modules into amd or commonjs when targeting es6 or higher.
tests/cases/compiler/constDeclarations_access_2.ts(2,1): error TS1202: Import assignment cannot be used when targeting ECMAScript 6 or higher. Consider using 'import * as ns from "mod"', 'import {a} from "mod"' or 'import d from "mod"' instead.
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.
!!! error TS1204: Cannot compile external modules into amd or commonjs when targeting es6 or higher.
==== tests/cases/compiler/constDeclarations_access_2.ts (19 errors) ====
///<reference path='constDeclarations_access_1.ts'/>
import m = require('constDeclarations_access_1');
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1202: Import assignment cannot be used when targeting ECMAScript 6 or higher. Consider using 'import * as ns from "mod"', 'import {a} from "mod"' or 'import d from "mod"' instead.
// Errors
m.x = 1;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
m.x += 2;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
m.x -= 3;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
m.x *= 4;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
m.x /= 5;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
m.x %= 6;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
m.x <<= 7;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
m.x >>= 8;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
m.x >>>= 9;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
m.x &= 10;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
m.x |= 11;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
m.x ^= 12;
~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
m
m.x++;
~~~
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant.
m.x--;
~~~
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant.
++m.x;
~~~
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant.
--m.x;
~~~
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant.
++((m.x));
~~~~~~~
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant.
m["x"] = 0;
~~~~~~
!!! error TS2450: Left-hand side of assignment expression cannot be a constant.
// OK
var a = m.x + 1;
function f(v: number) { }
f(m.x);
if (m.x) { }
m.x;
(m.x);
-m.x;
+m.x;
m.x.toString();
==== tests/cases/compiler/constDeclarations_access_1.ts (0 errors) ====
export const x = 0;