Pavel Yaskevich
7d8af2d03a
Merge pull request #58953 from xedin/fix-callAsFunction-perf
...
[CSSimplify] Disfavor choices that have injected `callAsFunction`
2022-05-26 09:51:33 -07:00
Pavel Yaskevich
7898b5a088
[CSSimplify] Disfavor choices that have injected callAsFunction
...
Ambiguities like:
```
struct S {
init(v: Int) {}
init(v: Int, _: () -> Void) {}
func callAsFunction(_: () -> Void) {}
}
S(v: 42) {
}
```
Should always be resolved in favor of choice that doesn't require
injection of `.callAsFunction`, so let's try to avoid solving if
such an overload has already been found.
2022-05-26 00:47:34 -07:00
Pavel Yaskevich
0a5b3f0727
[TypeChecker] SE-0324: Extend Swift -> C pointer conversions to inout
...
Fixes an oversight where `inout` -> C pointer conversion wasn't covered
by implementation of new pointer conversion semantics proposed by SE-0324.
Resolves: rdar://92583588
2022-05-25 20:55:22 -07:00
Pavel Yaskevich
d81007cf08
[CSSimplify] Avoid filtering init overloads of a callable type
...
If there is a call to `init` on a callable type that has a trailing
closure, let's avoid filtering because it's impossible to tell whether
a trailing closure belongs to an `init` call or implicit `.callAsFunction`
that would be attempted after it.
Resolves: rdar://92912878
2022-05-09 18:12:52 -07:00
Pavel Yaskevich
8508e187c1
Merge pull request #58531 from xedin/rdar-92327807
...
[CSSimplify] Don't attempt to synthesize ~= for optional base types
2022-05-04 10:55:56 -07:00
Robert Widmann
4f8678563c
Merge pull request #58624 from CodaFi/existence-is-suffering
...
Existential Types Cannot Satisfy Superclass Bounds
2022-05-03 08:57:29 -07:00
Robert Widmann
6d28831617
Existential Types Cannot Satisfy Superclass Bounds
...
It is not the case that `any P` satisfies a class bound
even if the existential is a composition with an exact
match to the class bound. The resulting existential box
must be opened as the exact class type before this conversion
can succeed.
This appears to be a regression from Swift 5.1, which was the last
Swift compiler that banned this typing rule.
rdar://92358570
2022-05-02 15:59:10 -07:00
Pavel Yaskevich
2c140bdf4d
Merge pull request #58503 from xedin/rdar-92366212
...
[ConstraintSystem] Fail `~=` synthesis if constraint generation fails
2022-04-29 10:19:01 -07:00
Pavel Yaskevich
f0ba1a859a
[CSSimplify] Don't attempt to synthesize ~= for optional base types
...
`EnumElement` patterns with optional base type do member lookup
on both optional type and its wrapped type but do not synthesize
`~=` operator call.
Resolves: rdar://92327807
2022-04-29 10:09:31 -07:00
Pavel Yaskevich
48e70ed6cc
[ConstraintSystem] Fail ~= synthesis if constraint generation fails
...
If constraint generation for application of `~=` failed that should
result in an immediate synthesis failure.
Resolves: rdar://92366212
2022-04-28 18:02:19 -07:00
Pavel Yaskevich
0e4d16d585
[ConstraintSystem] Fail closure resolution if one of the parameters has invalid property wrapper
2022-04-28 18:02:19 -07:00
Doug Gregor
e7a559f2f4
Merge pull request #58427 from DougGregor/downgrade-sendable-function-conversions
2022-04-26 21:13:41 -07:00
Doug Gregor
1c55138dcf
Downgrade missing @Sendable to a warning in Swift 5.x mode.
...
We're treating Sendable issues as warnings, not errors, so downgrade
function conversion errors to warnings as well. Fixes rdar://92291276.
2022-04-26 15:48:54 -07:00
Pavel Yaskevich
6a65810d30
[Constraint] NFC: Rename ClosureBodyElement to SyntacticElement
...
`SyntacticElement` represents a statement, pattern, declaration,
condition, or expression and could originate from i.e. a closure,
a function or a result builder body.
2022-04-26 09:55:04 -07:00
Doug Gregor
0e98bf28f0
Introduce missing Sendable conformances for existential conversions
...
When performing conversions to an existential that involves Sendable,
introducing missing conformances as needed to allow the type-check to
succeed and then (later) they'll be diagnosed appropriately.
Fixes rdar://89992095.
2022-04-22 23:56:58 -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
Luciano Almeida
a6ab3b613e
[Sema] Refactor TypeChecker::typeCheckCheckedCast in order to remove all diagnostic emiting logic from it
2022-04-14 00:12:33 -03:00
John McCall
d079679e0c
Merge pull request #42317 from rjmccall/build-constrained-existential-metadata
...
IR generation for constrained existentials
2022-04-12 19:37:53 -04:00
John McCall
5519749ade
[NFC] Collect protocol decls, not type, in ExistentialLayout
...
Another thing that will be necessary for correctness with
compositions of parameterized protocols.
2022-04-11 22:15:16 -04:00
Pavel Yaskevich
27fb7885aa
[CSSimplify] NFC: Remove unused ASTContext reference left after SE-0347 flag
2022-04-11 15:17:15 -07:00
Pavel Yaskevich
b03021dbb7
[TypeChecker] SE-0347: Enable type inference from default expressions
2022-04-06 15:03:00 -07:00
Pavel Yaskevich
d727a79963
Merge pull request #42146 from xedin/rdar-91145060
...
[ConstraintSystem] Cache types of `~=` components
2022-04-04 10:35:52 -07:00
Alex Hoppen
0ded798ceb
Merge pull request #42006 from ahoppen/pr/prepare-for-migrate-postfixexprparen
...
[CodeCompletion][Sema] Multiple improvements to prepare for migration of PostfixExprParen to solver-based
2022-04-03 16:43:36 +02:00
Pavel Yaskevich
8b8ccb488a
[ConstraintSystem] Cache types of ~= components
...
While synthesizing `~=` application for multi-statement closures or
result builder, solver shouldn't set types directly to newly
created AST nodes because they might not be fully resolved, instead
such types have to be recorded in the constraint system and then
set during solution application.
Resolves: rdar://91145060.
2022-04-01 14:00:43 -07:00
Doug Gregor
b94d6eb874
Merge pull request #42121 from xedin/rdar-91110069
...
[ConstraintSystem] Fix a bug in existential Self erasure
2022-03-31 20:55:34 -07:00
Pavel Yaskevich
9e3432a833
[ConstraintSystem] Fix a bug in existential Self erasure
...
`typeEraseExistentialSelfReferences` shouldn't account for
contextual signature because that signature could have
generic parameters of it's own unrelated to the reference
which would be located before generic parameters of the
member, e.g. when the code is located in a protocol extension,
which invalidates the assumption that `Self` is located at
depth = 0, index = 0.
Resolves: rdar://91110069
2022-03-31 13:19:33 -07:00
Luciano Almeida
df913c9832
Merge pull request #42050 from LucianoPAlmeida/SR-16058-casts
...
[SR-16058][Sema] Consider wrapping type variable layers of optionality when warning about checked casts
2022-03-30 23:44:54 -03:00
Doug Gregor
0927c9f2fa
Restrict implicit opening of existentials based on the generic function's requirements
...
Rather than looking solely at the existential argument of a generic
function to determine whether it self-conforms, compare the
existential argument against each of the protocols to which the
corresponding generic parameter conforms. This better models when the
existential value itself will successfully meet the requirements of
the generic function, and therefore not require opening.
This provides far better source compatibility by not changing
semantics of existing, well-formed calls, and eliminates the need to
special-case CoW-related operations in the standard library.
2022-03-29 11:59:29 -07:00
Doug Gregor
efd19658ca
Revert "Don't open existentials for library builtin shims"
...
This reverts commit 5b0d1fd5f2 .
2022-03-29 11:59:28 -07:00
Doug Gregor
5b0d1fd5f2
Don't open existentials for library builtin shims
2022-03-28 18:48:17 -07:00
Doug Gregor
0ca06295bc
Suppress opened existentials for self-conforming existential metatype arguments
2022-03-28 18:48:17 -07:00
Doug Gregor
945790a6f5
as! and as? also indicate suppression of implicit existential opening
2022-03-28 13:33:29 -07:00
Luciano Almeida
de1bd2d478
[SR-16058][Sema] Consider wrapping type variable layers of optionality when warning about checked casts
2022-03-27 19:14:43 -03:00
Pavel Yaskevich
53617f0a4c
Merge pull request #42036 from xedin/dont-infer-from-magic-defaults
...
[TypeChecker] SE-0347: Avoid type inference from caller-site defaults
2022-03-25 20:11:39 -07:00
Pavel Yaskevich
c03e8b5544
Merge pull request #41899 from xedin/rdar-90419017
...
[Diagnostics] Ignore type mismatches related to synthesized arguments
2022-03-25 14:47:52 -07:00
Pavel Yaskevich
5b9b4977e0
[TypeChecker] SE-0347: Avoid type inference from caller-site defaults
...
Such default expressions are injected as an argument to each call site,
so they cannot participate in inference at declaration site.
2022-03-25 13:10:04 -07:00
Pavel Yaskevich
8506d9dd98
Merge pull request #42022 from hborla/default-argument-fixes
...
[ConstraintSystem] Only attempt to infer a type from a default argument if there is a non-null callee.
2022-03-25 12:01:30 -07:00
Alex Hoppen
c6ef59676d
[Sema] Don't crash in matchCallArguments if autoclosure type is not a function type
...
During code completion, the function type may be a placeholder type. Don't crash in those cases.
2022-03-25 09:36:06 +01:00
Alex Hoppen
d082ebb0ca
[CodeCompletion] Don't report an extra argument failure if the code completion token is the first one in a call
...
This makes sure we don't penalize overloads with no arguments when calling
```swift
func foo() {}
func foo(_ arg: Int) {}
foo(#^COMPLETE^#
```
2022-03-25 09:36:05 +01:00
Holly Borla
0fdb9a38d2
[ConstraintSystem] Bail out of inference from default arguments if there
...
is no parameter list for the callee.
This can happen when the callee is a closure that has been assigned to
a variable.
2022-03-25 00:20:34 -07:00
Holly Borla
c71b7c500e
[ConstraintSystem] Only attempt to infer a type from a default argument
...
if there is a non-null callee.
Otherwise, getParameterList(callee) will crash if the callee is a closure.
Closures can't have default arguments anyway, so there's no need to
attempt this new inference.
2022-03-24 23:26:24 -07:00
Xi Ge
6206d7cc9d
sema: accept an array literal of enum case references as compile-time constant
2022-03-24 21:44:09 -07:00
Xi Ge
d26760e49a
Merge pull request #42010 from nkcsgexi/90210674
2022-03-24 16:13:22 -07:00
Doug Gregor
25e71a3a3b
Don't open an existential argument that's completely self-conforming.
...
Such existential arguments will already meet the requirements of a
generic function they are passed to, but would change runtime
semantics. Therefore, don't open the existential in such cases.
2022-03-24 13:08:00 -07:00
Xi Ge
121f39c790
sema: set locator properly when diagnosing constness mismatches
...
rdar://90210674
2022-03-24 12:47:28 -07:00
Doug Gregor
38c9d2e8dd
Merge pull request #41992 from DougGregor/implicit-existential-opening-erase-or-reject
2022-03-23 21:03:54 -07:00
Doug Gregor
50451d2583
Type-erase contravariant uses of opened existentials in subsequent parameters.
...
When we open an existential argument in a call to a generic function,
type-erase contravariant uses of that opened existential in subsequent
parameters. This primarily impacts closure parameters, where we want
the closure to be provided with an existential parameter type rather
than permit the parameter to have opened existential type. This
prevents the opened existential type from being directly exposed in
the type system.
Note that we do not need to perform this erasure when the argument is
a reference to a generic function, because there it is suitable to
infer that the generic arguments are the opened archetypes. This
subsumes the use case for `_openExistential`.
2022-03-23 15:22:06 -07:00
Pavel Yaskevich
9d413b3668
Merge pull request #41939 from xedin/rdar-87407899
...
[Diagnostics] Fix out-of-bounds index while fixing argument mismatch
2022-03-22 22:46:54 -07:00
Alex Hoppen
1ef2c5972c
Merge pull request #41917 from ahoppen/pr/filter-overloads-if-no-cc-token
...
[CodeCompletion] Filter overloads if their function application doesn't contain the code completion token
2022-03-22 12:11:29 +01:00
Alex Hoppen
045302b4cb
[CodeCompletion] Filter overloads if their function application doesn't contain the code completion token
...
When solving for code completion, we weren't disabling overloads because the call might be malfored in the presence of a code completion token (because the user is only now writing the function call). But this logic doesn't apply to function calls that don't even involve the code completion token, which happens if completing in result builders.
I am hoping that this significantly improves code completion performance inside result builders.
2022-03-22 08:07:46 +01:00