//// [tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity4.ts] ////

//// [derivedClassTransitivity4.ts]
// subclassing is not transitive when you can remove required parameters and add optional parameters on protected members

class C {
    protected foo(x: number) { }
}

class D extends C {
    protected foo() { } // ok to drop parameters
}

class E extends D {
    public foo(x?: string) { } // ok to add optional parameters
}

declare var c: C;
declare var d: D;
declare var e: E;
c = e;
var r = c.foo(1);
var r2 = e.foo('');

//// [derivedClassTransitivity4.js]
"use strict";
// subclassing is not transitive when you can remove required parameters and add optional parameters on protected members
class C {
    foo(x) { }
}
class D extends C {
    foo() { } // ok to drop parameters
}
class E extends D {
    foo(x) { } // ok to add optional parameters
}
c = e;
var r = c.foo(1);
var r2 = e.foo('');
