tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(4,1): error TS2322: Type '""' is not assignable to type 'number'.
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(5,1): error TS2322: Type '""' is not assignable to type 'number'.
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(13,1): error TS2322: Type '""' is not assignable to type 'number'.
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(14,1): error TS2322: Type '""' is not assignable to type 'number'.
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(15,1): error TS2322: Type '""' is not assignable to type 'number'.
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(17,1): error TS2539: Cannot assign to 'M' because it is not a variable.
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(18,2): error TS2539: Cannot assign to 'M' because it is not a variable.
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(25,5): error TS2539: Cannot assign to 'M3' because it is not a variable.
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 TS2539: Cannot assign to 'fn' because it is not a variable.
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(38,2): error TS2539: Cannot assign to 'fn' because it is not a variable.
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(43,5): error TS2322: Type '""' is not assignable to type 'number'.
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(44,5): error TS2322: Type '""' is not assignable to type 'number'.
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(48,5): error TS2322: Type '""' is not assignable to type 'number'.
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(49,5): error TS2322: Type '""' is not assignable to type 'number'.
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(54,5): error TS2322: Type '""' is not assignable to type 'number'.
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(55,5): error TS2322: Type '""' is not assignable to type 'number'.
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(56,5): error TS2322: Type '""' is not assignable to type 'number'.
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(62,1): error TS2539: Cannot assign to 'E' because it is not a variable.
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(63,2): error TS2539: Cannot assign to 'E' because it is not a variable.
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(69,1): error TS2539: Cannot assign to 'C' because it is not a variable.
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(70,2): error TS2539: Cannot assign to 'C' because it is not a variable.


==== tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts (24 errors) ====
    var x: number;
    x = 3; // OK
    (x) = 3; // OK
    x = ''; // Error
    ~
!!! error TS2322: Type '""' is not assignable to type 'number'.
    (x) = ''; // Error
    ~~~
!!! error TS2322: Type '""' is not assignable to type 'number'.
    
    module M {
        export var y: number;
    }
    M.y = 3; // OK
    (M).y = 3; // OK
    (M.y) = 3; // OK
    M.y = ''; // Error
    ~~~
!!! error TS2322: Type '""' is not assignable to type 'number'.
    (M).y = ''; // Error
    ~~~~~
!!! error TS2322: Type '""' is not assignable to type 'number'.
    (M.y) = ''; // Error
    ~~~~~
!!! error TS2322: Type '""' is not assignable to type 'number'.
    
    M = { y: 3 }; // Error
    ~
!!! error TS2539: Cannot assign to 'M' because it is not a variable.
    (M) = { y: 3 }; // Error
     ~
!!! error TS2539: Cannot assign to 'M' because it is not a variable.
    
    module M2 {
        export module M3 {
            export var x: number;
        }
    
        M3 = { x: 3 }; // Error
        ~~
!!! error TS2539: Cannot assign to 'M3' because it is not a variable.
    }
    M2.M3 = { x: 3 }; // OK
    (M2).M3 = { x: 3 }; // OK
    (M2.M3) = { x: 3 }; // OK
    
    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'.
    (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'.
    (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'.
    
    
    function fn() { }
    fn = () => 3; // Bug 823548: Should be error (fn is not a reference)
    ~~
!!! error TS2539: Cannot assign to 'fn' because it is not a variable.
    (fn) = () => 3; // Should be error
     ~~
!!! error TS2539: Cannot assign to 'fn' because it is not a variable.
    
    function fn2(x: number, y: { t: number }) {
        x = 3;
        (x) = 3; // OK
        x = ''; // Error
        ~
!!! error TS2322: Type '""' is not assignable to type 'number'.
        (x) = ''; // Error
        ~~~
!!! error TS2322: Type '""' is not assignable to type 'number'.
    
        (y).t = 3; // OK
        (y.t) = 3; // OK
        (y).t = ''; // Error
        ~~~~~
!!! error TS2322: Type '""' is not assignable to type 'number'.
        (y.t) = ''; // Error
        ~~~~~
!!! error TS2322: Type '""' is not assignable to type 'number'.
    
        y['t'] = 3; // OK
        (y)['t'] = 3; // OK
        (y['t']) = 3; // OK
        y['t'] = ''; // Error
        ~~~~~~
!!! error TS2322: Type '""' is not assignable to type 'number'.
        (y)['t'] = ''; // Error
        ~~~~~~~~
!!! error TS2322: Type '""' is not assignable to type 'number'.
        (y['t']) = ''; // Error
        ~~~~~~~~
!!! error TS2322: Type '""' is not assignable to type 'number'.
    }
    
    enum E {
        A
    }
    E = undefined; // Error
    ~
!!! error TS2539: Cannot assign to 'E' because it is not a variable.
    (E) = undefined; // Error
     ~
!!! error TS2539: Cannot assign to 'E' because it is not a variable.
    
    class C {
    
    }
    
    C = undefined; // Error
    ~
!!! error TS2539: Cannot assign to 'C' because it is not a variable.
    (C) = undefined; // Error
     ~
!!! error TS2539: Cannot assign to 'C' because it is not a variable.
    