mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
The determination of “favored” constraints for binary expressions was comparing the second argument to the first parameter to decide if the constraint is favored. Coupled with implicit bridging conversions through NSNumber, this meant that “1.0/10” would become Int when Foundation was imported, and hilarity ensued. Fix the heuristic for favored constraints, tidy up this code a bit, and add ==(NSString, NSString) to cope with the ambiguity this creates. Swift SVN r21154
1.5 KiB
1.5 KiB