open class Foo(val item: T) class Bar(str: String) : Foo(str) fun usage(bar: Bar) { Bar("bar") }