Pavel Yaskevich
7cc6892ab7
[CSApply] Adjust locator while coercion source of assignment to destination type
...
Constraint generator records conversion between source and destination
types as anchored on an assignment, which means that coercion has to do
the same in case restrictions (like Double<->CGFloat conversion) depend
on locators to retrieve information for the solution.
2022-07-07 09:17:02 -07:00
Pavel Yaskevich
074035b24f
[CSApply] Use fully qualified locator while coercing dictionary elements
...
Just like in case of array elements, the locator needs to much what
was produced by constraint generator otherwise Double<->CGFloat implicit
coercion wouldn't be able to find the overload choice.
2022-07-07 09:16:56 -07:00
Pavel Yaskevich
1d1f065f8e
[CSApply] Use fully qualified locator while coercing array elements
...
Double/CGFloat implicit conversion expects a full locator
(array-expr + tuple-element <idx>) to find selected overload.
2022-07-07 09:14:42 -07:00
Doug Gregor
afd65fa728
Merge pull request #59849 from DougGregor/preconcurrency-sendable-params
2022-07-01 21:44:22 -07:00
Anthony Latsis
f1207ff04f
Merge pull request #59171 from AnthonyLatsis/init-delegation-optional
...
CSGen, SILGen: Fix delegations to `Optional` initializers
2022-07-02 02:28:18 +03:00
Doug Gregor
43399bad78
Make sure we propagate @preconcurrency to closures consistently.
...
The type checker is now permitting `@Sendable` closures whose captures
can be by-reference, because we do not error. Remove an aspirational
SIL verifier check that banned this.
2022-07-01 15:29:49 -07:00
Holly Borla
6cff3aadc7
[CSApply] Don't attempt covariant result type erasure for parameters
...
of method references.
2022-07-01 14:21:59 -07:00
Doug Gregor
0674058ba0
Introduce more AST function conversions for @preconcurrency-adjusted types.
...
When referring to a `@preconcurrency` function as a value, use the normal
type for the initial declaration reference and then introduce an
appropriate function conversion expression to the adjusted type.
Fixes more issues related to rdar://94597323.
2022-06-30 17:00:56 -07:00
Doug Gregor
01c2e42354
Introduce a function conversion for "adjusted" dynamic member references.
...
When we have adjusted the type of a dynamic member reference (e.g.,
for `@objc optional` methods) due to `@preconcurrency` or similar,
form the original dynamic member reference based on the original type
and then introduce an appropriate conversion. This better reflects the
adjustment in the AST, eliminating a SIL verifier crash.
Fixes rdar://94597323.
2022-06-30 17:00:32 -07:00
Doug Gregor
248b72bbff
Track the pre-adjusted "reference" type for declaration reference.
2022-06-30 17:00:32 -07:00
Doug Gregor
1063e8126e
[Constraint system] Track the original opened type for a selected overload.
2022-06-30 17:00:31 -07:00
Pavel Yaskevich
3fd3ff0637
[TypeChecker] Adjust Double<->CGFloat conversion to always preserve its location
...
Unfortunately current approach of making a conversion independent of location
doesn't work when conversion is required for multiple arguments to the
same call because solver expects that either there are no Double<->CGFloat
conversions, or one of them has already been applied which is not the case.
The reason why locations weren't preserved in the first place is due to
how a solution is applied to AST - AST is mutated first and then, if there
are any conversions, they are applied to the already mutated version of
original AST. This creates a problem for Double<->CGFloat which depends
on an overload choice of injected call and it's impossible to find it based
on the mutated AST. But it turns out that this is only an issue in two
specific cases - conversions against contextual type and after optional injection.
This situations could be mitigated by dropping parts of the locator which are
unimportant for the Double<->CGFloat conversion - anchor in case of contextual
and `OptionalPayload` element(s) in case of optional injection.
Resolves: https://github.com/apple/swift/issues/59374
2022-06-28 13:47:47 -07:00
Anthony Latsis
a5329bd3bd
CSApply: Make buildOtherConstructorRef work for Optional initializers
...
Using `replaceCovariantResultType`, which looks through optionals, to
substitute the container type for the result type would add an extra
level of optionality to the result type whenever the container type was
`Optional`, causing a crash later in the game. Besides, we don't have to
do this in the first place, because we know these types match in the case
of an initializer (neglecting optionality).
2022-06-25 19:17:35 +03:00
Doug Gregor
5c05da0a1d
Merge pull request #59699 from ktoso/revert-dist-properties
...
[Distributed] Revert "#59481 distributed-computed-properties"
2022-06-24 21:29:41 -07:00
Holly Borla
0053526c5d
Merge pull request #41909 from hborla/existential-any-anyobject
...
[Sema] Use `ExistentialType` for `Any` and `AnyObject`.
2022-06-24 20:51:50 -07:00
Konrad `ktoso` Malawski
6a2778645f
Revert "Merge pull request #59481 from xedin/distributed-computed-properties"
...
This reverts commit 8125a85a8f , reversing
changes made to 728971c5b7 .
2022-06-25 08:49:00 +09:00
Pavel Yaskevich
dc314eb3ae
[CSApply] Generalize fully type-checked target printing
...
Changes `Fully type-checked` output to print any target that
could be represented as an ASTNode.
2022-06-20 11:32:25 -07:00
Konrad `ktoso` Malawski
8125a85a8f
Merge pull request #59481 from xedin/distributed-computed-properties
...
[TypeChecker] Implement distributed computed properties
2022-06-18 15:58:44 +09:00
Pavel Yaskevich
a391043e84
Merge pull request #59260 from amritpan/multi-statement-closure-output
...
[CSApply] Fixed type-checked subexpression output bug for multi-state…
2022-06-17 23:24:44 -07:00
Holly Borla
429488f6c9
[Sema] Use ExistentialType for Any and AnyObject.
2022-06-17 18:29:15 -07:00
Amritpan Kaur
d7266d6733
[CSApply] Denote type-checked expressions as partially, fully, or type-checked to show their application solution status, as applicable for tap expressions and multi-statement closures.
2022-06-17 18:01:29 -07:00
Pavel Yaskevich
fa2e64c1fd
[Distributed] Sema: Add a new distributed-thunk attribute
...
The attribute comes handy during solution application to
determine whether the call is using a distributed thunk.
2022-06-17 12:35:54 -07:00
Pavel Yaskevich
1032da2d6e
[CSApply] Fix distributed thunk requirement check to handle non-parameter/capture base
...
If distributed memeber is referenced on a base that represents
a result of some expression which is not a variable, parameter,
or a capture it should always be dispatched via a thunk.
2022-06-17 12:35:54 -07:00
Pavel Yaskevich
4fa74c238f
[AST] ApplyExpr: Rename shouldApplyDistributedThunk to usesDistributedThunk
...
Since the thunk is applied to expression during solution application,
the use of this flag has shifted towards stating the fact.
2022-06-17 12:35:54 -07:00
Pavel Yaskevich
cae01486c6
[CSApply] Distributed: Inject distributed thunk when necessary
...
Replace distributed member references with distributed thunks
when access happens outside of distributed actor context. This
significantly simplifies distributed compute properties implementation.
2022-06-17 12:35:48 -07:00
Amritpan Kaur
3a38d7a899
[CSApply] Fixed type-checked subexpression output bug for multi-statement closures.
2022-06-16 17:10:14 -07:00
Pavel Yaskevich
066bbd18eb
[CSClosure] Fix handling of property wrapped pattern bindings
...
Property wrappers trigger initializer synthesis. Synthesized
initializers should not be re-typechecked when encountered e.g.
while re-solving closure with a different contextual type.
Resolves: https://github.com/apple/swift/issues/59294
Resolves: rdar://94506352
2022-06-07 13:41:53 -07:00
Pavel Yaskevich
644a720ce6
Merge pull request #59003 from xedin/rdar-92177656
...
[TypeChecker] Rework type-checking of `for-in` statements
2022-06-02 14:58:56 -07:00
Anthony Latsis
d113ca6bd2
CSApply: Fix several issues with non-failable to failable/throwing initializer delegation/chaining diagnostics
...
* Delegated-to `Optional` ctors were always handled as if they were failable, resulting in false-positive delegation errors.
* Delegations via `try?` were not diagnosed if the called ctor had IUO failability on top of being `throws`. SILGen would then handle the `try?` as if it was a `try!`.
* Delegations via `try?` were diagnosed with the wrong message if the `try?` was nested inside a `try!`, e.g. `try! try self.init(nonFailable:)`
* If there are issues with both `try?` and failability of the called initializer, diagnose both.
2022-06-01 00:11:45 +03:00
Pavel Yaskevich
b7860ea055
[TypeChecker] Split for-in sequence into parsed and type-checked versions
2022-05-30 23:17:41 -07:00
Pavel Yaskevich
5f0dcb572b
[ConstraintSystem] Implicitly open existential type of for-in sequence
...
This allows to use `for-in` statement to iterate over i.e. `any Collection`
and other existentials that conform to `Sequence` protocol.
2022-05-30 23:17:41 -07:00
Pavel Yaskevich
86165291aa
[TypeChecker] Change the way for-in statement in type-checked
...
Instead of asking SILGen to build calls to `makeIterator` and
`$generator.next()`, let's synthesize and type-check them
together with the rest of for-in preamble. This greatly simplifies
interaction between Sema and SILGen for for-in statements.
2022-05-30 23:17:41 -07:00
Pavel Yaskevich
22daa865b5
[ConstraintSystem] Make for-in solution application target standalone
...
Previously for-in target was actually an expression target, which means
certain type-checking behavior. These changes make it a standalone target
with custom behavior which would allow solver to introduce implicit
`makeIterator` and `next` calls and move some logic from SILGen.
2022-05-30 23:17:41 -07:00
Doug Gregor
6d82448dc8
Add -enable-experimental-feature X for experimental features.
...
Experimental features can only be enabled in non-production (+Asserts)
builds. They can be detected with `hasFeature` in the same manner as
"future" features.
The `-enable-experimental-feature X` flag will also look for future
features by that name, so that when an experimental feature becomes an
accepted future feature, it will still be enabled in the same manner.
Switch variadic generics over to this approach, eliminating the
specific LangOption for it.
2022-05-26 11:50:39 -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
1359840ab3
Merge pull request #58400 from xedin/too-complex-improvements
...
[ConstraintSystem] Improve precision of "too complex" diagnostic
2022-04-27 19:58:31 -07:00
Pavel Yaskevich
a40e8e80c1
[ConstraintSystem] Use affected range (if any) to diagnose 'too complex' failures
2022-04-25 14:09:45 -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
Pavel Yaskevich
384d508200
Merge pull request #42483 from xedin/rdar-90366182
...
[CSApply] Rewrite types of a constructed tuple
2022-04-21 10:00:40 -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
Pavel Yaskevich
879bd6578d
[CSApply] Rewrite types of a constructed tuple
...
When construction call is rewritten into a tuple conversion,
rewriter has to make sure that AST types are reset otherwise
it would end up with types set by `packIntoImplicitTupleOrParen`
which could contain l-values.
Resolves: rdar://90366182
2022-04-20 10:35:06 -07:00
Luciano Almeida
a97879d46d
Merge pull request #42254 from LucianoPAlmeida/refactor-diag-checked-cast
...
[Sema] Improvements on typeCheckCheckedCast and checked cast diagnostics
2022-04-15 16:39:36 -03:00
Pavel Yaskevich
018cd080c7
Merge pull request #42329 from xedin/builder-var
...
[BuilderTransform] Replace use of `TypeExpr` with a special $builderSelf variable
2022-04-15 09:36:05 -07:00
Pavel Yaskevich
fb4720d355
[BuilderTransform] Replace use of TypeExpr with a special $builderSelf variable
...
For all of the `build*` calls, let's use a special variable declaration
`$builderSelf` which refers to a type of the builder used. This allows
us to remove hacks related to use of `TypeExpr`. Reference to `$builderSelf`
is replaced with `TypeExpr` during solution application when the builder
type is completely resolved.
2022-04-14 21:16:48 -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
Anthony Latsis
2d43be60f6
Merge pull request #41978 from AnthonyLatsis/dyn-unbound-ref
...
CSApply: Handle unbound references to methods found via dynamic lookup
2022-04-13 04:58:41 +03: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
Anthony Latsis
c9c5fe2345
CSApply: Handle unbound references to methods found via dynamic lookup
2022-04-12 05:12:28 +03:00
Anthony Latsis
3593f1b987
[NFC] CSApply: 'isPartialApplication' → 'needsCurryThunk' which is more accurate
2022-04-12 05:12:23 +03:00
Anthony Latsis
4c4e2b4f84
CSApply: Fix unbound ref to class method on protocol composition metatype
2022-04-12 05:10:58 +03:00