Skip to content

AST: Exclude noncanonical params from GenericSignature::enumeratePairedRequirements. #15960

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

Conversation

jckarter
Copy link
Contributor

Fixes a bug where having two generic params same-typed together would lead to crashes in IRGen, and maybe other places, that only expect to deal with canonical params.

@jckarter jckarter requested a review from slavapestov April 16, 2018 22:45
@jckarter
Copy link
Contributor Author

@swift-ci Please test

@jckarter
Copy link
Contributor Author

@swift-ci Please test source compatibility

@jckarter jckarter requested a review from DougGregor April 16, 2018 22:45
// Otherwise, the generic parameter is concrete.
gp = req.getFirstType()->getAs<GenericTypeParamType>();
if (!gp) continue;
}

unsigned index = GenericParamKey(gp).findIndexIn(genericParams);
genericParamsAreConcrete[index] = true;
Copy link
Member

Choose a reason for hiding this comment

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

genericParamsAreConcrete is now a misnomer; genericParamIsNonCanonical, perhaps?

…redRequirements`.

Fixes a bug where having two generic params same-typed together would lead to crashes in IRGen, and maybe other places, that only expect to deal with canonical params.
@jckarter jckarter force-pushed the enumerate-only-canonical-paired-requirements branch from bc38003 to b842686 Compare April 17, 2018 17:46
@jckarter
Copy link
Contributor Author

@swift-ci Please test

@jckarter
Copy link
Contributor Author

@swift-ci Please test source compatibility

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - bc38003140e54e370232a112bfa715832ba6b733

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - bc38003140e54e370232a112bfa715832ba6b733

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.

3 participants