Skip to content

[ConstraintSystem] Detect and fix extraneous use of & #24522

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
May 6, 2019

Conversation

xedin
Copy link
Contributor

@xedin xedin commented May 6, 2019

Diagnose extraneous use of address of (&) which could only be
associated with arguments to inout parameters e.g.

struct S {}

var a: S = ...
var b: S = ...

a = &b

Diagnose extraneous use of address of (`&`) which could only be
associated with arguments to `inout` parameters e.g.

```swift
struct S {}

var a: S = ...
var b: S = ...

a = &b
```
@xedin
Copy link
Contributor Author

xedin commented May 6, 2019

@swift-ci please test

@slavapestov
Copy link
Contributor

Test case?

@xedin
Copy link
Contributor Author

xedin commented May 6, 2019

@slavapestov We have a lot in the suite already, I'm just trying to port more diagnostics associated with assignment before I can port "contextual mismatch" ones...

@slavapestov
Copy link
Contributor

@xedin Gotcha, thanks!

@xedin
Copy link
Contributor Author

xedin commented May 6, 2019

No problem!

@xedin xedin merged commit 6cd476b into swiftlang:master May 6, 2019
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