// RUN: %target-swift-emit-ir -verify %s -parse-stdlib -enable-experimental-feature Embedded -target arm64e-apple-none -wmo // REQUIRES: swift_in_compiler // REQUIRES: swift_feature_Embedded public class MyClass { public func foo(t: T) { } // expected-warning {{generic instance method 'foo(t:)' in a class must be 'final' in Embedded Swift}} // expected-error@-1{{classes cannot have a non-final, generic method 'foo(t:)' in embedded Swift}} public func bar() { } } final class C2 { init(x: T) { } } struct S {} public func testMyClass(_ c: MyClass) { c.foo(t: S()) c.bar() } func testit2() -> C2 { return C2(x: S()) } open class C3 { public func foo(t: T) {} // expected-warning {{generic instance method 'foo(t:)' in a class must be 'final' in Embedded Swift}} // expected-error@-1{{classes cannot have a non-final, generic method 'foo(t:)' in embedded Swift}} } func testit3() -> C3 { let c = C3() c.foo(t: S()) return c }