Pavel Yaskevich
0e70841d5f
[Diagnostics] Diagnose returning existential values that lose requirements
...
Diagnose situations where inferring existential type for result of
a call would result in loss of generic requirements.
```swift
protocol P {
associatedtype A
}
protocol Q {
associatedtype B: P where B.A == Int
}
func getB<T: Q>(_: T) -> T.B { ... }
func test(v: any Q) {
let _ = getB(v) // <- produces `any P` which looses A == Int
}
```
2022-05-25 16:07:05 -07:00
Pavel Yaskevich
dfadee3731
[CSDiagnostics] Attach missing member diagnostic to a pattern/statement
...
If missing member is found in e.g. case statement or a pattern,
let's attach diagnostic directly to it.
2022-05-18 00:28:08 -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
99f1704873
[CSFix] Create a fix for checked cast that always fail and existential to CFType
2022-04-13 22:13:48 -03:00
Pavel Yaskevich
82b955b93c
[CSDiagnostics] Detect and diagnose contextual mismatches with default value
2022-02-21 09:59:54 -08:00
Anthony Latsis
c47f99a22d
Diag: Use 'Self'-rooted interface types instead of opened archetypes in requirement failure messages
2022-02-02 02:10:05 +03:00
Doug Gregor
c0f5502269
Leverage error-to-warnings downgrades for non-ephemeral conversion diagnostics
...
There were slight wording changes between the warning and error
diagnostics, but they don't seem to justify the duplication here.
2021-12-02 11:12:07 -08:00
Doug Gregor
365f0afa9f
Downgrade concurrency-related function type errors in existing code
...
When in "existing" Swift code that is Swift 5.x and has not adopted
concurrency, allow mismatches in function types that only involve
ABI-neutral concurrency changes (e.g., adding `@Sendable` or removing
a global actor) by downgrading the diagnostic to a warning. This
improves the story for incremental adoption of concurrency in an
existing code base.
As part of this, generalize the facility for downgrading an error to a
warning when performing diagnostics in the constraint solver, using the
new diagnostic behavior limits rather than duplicating diagnostics.
2021-12-02 10:33:01 -08:00
Xi Ge
03c76bd32d
sema: diagnose passing a non-constant value into a constant parameter
2021-11-22 11:52:57 -08:00
Hamish Knight
4aaec65780
[CS] Warn on mismatched tuple labels for subtyping
...
This is something that we'd like to fix to bring
in line with tuple conversion, so start warning on
cases where it occurs.
2021-11-17 17:06:21 +00:00
Pavel Yaskevich
4343227d19
[Diagnostics] Determine affected elements early in collection element mismatches
...
Diagnostics cannot assume that solution would always be applied
to the constraint system, so all of the elements affected by the
mismatch have to be determined by the fix.
Resolves: rdar://85021348
2021-11-12 10:10:44 -08: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
84fa8a35e6
[Sema] Fix unused function/variable warnings in no-assertion configuration
2021-10-15 13:22:44 -07:00
Pavel Yaskevich
1c0a306c75
Merge pull request #37956 from xedin/implicit-swift-to-c-ptr-conversions
...
[TypeChecker] Implement limited set of conversions between Swift and C pointers
2021-10-06 14:35:22 -07:00
Frederick Kellison-Linn
b433724735
Remove default argument from getContextualType
2021-10-05 17:04:54 -04:00
Konrad `ktoso` Malawski
703595e396
[Concurrent] Warnings/errors should use "sendable" not "concurrent"
...
Resolves rdar://83416205
2021-09-23 12:45:07 +09:00
Pavel Yaskevich
de35114171
[Diagnostics] Add a tailored diagnostic for Swift -> C pointer conversion
...
Diagnose situations where Swift -> C pointer implicit conversion
is attempted on a Swift function instead of one imported from C header.
```swift
func test(_: UnsafePointer<UInt8>) {}
func pass_ptr(ptr: UnsafeRawPointer) {
test(ptr) // Only okay if `test` was an imported C function.
}
```
2021-09-20 17:22:26 -07:00
Pavel Yaskevich
a061a966d1
Merge pull request #39251 from xedin/classof-for-fixes
...
[CSFix] Add support for `classof` for all fixes
2021-09-20 14:33:06 -07:00
Pavel Yaskevich
bd7d2125b7
Merge pull request #39261 from JiarenWang/wjr
...
[Compiler] add 'value' label for `NSNumber` to prevent roundabout err…
2021-09-16 10:17:38 -07:00
jiaren wang
391c6e07ad
[Compiler] add 'value' label for NSNumber to prevent roundabout error message.
2021-09-15 23:23:41 +08:00
Pavel Yaskevich
0a425480d0
[CSFix] NFC: Rename fix/diagnostic for checked casts that always succeed
2021-09-10 13:55:15 -07:00
Pavel Yaskevich
60d931612c
[Dignostics] Diagnose weak declarations with non-optional types
...
Diagnose situations where `weak` attribute is used with a non-optional type
in declaration e.g. `weak var x: <Type>`:
```swift
class X {
}
weak var x: X = ...
```
`weak` declaration is required to use an optional type e.g. `X?`.
2021-09-07 17:36:56 -07:00
Holly Borla
03777c3fc9
[Diagnostics] Remove ContextualFailure::diagnoseMissingFunctionCall.
...
Instead, always diagnose missing call errors via MissingCallFailure.
2021-09-06 20:05:13 -07:00
Holly Borla
9d0d521457
[Diagnostics] Diagnose associated value pattern matching errors separately
...
from missing function call errors in `ContextualFailure`.
It doesn't make sense to diagnose pattern matching errors inside of
`diagnoseMissingFunctionCall`, and the code I added to bail out if there
is no explicit function expression broke the pattern matching diagnostics
anyway.
2021-09-06 19:50:00 -07: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
Frederick Kellison-Linn
5f07747cb3
[Sema] Diagnose user-specified placeholders which couldn’t be resolved
2021-08-19 14:53:33 -04:00
Pavel Yaskevich
0074adc6fe
[Diagnostics] Result Builders: Extract pattern binding and var storage diagnostics into methods
2021-08-13 12:30:16 -07:00
Hamish Knight
21e8a320ec
[CS] Better handle paren fix-its for unresolved chains
...
I missed this case when previously improving the
logic here. As it turns out, using the raw anchor
as the root expression from which to derive parent
information is insufficient. This is because it
may not capture relevant parent exprs not a part
of the fix locator.
Instead, pass down a function that can be used to
derive the parent expressions from the constraint
system's own parent map. Also make sure to assign
to `expr` for the UnresolvedMemberChainResultExpr
case to make sure we correctly check for it as a
sub-expression.
Finally, now that we're looking at more parent
exprs, add logic to handle `try` and `await`
parents, as well as ClosureExprs and
CollectionExprs. I couldn't come up with a test
case for CollectionExpr, as we emit different
diagnostics in that case, but it's probably better
to tend on the side of being more future proof
there.
rdar://81512079
2021-08-04 14:34:24 +01:00
Luciano Almeida
48792bbfdc
[Sema] Add tailored diagnostic for a escapeness mismatch in a fn type parameter position
2021-06-30 06:39:04 -03:00
Pavel Yaskevich
51fe32dc1a
[Diagnostics] NFC: Remove unused last argument from requirement failure notes
2021-06-25 13:44:30 -07:00
Pavel Yaskevich
fc982aec83
[Diagnostics] Use signed integer to store difference in optionality between types
...
For checked cast coercion warnings let's store difference in optionality
as an `int` because it's possible that "to" type is more optional than
"from" type.
2021-06-21 13:31:59 -07:00
Pavel Yaskevich
0d50593f68
[Diagnostics] NFC: Fix a typo in a method name: wrapedTypes -> wrappedTypes
2021-06-21 13:31:59 -07:00
Pavel Yaskevich
2a5eea6165
[Diagnostics] NFC: Add asserts to verify from/to types in contextual failure
...
We have a couple of reports that `ContextualFailure` crashes in
`trySequenceSubsequenceFixIts` even with the check for a valid
stdlib was added, which can only mean that from/to types are
somehow invalid.
Let's add a couple of asserts to verify their presence to aid us
in determining what expressions can cause the problem.
2021-05-21 14:55:17 -07: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
Pavel Yaskevich
71372bce67
[Diagnostics] Switch to use contextual purpose associated with locator
...
`ContextualFailure` is the main beneficiary of additional information
associated with `ContextualType` element because it no longer has to
query solution for "purpose" of the contextual information.
Resolves: rdar://68795727
2021-04-26 09:51:25 -07:00
Strieker
11efb7d0b3
[Diagnostics] Added new diagnostic error string for composed property wrapper mismatch in DiagnosticsSema.def and made changes to show the new composed property wrapper mismatch type diagnostic in both CSDiagnostics.cpp and CSDiagnostics.h.
2021-04-22 11:31:41 -07:00
Pavel Yaskevich
df8113b5dd
[Diagnostics] Contextual mismatch should be attached to the closure if its body is empty/implicit
...
If there is a contextual mismatch associated with a closure body,
make sure that the diagnostic is attached to the closure even
if the body is empty or implicit.
Resolves: rdar://52204608
2021-04-07 10:06:34 -07:00
Holly Borla
6f4b62a93c
Merge pull request #36568 from hborla/property-wrapper-constraint
...
[ConstraintSystem] Add a property-wrapper constraint to allow for inference of implicit property wrappers
2021-03-24 17:13:51 -07:00
Holly Borla
76c4c3dc3f
[Diagnostics] Add back a dedicated fix/diagnostic for using an invalid
...
type as a property wrapper.
2021-03-24 11:24:21 -07:00
Holly Borla
f05589f6c4
[Diagnostics] Improve diagnostics for passing an invalid projected
...
value argument.
2021-03-24 11:24:21 -07:00
Pavel Yaskevich
d7e0971764
Merge pull request #36531 from LucianoPAlmeida/SR-14096-kp-as-fn
...
[Sema][SR-14096] Change conditions in which key path component mismatch fix are diagnosed
2021-03-22 10:42:08 -07:00
Luciano Almeida
0bca6ce73c
[Sema] Do not skip key path last component/value equal constraint failure fix
2021-03-21 18:29:47 -03:00
Doug Gregor
52096a640e
SE-0302: Rename ConcurrentValue/@concurrent to Sendable/@Sendable.
2021-03-18 23:48:21 -07:00
Pavel Yaskevich
1dd914a651
Merge pull request #36445 from xedin/rdar-75367157
...
[Diagnostics] Check whether missing conformance could be fixed by using `.rawValue`
2021-03-17 15:24:33 -07:00
Doug Gregor
d6fc1fd60f
Implement conversions for global-actor-qualified functions.
...
One can convert from a function value without a global actor to a
similar function type that does have a global actor, but one cannot
remove or change a global actor on a function type.
2021-03-17 00:51:26 -07:00
Pavel Yaskevich
45c73b30fd
[Diagnostics] Even though missing conformance could be fixed by .rawValue still diagnose it as conformance issue
...
Conformance requirement failure is a more descriptive error,
augment it with a note about missing `.rawValue`.
2021-03-17 00:14:51 -07:00
Pavel Yaskevich
fb89d11931
[ConstraintLocator] NFC: Adjust name of isForKeyPathComponent to clarify its meaning
...
New name is `isInKeyPathComponent` since it's implemeneted as a
check for presence of `KeyPathComponent` element in the locator
that covers every sub-element contained in a key path component
as well.
2021-03-12 09:58:54 -08:00
Holly Borla
133dec0e05
[ConstraintSystem] Implement implicit property wrapper attribute
...
inference for closure parameters.
2021-02-25 18:35:14 -08:00
Holly Borla
ea3fe03c98
[Property Wrappers] Add a constraint fix and diagnostic for the case
...
where the programmer tries to pass a projection argument to a wrapped
parameter without 'var projectedValue'.
2021-02-25 18:35:14 -08:00
Pavel Yaskevich
03d869ad8b
[Diagnostics] Extract invalid result type from overload choice
...
Instead of threading it through the constraint system all the way
to a diagnostic, let's extract it from overload choice instead.
2021-02-23 11:33:10 -08:00