Skip to content

[SR-3896] Add missing r-value coercion for type(of:)'s argument #7708

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
Feb 23, 2017

Conversation

CodaFi
Copy link
Contributor

@CodaFi CodaFi commented Feb 23, 2017

When this was migrated over to the awesome new special representation
of type(of:) the argument coercion didn’t come with it. The missing
load expression caused any l-value run through type(of:) to crash in the
verifier.

@jckarter, how does it look?

When this was migrated over to the awesome new special representation
of type(of:) the argument coercion didn’t come with it.  The missing
load expression caused any l-value run through type(of:) to crash in the
verifier.
@CodaFi
Copy link
Contributor Author

CodaFi commented Feb 23, 2017

@swift-ci please smoke test

@slavapestov slavapestov merged commit b866edd into swiftlang:master Feb 23, 2017
@CodaFi CodaFi deleted the fully-reloaded branch February 23, 2017 06:59
@jckarter
Copy link
Contributor

Nice catch! Does withoutActuallyEscaping need the same thing?

@CodaFi
Copy link
Contributor Author

CodaFi commented Feb 23, 2017

Is there a way to take a non-escaping closure parameter as an l-value? The only permitted operation is a call.

@jckarter
Copy link
Contributor

Do we check that before or after normal type-checking? We still don't want to crash if you write var g = f; withoutActuallyEscaping(g) { ... }

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