open class Base(val x: T) class Derived(x: T) : Base(x) fun create(x: T): Derived = Derived(x)