Commit Graph

10 Commits

Author SHA1 Message Date
Anthony Latsis
bc4a3465a9 Gardening: Migrate test suite to GH issues: Generics 2022-08-30 01:49:59 +03:00
Anthony Latsis
ba7f301e83 ConformanceChecker: Always diagnose a conformance failure if the requirement check fails in 'ensureRequirementsAreSatisfied' 2022-03-28 23:22:36 +03:00
Robert Widmann
dce1e2ea32 [Gardening] Remove unnecessary options and files from tests 2019-09-10 18:15:16 -07:00
Huon Wilson
578097c2b6 [GSB] AbstractProtocol sources are explicit when computing req. sig. and not inferred.
If they're considered explicit, requirement inference will complain when
it infers X: SomeProtocol for some concrete type X.

Fixes SR-4693, rdar://problem/31819616
2017-05-24 13:32:01 -07:00
Doug Gregor
97c6707910 [SubstitutionMap] Cope with missing conformances in lookupConformance().
When asking a substitution map for a conformance, it's okay if the
conformance isn't there---just detect this case and return None.

Also, collapse a redundant testcase Huon noted.
2017-04-04 10:58:01 -07:00
Doug Gregor
4eeb53f7a6 Check conformances against the requirement signature using module lookup.
When we are checking the conformance of a nominal type to a particular
protocol, we check each of the requirements in the requirement
signature, substituting in our Self type and (by extension) type
witnesses. However, when we're trying to fulfill requirements for
associated types (which might be mapped to concrete types), perform
the conformance lookup in the module of the conformance itself---not
the SubstitutionMap, which can't possibly have them at this point.

Fixes rdar://problem/31041997.
2017-04-04 10:58:01 -07:00
Slava Pestov
88e7ff9bfb Use 2-space indent instead of 4-space indent in protocol_where_clause test
This is a serious violation of policy and has been reported to
all relevant law enforcement agencies.
2017-04-03 15:36:08 -07:00
Slava Pestov
9db6b10059 AST: Targeted fix for conformance lookup issue
When substituting a type like T.A.B where A and B are
associated types and the conformance requirement on T.A
is implied by conformance requirements on T, we would
crash.

The problem is that we have no way of representing an
abstract conformance with nested concrete types.

This patch adds a workaround that we can live with until
ConformanceAccessPaths are plumbed through all the way.

Fixes <rdar://problem/30737546> and
<https://bugs.swift.org/browse/SR-3500>.

Possibly fixes <rdar://problem/31334245>.
2017-04-03 15:35:10 -07:00
Doug Gregor
9aed438f27 [GSB] Use isDerivedRequirement() for same-type connected components 2017-03-19 22:26:39 -07:00
Huon Wilson
5d89786031 [Sema] Feed protocol where clauses into the places that need to reason about them. 2017-03-09 16:23:31 -08:00