Timofey Solonin
3f366947e4
Improve indentation in debugging output
2022-11-17 23:25:31 +08:00
Timofey Solonin
3c401a1c7e
Fix unbalanced braces in debugging output
2022-11-17 22:26:19 +08:00
Pavel Yaskevich
0a75a07962
[CSSolver] Don't drop bindings with type variables while applying solutions
...
If a (partial) solution has a type variable it could only be unbound
if `FreeTypeVariableBinding` is set to `Allow`, in all other cases
solution would either have a fully resolved type or a hole.
`applySolution` shouldn't second guess `finalize()` and just apply
a solution as given. This is very important for multi-statement closures
because their elements are solved in isolation and opaque value types
inferred for their result could contain not-yet-resolved type variables
from outer context in their substitution maps (which it totally legal
under bi-directional inference).
2022-11-10 10:12:38 -08:00
Amritpan Kaur
3f03712788
[ConstraintSystem] Nest simplification result inside new block.
...
Nest failed, added, and removed constraints inside block called
`simplification result`.
2022-09-16 09:17:22 -07:00
Amritpan Kaur
2efcf251ef
[CSSolver] Print constraint simplification and outcome.
2022-09-16 09:17:22 -07:00
Hamish Knight
4716f61fba
[AST] Introduce explicit actions for ASTWalker
...
Replace the use of bool and pointer returns for
`walkToXXXPre`/`walkToXXXPost`, and instead use
explicit actions such as `Action::Continue(E)`,
`Action::SkipChildren(E)`, and `Action::Stop()`.
There are also conditional variants, e.g
`Action::SkipChildrenIf`, `Action::VisitChildrenIf`,
and `Action::StopIf`.
There is still more work that can be done here, in
particular:
- SourceEntityWalker still needs to be migrated.
- Some uses of `return false` in pre-visitation
methods can likely now be replaced by
`Action::Stop`.
- We still use bool and pointer returns internally
within the ASTWalker traversal, which could likely
be improved.
But I'm leaving those as future work for now as
this patch is already large enough.
2022-09-13 10:35:29 +01:00
Amritpan Kaur
fd41a39294
[ConstraintSystem] Refactor solver state depth to its own function for easier indent editing in future.
2022-08-10 13:29:02 -07:00
Amritpan Kaur
2786f24b67
[TypeCheckConstraints.cpp] Remove printing of any empty constraint choice headings and fix minor spacing issues.
2022-08-09 14:09:39 -07:00
Doug Gregor
4fc4bd79e8
[Constraint solver] Track "isolated by preconcurrency" in the solver.
...
Rather than only setting the isolated-by-preconcurrency bit during
constraint application, track the closures it will be set for as part
of the constraint system and solution. Then, use that bit when
performing "strict concurrency context" checks and type adjustments,
so we don't treat an inferred-to-by-`@Sendable`-by-preconcurrency
closure in the solver as if it weren't related to preconcurrency.
Fixes the spurious warning from
https://github.com/apple/swift/issues/59910 .
2022-07-07 23:46:30 -07:00
Pavel Yaskevich
3327559758
[TypeChecker] IDE: Adjust typeCheckForCodeCompletion to support all targets
...
The dependency on target being an expression is artificial,
`typeCheckForCodeCompletion` is capable of type-checking any
type of target.
2022-05-30 23:17:41 -07:00
Pavel Yaskevich
a40e8e80c1
[ConstraintSystem] Use affected range (if any) to diagnose 'too complex' failures
2022-04-25 14:09:45 -07:00
Pavel Yaskevich
7dab90cd98
[ConstraintSystem] NFC: Drop Expression from isTooComplex check
...
Solver can now handle multiple different targets e.g. multi-statement
closures, result builders etc. So it's more appropriate to say that
the constraint system is too complex.
2022-04-25 10:14:39 -07:00
Josh Soref
4c77c59269
Spelling sema ( #42474 )
...
* spelling: accessibility
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: accessories
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: adjustments
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: all
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: ambiguous
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: arguments
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: assignment
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: associated
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: assumes
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: auxiliary
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: availability
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: available
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: belongs
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: checking
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: clazz
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: compatibility
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: completely
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: completion
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: complicated
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: conformance
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: constrained
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: constraint
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: contextual
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: conversion
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: convertible
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: couldn't
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: declaration
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: defaultable
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: dependent
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: depending
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: describe
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: diagnostic
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: diagnostics
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: existential
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: expects
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: explicit
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: explicitly
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: expression
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: first
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: font
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: forward
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: generation
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: generic
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: given
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: global
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: guarantee
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: happened
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: hierarchy
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: identical
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: immediately
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: implicit
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: indicates
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: inferred
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: initialization
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: initialize
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: initializer
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: integrity
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: interpolation
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: introducing
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: involved
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: just
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: like
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: likewise
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: mismatch
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: missing
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: more
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: necessarily
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: noescape
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: nonetheless
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: occurrences
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: operators
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: optional
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: otherwise
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: outside
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: overload
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: overridden
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: override
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: parameter
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: parameters
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: penalize
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: platforms
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: precedence
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: preemptively
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: preliminary
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: preserve
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: propagate
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: propagated
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: qualifier
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: question
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: really
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: received
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: references
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: replaceable
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: replacement
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: representable
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: representative
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: requirement
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: requires
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: resolved
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: retrieve
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: rewriting
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: satisfied
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: semantics
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: signature
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: similar
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: simplest
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: simplification
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: solver
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: struct
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: structurally
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: success
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: sure
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: symmetric
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: syntactically
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: target
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: that
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: the
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: themselves
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: these
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: this
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: transform
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: transparent
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: tread
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: truncation
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: type
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: unconstructable
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: universally
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: unknown
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: unwrapped
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: versioned
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: visible
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: where
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
Co-authored-by: Josh Soref <jsoref@users.noreply.github.com >
2022-04-20 15:12:46 -07:00
Alex Hoppen
b034c48b1d
[CodeCompletion] Record fixes while solving result builders for code completion
...
We record fixes while solving normal expressions for code completion and we should do the same when solving result builders if we are reporting the solutions to completion callbacks.
2022-04-08 11:16:08 +02:00
Pavel Yaskevich
b48a064f62
[ConstraintSystem] Add storage for implicitly generated roots of .callAsFunction
...
Some implicit calls to `.callAsFunction` require that a new root
expression to be created for them in order to record argument list
and resolved overload choice.
2022-02-03 15:35:50 -08:00
Holly Borla
50ddd7ce07
Merge pull request #36575 from hborla/simd-arithmetic-operator-partition
...
[ConstraintSystem] Treat arithmetic SIMD operators like other generic operators when partitioning an overload set.
2021-12-01 12:20:40 -05:00
Anthony Latsis
e48f4830dd
TypeResolution: Replace more 'forContextual' uses with 'resolveContextualType'
2021-11-19 16:44:03 +03:00
Pavel Yaskevich
0c70f5650f
Merge pull request #39592 from Jumhyn/contextual-placeholder-followup
...
Remove default argument from getContextualType
2021-11-08 10:00:36 -08:00
Pavel Yaskevich
f765390c62
[ConstraintSystem] Convert Fixes to a set vector to avoid duplicates
2021-10-22 10:09:09 -07:00
Pavel Yaskevich
d74e8c9407
[ConstraintSystem] Convert ConversionRestrictions to a map vector to avoid duplicates
2021-10-22 10:09:08 -07:00
Pavel Yaskevich
880374eaf3
[ConstraintSystem] Convert DisjunctionChoices to a map vector & assert on duplicates
2021-10-22 10:09:08 -07:00
Pavel Yaskevich
19c253bec2
[ConstraintSystem] Convert argumentMatchingChoices to a map vector to avoid duplicates
2021-10-22 10:09:08 -07:00
Pavel Yaskevich
e95e43d019
[ConstraintSystem] Convert ImplicitValueConversions to a map vector to avoid duplicates
2021-10-22 10:09:08 -07:00
Pavel Yaskevich
568c27f551
[ConstraintSystem] Convert Opened{Existential}Types to a map vector to avoid duplicates
...
Same reasons as with `DefaultConstraints` but also improves
code ergonomics around opened types.
2021-10-22 10:09:08 -07:00
Pavel Yaskevich
cfcc85268a
[ConstraintSystem] Convert DefaultConstraints to a set vector to avoid duplicates
...
It's always been the case that partial solutions introduce
some storage duplication when applied back to the constraint
system to form a more complete solution with outer context,
but the constraint systems used to be small before
introduction of result builders (and now multi-statement
inference), which make the duplication more visible.
2021-10-22 10:09:08 -07:00
Doug Gregor
b72f9394d9
Remove unnecessary clear().
2021-10-21 12:11:33 -07:00
Doug Gregor
0c9f9f7a43
Use a SmallSetVector to eliminate duplicates
2021-10-20 23:15:21 -07:00
Doug Gregor
45824befd2
Infer 'isolated' closure parameters from context.
...
When a closure is provided with a contextual type that has isolated
parameters, infer that the corresponding closure parameter is "isolated".
Fixes rdar://83732479.
2021-10-20 21:51:42 -07:00
Luciano Almeida
ca8b660a1c
Merge pull request #39648 from LucianoPAlmeida/SR-15281-cast
...
[SR-15281] [Sema] Couple of contextual mismatch and runtime cast diagnostic fixes
2021-10-10 08:03:24 -03:00
LucianoAlmeida
5424797e79
[Sema] Make constraint restriction to store TypeBase * instead of Type
2021-10-09 14:26:21 -03:00
Pavel Yaskevich
67a721485f
[ConstraintSystem] Compute variables referenced by conjunction elements incrementally
...
Attempting to pre-compute a set of referenced type variables
upfront is incorrect because parameter(s) and/or result type
could be bound before conjunction is attempted. Let's compute
a set of referenced variables before each element gets attempted.
2021-10-08 10:08:03 -07:00
Pavel Yaskevich
95119f1049
[CSSolver] Don't select disabled conjunctions
2021-10-08 10:08:01 -07:00
Pavel Yaskevich
f3440077b6
[CSSimplify] Implement conjunction element simplification
2021-10-08 10:08:01 -07:00
Pavel Yaskevich
27275f6214
[CSStep] Add an implementation of ConjunctionStep
...
It behavies similar to `DisjunctionStep` but attempts all of
its elements unless there is an inference failure.
2021-10-08 10:08:00 -07:00
Pavel Yaskevich
2377f0507c
[ConstraintSystem] Add a conjunction element producer
...
In preporation to add `ConjunctionStep`, let's first
introduce a `ConjunctionElement` and `ConjunctionElementProducer`.
2021-10-08 10:08:00 -07:00
Frederick Kellison-Linn
b433724735
Remove default argument from getContextualType
2021-10-05 17:04:54 -04:00
Hamish Knight
cf4fc9f3c9
Merge pull request #39541 from hamishknight/dynamic-programming
2021-10-05 21:11:01 +01:00
Frederick Kellison-Linn
f6b6f0cd2b
Lift replaceInferableTypes call into getContextualType
2021-10-04 23:36:33 -04:00
Hamish Knight
f045350266
[CS] Clean up dynamic member overload choice checking
...
Add `OverloadChoice::isAnyDynamicMemberLookup`,
and use it to clean up a couple of places.
2021-10-01 12:54:08 +01:00
Hamish Knight
ddff9c4c9d
[CS] Store argument list mappings on solutions
...
Roll back argument list mappings in the constraint
system at the end of solver scopes, and copy
argument list mappings into solutions.
2021-09-06 12:54:49 +01:00
Hamish Knight
8c2b88abc0
[CS] Adopt ArgumentList
...
- Explicitly limit favoring logic to only handle
unary args, this seems to have always been the
case, but needs to be handled explicitly now that
argument lists aren't exprs
- Update the ConstraintLocator simplification to
handle argument lists
- Store a mapping of locators to argument lists
in the constraint system
- Abstract more logic into a getArgumentLocator
method which retrieves an argument-to-param locator
from an argument anchor expr
2021-09-01 18:40:25 +01:00
Pavel Yaskevich
6a85650573
[ConstraintSystem] Don't attempt to rollback state and scope from incorrect state
2021-08-06 12:32:17 -07:00
Pavel Yaskevich
d8cdbcd0c7
[ConstraintSystem] Add InvalidState flag to indicate that any attempt to solve should fail
...
As soon as `InvalidState` flag is set solving of the constraint
system as aborted and all subsequent calls to `solveImpl` would
produce no solutions.
2021-08-06 10:03:05 -07:00
Alex Hoppen
f42f961faf
[Sema] Copy key path component types when merging solutions
...
In 2eeff365b1 I forgot to copy key path component types when applying a solution to the constraint system. That caused a crash in key path code completion.
Fixes rdar://81118700 [SR-14979]
2021-07-30 11:07:21 +02:00
Holly Borla
06a7950d0d
[ConstraintSystem] Treat arithmetic SIMD operators like other generic
...
operators when partitioning an overload set.
2021-07-22 19:15:45 -07:00
Alex Hoppen
2eeff365b1
[CodeCompletion] Record key path component types in the constraint system solution
...
The added test case fails because the result builder inside `List2` is being type checked twice: Once for every overload of `List2`. Because of the way that result builders are being type checked right now, each overload of `List2` creates a new type variable for the key components in `foo` and the constraint system only keeps track of the key path component -> type mapping for the last solution discovered.
When we are now trying to look up the type of the first key path component for the first solution, the constraint system returns the type variable that is being used by the second solution and simplifying that type variable through the first solution fails because it doesn’t know about the type variable.
To fix the issue, make sure that the solutions keep track of the their type variables associated to key path components. That way the first solution owns its own key path component -> type variable mapping and is thus also able to simplify the type variable it has associated with the component.
Fixes rdar://80522345 [SR-14916]
2021-07-14 17:57:29 +02:00
Hamish Knight
46fa6e5721
[AST] Improve BinaryExpr
...
Abstract away the TupleExpr gunk and expose
`getLHS` and `getRHS` accessors. This is in
preparation for completely expunging the use
of TupleExpr as an argument list.
2021-05-19 14:48:01 +01:00
Slava Pestov
131d3f4bce
Sema: Pass down a ModuleDecl instead of a DeclContext to conformsToProtocol()
...
... and a bunch of follow-up simplifications pushing ModuleDecls further
up, since I couldn't resist the yak shave.
2021-05-17 16:34:18 -04:00
Nathan Hawes
f75f5fe78d
Merge pull request #36879 from nathawes/track-match-call-result
...
[ConstraintSystem] Record parameter bindings in solutions (NFC)
2021-04-18 06:10:23 +10:00
Nathan Hawes
c57c403ffa
[ConstraintSystem] Record parameter bindings in solutions (NFC)
...
This saves us from needing to re-match args to params in CSApply and is also
useful for a forthcoming change migrating code completion in argument position
to use the solver-based typeCheckForCodeCompletion api.
rdar://76581093
2021-04-16 18:32:06 +10:00