34 lines
784 B
Plaintext
34 lines
784 B
Plaintext
==== tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts (6 errors) ====
|
|
var x: typeof undefined;
|
|
|
|
enum E { A }
|
|
E = x;
|
|
~
|
|
!!! Invalid left-hand side of assignment expression.
|
|
E.A = x;
|
|
~~~
|
|
!!! Invalid left-hand side of assignment expression.
|
|
|
|
class C { foo: string }
|
|
var f: C;
|
|
C = x;
|
|
~
|
|
!!! Invalid left-hand side of assignment expression.
|
|
|
|
interface I { foo: string }
|
|
var g: I;
|
|
g = x;
|
|
I = x;
|
|
~
|
|
!!! Cannot find name 'I'.
|
|
|
|
module M { export var x = 1; }
|
|
M = x;
|
|
~
|
|
!!! Invalid left-hand side of assignment expression.
|
|
|
|
function i<T>(a: T) { }
|
|
// BUG 767030
|
|
i = x;
|
|
~
|
|
!!! Invalid left-hand side of assignment expression. |