Commit Graph

11 Commits

Author SHA1 Message Date
Slava Pestov
1b99dd2451 RequirementMachine: Tweak RewriteSystem::recordConflict() heuristic again 2024-02-29 18:13:28 -05:00
Slava Pestov
70c9f8a47e RequirementMachine: Leave behind conflicting requirements in the minimized signature
Requirement lowering only expects that it won't see two requirements
of the same kind (except for conformance requirements). So only mark
those as conflicting.

This addresses a crash-on-invalid and improves diagnostics for
move-only generics, because a conflict won't drop the copyability
of a generic parameter and expose a move-only-naive user to
confusing error messages.

Fixes #61031.
Fixes #63997.
Fixes rdar://problem/111991454.
2024-02-15 14:32:31 -05:00
Slava Pestov
ea15d9f9b2 Stop passing -warn-redundant-requirements in tests 2024-02-02 14:57:19 -05:00
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
Slava Pestov
f39372b33d RequirementMachine: Turn off redundant requirement warnings by default and add -warn-redundant-requirements frontend flag 2022-05-10 01:49:56 -04:00
Slava Pestov
06b181a099 RequirementMachine: Don't record duplicate conflicts in PropertyMap::checkConcreteTypeRequirements() 2022-04-01 22:38:42 -04:00
Slava Pestov
7b01ff60f0 RequirementMachine: Simplify RewriteSystem::processConflicts()
Remove the logic which incorrectly attempted to simulate the
GenericSignatureBuilder's minimization behavior in the presence
of conflicts, since it doesn't matter anymore.
2022-03-14 12:33:18 -04:00
Slava Pestov
a8a281d637 RequirementMachine: Use recordConflict() for superclass conflicts
Instead of calling markConflicting() directly, use the existing
recordConflict() utility.
2022-03-14 12:33:18 -04:00
Slava Pestov
2f16ca38e5 RequirementMachine: Unify every pair of concrete type rules that apply to a term
Instead of keeping track of the best one so far, and unifying subsequent rules
against it.

This allows us to record more identities, fixing a regression from an earlier
change where we were unable to eliminate an obviously-redundant rule.
2022-02-17 19:40:58 -05:00
Slava Pestov
e4973158d8 AST: -debug-generic-signatures protocol-qualifies DependentMemberTypes 2022-01-19 22:36:15 -05:00
Slava Pestov
9bb497c866 RequirementMachine: Concrete class requirements imply superclass requirements 2022-01-05 22:41:03 -05:00