Skip to content

AST: Fix compareDependentTypes() for protocol typealiases #7081

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

Merged

Conversation

slavapestov
Copy link
Contributor

Fixes https://bugs.swift.org/browse/SR-3687 and rdar://problem/30118513.

@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

Copy link
Member

@DougGregor DougGregor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@@ -1221,6 +1221,7 @@ CanType TypeBase::getCanonicalType() {

Result = GenericFunctionType::get(sig, inputTy, resultTy,
function->getExtInfo());
// assert(function->hasError() || !Result->hasError());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean to remove this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like a nice assert but it made some compiler_crashers regress... so I'll look into this later.

@slavapestov slavapestov force-pushed the protocol-typealiases-are-fun branch from bd0e7b1 to 05a6d06 Compare January 27, 2017 05:32
We must order protocol typealiases *after* other types, so that
if a protocol typealias is equal to an associated type, the
representative is chosen to be the associated type and not the
typealias.

Fixes <https://bugs.swift.org/browse/SR-3687> and
<rdar://problem/30118513>.
@slavapestov slavapestov force-pushed the protocol-typealiases-are-fun branch from 05a6d06 to f9789ce Compare January 27, 2017 05:34
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

1 similar comment
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov slavapestov merged commit 1860fec into swiftlang:master Jan 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants