// RUN: %target-run-simple-swift(-enable-experimental-feature Embedded -parse-as-library -runtime-compatibility-version none -wmo -Xfrontend -disable-objc-interop) | %FileCheck %s // RUN: %target-run-simple-swift(-Osize -enable-experimental-feature Embedded -parse-as-library -runtime-compatibility-version none -wmo -Xfrontend -disable-objc-interop) | %FileCheck %s // REQUIRES: swift_in_compiler // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu protocol Fooable { func foo() } class GenericFooableClass: Fooable { func foo() { print("GenericFooableClass.foo") } } class GenericFooableSubClass: GenericFooableClass { override func foo() { print("GenericFooableSubClass.foo") } } func makeItFoo(f: F) { f.foo() } @main struct Main { static func main() { let f = GenericFooableClass() makeItFoo(f: f) let g: GenericFooableClass = GenericFooableSubClass() makeItFoo(f: g) } } // CHECK: GenericFooableClass.foo // CHECK: GenericFooableSubClass.foo