Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-1320] invalid compile error: error: circular class inheritance #43928

Closed
drewcrawford opened this issue Apr 26, 2016 · 2 comments
Closed
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@drewcrawford
Copy link
Contributor

Previous ID SR-1320
Radar None
Original Reporter @drewcrawford
Type Bug
Status Resolved
Resolution Done
Environment

swift-DEVELOPMENT-SNAPSHOT-2016-04-25-a, OSX 10.11

This behavior was not present in swift-DEVELOPMENT-SNAPSHOT-2016-04-12-a or Swift 2.2

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee None
Priority Medium

md5: 3ea59d1551cb1dba4a54feb3496fc53c

Issue Description:

protocol C : class {
    associatedtype CN
}
protocol N {
    associatedtype NN
}

final class T {}
final class S {}
extension T : C {
    typealias CN = T.NN
}

extension T : N {
    typealias NN = S
}

Expected behavior: compile

Actual behavior:

error: circular class inheritance T
    typealias CN = T.NN
@krzyzanowskim
Copy link
Contributor

I have the same with different syntax with snapshot 2016-06-06

final class Foo {
   let variant:Foo.Variant // error: circular class inheritance Foo

   enum Variant: RawRepresentable {
      // ...
   }
}

@slavapestov
Copy link
Member

Error is gone in 3.0 and master.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself
Projects
None yet
Development

No branches or pull requests

3 participants