mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
14 lines
565 B
Swift
14 lines
565 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}}
|
|
|
|
class Isomorphism : Automorphism { }
|
|
class Automorphism : Automorphism { } // expected-error{{circular class inheritance Automorphism}}
|
|
|
|
let _ = A()
|