mirror of
https://github.com/apple/swift.git
synced 2026-10-04 11:58:22 +02:00
Tests require the compiler built with SwiftCompilerSources since a long time. So this lit feature was redundant anyway. We can remove it.
10 lines
579 B
Swift
10 lines
579 B
Swift
// RUN: %target-swift-frontend -typecheck %s -enable-experimental-feature Embedded -verify
|
|
// REQUIRES: swift_feature_Embedded
|
|
|
|
// Self-referential generic superclass should be diagnosed in Embedded Swift
|
|
// because it creates a circular metadata dependency.
|
|
|
|
final class Tree: ManagedBuffer<Int, Tree> { // expected-error {{class 'Tree' cannot inherit from 'ManagedBuffer<Int, Tree>' in Embedded Swift because a generic argument of the superclass refers to the subclass itself, creating a circular metadata dependency}}
|
|
var children: AnySequence<Tree> { AnySequence([]) }
|
|
}
|