Commit Graph

6 Commits

Author SHA1 Message Date
Slava Pestov
dac8d666ee Stop passing -requirement-machine-{abstract,inferred,protocol}-signatures flags in tests
These flags are now no-ops.
2022-05-10 12:56:17 -04:00
Holly Borla
236e8e2b1d [RequirementMachine] Diagnose type parameters that are made concrete by a
same-type requirement.
2022-04-08 18:16:23 -07:00
Holly Borla
7e5c48382d [RequirementMachine] When computing requirements for conflict diagnostics,
adjust the concrete type symbol for the suffix rule by applying the prefix
from the subject rule.
2022-03-30 22:30:45 -07:00
Holly Borla
f52593be68 [RequirementMachine] Record the sugared 'Self' type parameter when
initializing a RequirementMachine for a written protocol signature.

These generic parameters are used for re-sugaring when computing a
type from a term, so if the recorded 'Self' parameter is canonicalized,
it shows up in diagnostics as 'tau_0_0'.
2022-03-29 18:27:45 -07:00
Slava Pestov
8e09ba8b45 RequirementMachine: Introduce 'concrete contraction' pre-processing pass before building rewrite system
See the comment at the top of ConcreteContraction.cpp for a detailed explanation.

This can be turned off with the -disable-requirement-machine-concrete-contraction
pass, mostly meant for testing. A few tests now run with this pass both enabled
and disabled, to exercise code paths which are otherwise trivially avoided by
concrete contraction.

Fixes rdar://problem/88135912.
2022-02-25 11:48:38 -05:00
Slava Pestov
bbbbfbac89 RequirementMachine: Fix assertion when protocol Self is constrained to a non-conforming type
The conflicting rule here is the permanent 'identity conformance'
([P].[P] => [P]). Permanent rules cannot be marked as conflicting,
so just check for this condition first.
2022-02-25 11:48:38 -05:00