Commit Graph

663 Commits

Author SHA1 Message Date
Pavel Yaskevich
a9cce605a4 [CSBindings] Shrink binding "sources" to supertype and equivalence only
Instead of recording all of the binding "sources" let's only record
subtype, supertype and equivalence relationships which didn't materialize
as bindings (because other side is a type variable).

This is the only information necessary to infer transitive bindings
and protocol requirements.
2020-10-15 16:27:35 -07:00
Pavel Yaskevich
0c51159228 [CSBindings] Record constraint associated with a subtype relationship
While inferring bindings, let's record not only the fact that current
type variable is a subtype of some other type variable but track
constraint which establishes this relationship.
2020-10-15 16:27:35 -07:00
Pavel Yaskevich
17f7ad82ca [CSBindings] Record all of the protocol requirements (not just literal) 2020-10-15 16:27:35 -07:00
gregomni
ab6d92b1cd Favor operators based on existing binds via both basename and type 2020-10-15 09:03:45 -07:00
Holly Borla
c84bd00819 [ConstraintSystem] Move getResolvedOverloads() from CSStep to ConstraintSystem. 2020-10-15 09:03:45 -07:00
Holly Borla
529660d2c9 Merge pull request #34315 from hborla/remove-operator-designated-types
[ConstraintSystem] Remove implementation of operator designated types in the solver.
2020-10-15 09:02:09 -07:00
Holly Borla
4c0f49f7a6 [ConstraintSystem] Remove selectApplyDisjunction, which was only used
by the operator designated types implementation.
2020-10-14 17:28:33 -07:00
Holly Borla
1e0038c3be [ConstraintSystem] Remove implementation of operator designated types
in the solver.
2020-10-14 16:05:54 -07:00
Robert Widmann
6125d25cb4 [NFC] Silence Non-Exhaustive Switch Warnings on Windows 2020-10-14 13:26:09 -07:00
Pavel Yaskevich
6a19d37166 Merge pull request #34286 from xedin/add-sema-unittest-fixture
[unittests] Add a fixture for Sema unit tests
2020-10-14 00:33:34 -07:00
Pavel Yaskevich
2d6456c03e [ConstraintSystem] NFC: Remove obsolete getPotentialBindings declaration
It has been related with `inferBindingsFor` but declaration was
left in the header.
2020-10-13 01:22:09 -07:00
Pavel Yaskevich
dc7c9c2bfa [unittests/Sema] Add a simple integer literal type inference test 2020-10-12 18:57:20 -07:00
Pavel Yaskevich
461eafff54 [ConstraintSystem] NFC: Move ConstraintSystem.h to include/swift/Sema 2020-10-08 10:45:47 -07:00