Skip to content

[Serialization] Use the correct module for the nested type fast path. #11018

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
merged 1 commit into from
Jul 18, 2017

Conversation

jrose-apple
Copy link
Contributor

Fix-up for #10956, which fixes the crash caused by the new test case I thought of slightly too late.

More SR-5284 / rdar://problem/32926560.

@jrose-apple jrose-apple requested a review from milseman July 17, 2017 21:53
@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

@jrose-apple
Copy link
Contributor Author

Sorry, Michael, I guess I do need someone to look at the serialization part, since I didn't get it right.

@@ -1343,9 +1343,13 @@ ModuleFile::resolveCrossReference(ModuleDecl *baseModule, uint32_t pathLen) {
nestedType = containingFile->lookupNestedType(memberName, baseType);
}
} else {
// Fault in extensions, then ask every serialized AST in the module.
// Fault in extensions, then ask every file in the module.
ModuleDecl *extensionModule = M;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

M here is the module specified by the cross-reference path; it's omitted if you're supposed to look in the same module. This will be made clearer in the future when everything gets refactored as @milseman suggested.

@jckarter
Copy link
Contributor

Looks good to me.

@jckarter jckarter requested review from milseman and removed request for milseman July 18, 2017 21:51
@jrose-apple jrose-apple merged commit adf1e2e into swiftlang:master Jul 18, 2017
@jrose-apple jrose-apple deleted the lookupNestedType-fix branch July 18, 2017 22:10
jrose-apple added a commit to jrose-apple/swift that referenced this pull request Jul 18, 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