mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Break cycles agressively when we find circular class inheritance. The stronger AST invariants prevent us from having to check for loops everywhere in the front end. Swift SVN r7325
6 lines
244 B
Swift
6 lines
244 B
Swift
// RUN: %swift -parse %s -verify
|
|
|
|
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}}
|