xamarin / binding-tools-for-swift

MIT License
160 stars 21 forks source link

fix up minor issues with closure parsing #743

Closed stephen-hawley closed 3 years ago

stephen-hawley commented 3 years ago

This fixed issue 737.

Swift 5.5 was generating two things in the .swiftinterface that were new to us:

  1. arguments in closure parameter types
  2. Swift.Void as a type

The first thing exposed a bug where we promoted the type label from a singleton tuple to the enclosing type but didn't clear the one in the contained type. This would generate two type labels instead of one.

The second thing we didn't know how to handle Swift.Void so I special cased the parser such that if it gets Swift.Void it turns it into () which we already know how to handle.

Added a test for the double type label and unignored the test that was failing in Swift 5.5