Commit Graph

7 Commits

Author SHA1 Message Date
Slava Pestov
af8c8f1671 Sema: Remove non-experimental associated type inference 2024-03-07 17:30:17 -05:00
Slava Pestov
cfc684c00e Sema: Fix recent regression with -disable-experimental-associated-type-inference
This just brings back a bunch of old brittle logic conditionalized on the
negation of the flag.

Fixes rdar://problem/122810266.
2024-02-14 06:33:32 -05:00
Slava Pestov
fbd1f1acbd Sema: Fix a couple of problems in checkContextualRequirements()
The original bug was a crash-on-invalid with a missing '}', but it
actually exposed a bug with nested protocols (SE-0404) and another
long-time bug.

- Whatever we do, we should skip this for protocols because their 'Self'
  parameter is not bound from context.

- getTrailingWhereClause() is not the right proxy for "has a generic
  signature different than its parent", in particular it doesn't
  round-trip through serialization. Instead, just compare generic
  signatures for pointer equality in the early return check.

The second change is source-breaking because it was possible to
write a nested type with a `where` clause and use it contradicting
its requirements across a module boundary.

Fixes rdar://113103854.
2023-08-08 15:06:08 -04:00
Anthony Latsis
d98a76172d Gardening: Migrate test suite to GH issues: Sema (1/2) 2022-09-02 11:00:19 +03:00
hank121314
1e5519c655 [Sema] test: use %target-typecheck-verify-swift instead of -emit-sil 2022-04-13 21:17:45 +08:00
hank121314
7edbf671ee [Sema] test: fix linux smoke test 2022-04-13 18:28:34 +08:00
hank121314
1dabc67b5f [Sema] TypeCheckProtocolInference: using trailingWhereClause to get self bounds in source file. 2022-04-12 22:57:47 +08:00