// 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 { func foo(t: T) { } // expected-error {{classes cannot have non-final generic functions in embedded Swift}} func bar() { } } final class C2 { // TODO: this shouldn't be a problem because the class is final init(x: T) { } // expected-error {{classes cannot have non-final generic functions in embedded Swift}} } struct S {} func testit2() -> C2 { return C2(x: S()) } open class C3 { public func foo(t: T) {} // expected-error {{classes cannot have non-final generic functions in embedded Swift}} } func testit3() -> C3 { return C3() }