@@ -427,6 +427,15 @@ class GenericSignatureBuilder {
427
427
Type superclass,
428
428
FloatingRequirementSource source);
429
429
430
+ // / Update the layout constraint for the equivalence class of \c T.
431
+ // /
432
+ // / This assumes that the constraint has already been recorded.
433
+ // /
434
+ // / \returns true if anything in the equivalence class changed, false
435
+ // / otherwise.
436
+ bool updateLayout (ResolvedType type,
437
+ LayoutConstraint layout);
438
+
430
439
private:
431
440
// / Add a new superclass requirement specifying that the given
432
441
// / potential archetype has the given type as an ancestor.
@@ -528,8 +537,7 @@ class GenericSignatureBuilder {
528
537
LookUpConformanceInBuilder getLookupConformanceFn ();
529
538
530
539
// / Lookup a protocol conformance in a module-agnostic manner.
531
- ProtocolConformanceRef lookupConformance (CanType dependentType,
532
- Type conformingReplacementType,
540
+ ProtocolConformanceRef lookupConformance (Type conformingReplacementType,
533
541
ProtocolDecl *conformedProtocol);
534
542
535
543
// / Enumerate the requirements that describe the signature of this
@@ -653,6 +661,8 @@ class GenericSignatureBuilder {
653
661
654
662
void diagnoseRedundantRequirements () const ;
655
663
664
+ void diagnoseConflictingConcreteTypeRequirements () const ;
665
+
656
666
bool hasExplicitConformancesImpliedByConcrete () const ;
657
667
658
668
// / Describes the relationship between a given constraint and
@@ -696,34 +706,6 @@ class GenericSignatureBuilder {
696
706
Diag<Type, T> redundancyDiag,
697
707
Diag<unsigned, Type, T> otherNoteDiag);
698
708
699
- // / Check a list of constraints, removing self-derived constraints
700
- // / and diagnosing redundant constraints.
701
- // /
702
- // / \param isSuitableRepresentative Determines whether the given constraint
703
- // / is a suitable representative.
704
- // /
705
- // / \param checkConstraint Checks the given constraint against the
706
- // / canonical constraint to determine which diagnostics (if any) should be
707
- // / emitted.
708
- // /
709
- // / \returns the representative constraint.
710
- template <typename T, typename DiagT>
711
- Constraint<T> checkConstraintList (
712
- TypeArrayView<GenericTypeParamType> genericParams,
713
- std::vector<Constraint<T>> &constraints,
714
- RequirementKind kind,
715
- llvm::function_ref<bool (const Constraint<T> &)>
716
- isSuitableRepresentative,
717
- llvm::function_ref<
718
- ConstraintRelation(const Constraint<T>&)>
719
- checkConstraint,
720
- Optional<Diag<unsigned, Type, DiagT, DiagT>>
721
- conflictingDiag,
722
- Diag<Type, DiagT> redundancyDiag,
723
- Diag<unsigned, Type, DiagT> otherNoteDiag,
724
- llvm::function_ref<DiagT(const T&)> diagValue,
725
- bool removeSelfDerived);
726
-
727
709
// / Check the concrete type constraints within the equivalence
728
710
// / class of the given potential archetype.
729
711
void checkConcreteTypeConstraints (
0 commit comments