Skip to content

Fix default arguments of inlinable local functions #31541

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

slavapestov
Copy link
Contributor

Fixes two regressions that were introduced in Swift 5.2:

  • Default arguments of local functions inside @inlinable functions were not serialized, which would cause a SIL verifier failure if the default argument was referenced
  • There was no enforcement that these default arguments did not reference non-public symbols, which again could cause crashes.

Fixes rdar://problem/62200974 / https://bugs.swift.org/browse/SR-12404.

@slavapestov slavapestov requested a review from jckarter May 4, 2020 21:04
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

1 similar comment
@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

Copy link
Contributor

@jckarter jckarter left a comment

Choose a reason for hiding this comment

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

Thanks Slava!

@slavapestov slavapestov merged commit 2caef36 into swiftlang:master May 5, 2020
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