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-14324] "error: circular reference" when typealias in overlay mentions RawValue in underlying clang module #56683

Open
beccadax opened this issue Mar 11, 2021 · 1 comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself serialization Area → compiler: Serialization & deserialization

Comments

@beccadax
Copy link
Contributor

Previous ID SR-14324
Radar rdar://problem/75290190
Original Reporter @beccadax
Type Bug
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, Serialization
Assignee None
Priority Medium

md5: a19ef3eb97607bb1474dce70285ddd01

Issue Description:

When deserializing a typealias, Swift immediately tries to resolve its underlying type. When the typealias is in a Swift extension of a clang type in an overlay, and the typealias's underlying type starts with a reference to a typealias created by the ClangImporter, this can cause a DirectLookupRequest for a particular name within a DirectLookupRequest for the exact same name. The request evaluator diagnoses this as a circular reference and the project fails to build.

Reproducing this is slightly complicated, so rather than try to attach a project, I am committing test cases for it in #36375. test/CircularReference/overlay_extensions.swift is an actual example of it happening during the GenericSpecializer pass. test/CircularReference/pretty_printed_decls.swift also makes it happen by using a debugging feature.

(I'm filing this bug first so the tests can reference the SR number.)

@beccadax
Copy link
Contributor Author

@swift-ci create

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
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 serialization Area → compiler: Serialization & deserialization
Projects
None yet
Development

No branches or pull requests

1 participant