Skip to content

[migrator] Fix missed dollar arg migration in closures relying on implicit destructuring of tuple type arg #13247

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

nathawes
Copy link
Contributor

@nathawes nathawes commented Dec 4, 2017

func foo(_: ((Int, Int)) -> Bool) {}
foo({ $0 > $1 }) // doesn't need migration
let x: ((Int, Int)) -> Bool = { $0 > $1 } // but this does
func bar() -> ((Int, Int)) -> Bool {
  return {$0 > $1} // and this does
}

Resolves rdar://problem/32489893.

@nathawes
Copy link
Contributor Author

nathawes commented Dec 4, 2017

@swift-ci Please test and merge

@nathawes nathawes force-pushed the rdar32489893-migrate-dollar-arg-destructure branch 3 times, most recently from 233917c to f3e9685 Compare December 4, 2017 19:32
@nathawes
Copy link
Contributor Author

nathawes commented Dec 4, 2017

@swift-ci Please test and merge

…licit destructuring of tuple type arg.

func foo(_: ((Int, Int)) -> Bool) {}
foo({ $0 > $1 }) // doesn't need migration
let x: ((Int, Int)) -> Bool = { $0 > $1 } // but this does
func bar() -> ((Int, Int)) -> Bool {
  return {$0 > $1} // and this does
}
@nathawes
Copy link
Contributor Author

nathawes commented Dec 4, 2017

@swift-ci please test and merge

@nathawes
Copy link
Contributor Author

nathawes commented Dec 4, 2017

@swift-ci please test linux

@swift-ci
Copy link
Contributor

swift-ci commented Dec 4, 2017

Build failed
Swift Test Linux Platform
Git Sha - f325137293e29689796a8ec1837f3bfafa3a0512

@nathawes
Copy link
Contributor Author

nathawes commented Dec 4, 2017

@swift-ci please test linux

@nathawes nathawes merged commit 504c2df into swiftlang:master Dec 4, 2017
@nathawes nathawes deleted the rdar32489893-migrate-dollar-arg-destructure branch December 4, 2017 23:05
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