tests/cases/conformance/types/rest/objectRestNegative.ts(2,10): error TS2462: A rest element must be last in a destructuring pattern
tests/cases/conformance/types/rest/objectRestNegative.ts(3,31): error TS2462: A rest element must be last in a destructuring pattern
tests/cases/conformance/types/rest/objectRestNegative.ts(6,17): error TS2700: Rest types may only be created from object types.
tests/cases/conformance/types/rest/objectRestNegative.ts(11,9): error TS2701: The target of an object rest assignment must be a variable or a property access.


==== tests/cases/conformance/types/rest/objectRestNegative.ts (4 errors) ====
    let o = { a: 1, b: 'no' };
    var { ...mustBeLast, a } = o;
             ~~~~~~~~~~
!!! error TS2462: A rest element must be last in a destructuring pattern
    function stillMustBeLast({ ...mustBeLast, a }: { a: number, b: string }): void {
                                  ~~~~~~~~~~
!!! error TS2462: A rest element must be last in a destructuring pattern
    }
    function generic<T extends { x, y }>(t: T) {
        let { x, ...rest } = t;
                    ~~~~
!!! error TS2700: Rest types may only be created from object types.
        return rest;
    }
    
    let rest: { b: string }
    ({a, ...rest.b + rest.b} = o);
            ~~~~~~~~~~~~~~~
!!! error TS2701: The target of an object rest assignment must be a variable or a property access.
    