binding-tools-for-swift icon indicating copy to clipboard operation
binding-tools-for-swift copied to clipboard

[SoM] generic functions with constraints aren't showing the constraints in C#

Open stephen-hawley opened this issue 6 years ago • 1 comments

Look at ComparableTests.ClassLess in the generated file TopLevelEntities.cs. It should have a where T:ISwiftComparable clause.

stephen-hawley avatar Apr 23 '19 15:04 stephen-hawley

Steve says: look at this closer when associated types are fully complete. For now, I have a notion of something called a discretionary constraint, which recognizes that there are/were issues in associated type modeling. In reality, the signature of the interface is wrong. It should be ISwiftComparable<TSelf> : ISwiftEquatable<TSelf> where TSelf : ISwiftComparable<TSelf> I think.

stephen-hawley avatar Sep 02 '20 16:09 stephen-hawley