mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
9 lines
415 B
Swift
9 lines
415 B
Swift
// RUN: %target-parse-verify-swift
|
|
|
|
class C : B { } // expected-error{{circular class inheritance 'C' -> 'B' -> 'A' -> 'C'}}
|
|
class B : A { } // expected-note{{class 'B' declared here}}
|
|
class A : C { } // expected-note{{class 'A' declared here}}
|
|
|
|
class TrivialCycle : TrivialCycle {} // expected-error{{circular class inheritance TrivialCycle}}
|
|
protocol P : P {} // expected-error{{circular protocol inheritance P}}
|