swift
Fix var-parameter detection for inferred params
#4980
Merged

Fix var-parameter detection for inferred params #4980

harlanhaskins
harlanhaskins8 years ago
  • Explanation: We've removed the 'var' modifier from function parameters in Swift 3, but the diagnostic for that is only emitted when we have a valid type loc. With inferred closure parameters, you're allowed to specify a parameter without a type. If you leave 'var' on one of those, it causes an assertion in SILGen. Instead, teach the diagnostic to handle omitted types.
  • Scope: Only affects function parameters with elided types.
  • Issue: SR-2562
  • Reviewed by: @DougGregor and @CodaFi
  • Risk: Low.
  • Testing: Added a test to cover this diagnostic.
harlanhaskins
harlanhaskins8 years ago

@swift-ci please test

swift-ci
swift-ci8 years ago

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - 80f67ae6582c522f1c172d193d7fdfbb19acff61
Test requested by - @harlanhaskins

swift-ci
swift-ci8 years ago

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - 80f67ae6582c522f1c172d193d7fdfbb19acff61
Test requested by - @harlanhaskins

harlanhaskins
harlanhaskins8 years ago

There is a crasher that no longer crashes. I'll move it.

DougGregor DougGregor added this to the Swift 3.0 milestone 8 years ago
DougGregor DougGregor assigned tkremenek tkremenek 8 years ago
harlanhaskins Fix var-parameter detection for inferred params
1bfee7b2
harlanhaskins harlanhaskins force pushed to 1bfee7b2 8 years ago
harlanhaskins
harlanhaskins8 years ago

@swift-ci please test

tkremenek
tkremenek8 years ago

@swift-ci clean test

tkremenek tkremenek merged 504504b7 into swift-3.0-branch 8 years ago

Login to write a write a comment.

Login via GitHub

Reviewers
No reviews
Assignees
Labels
Milestone