Slava Pestov
5c412b4b55
Sema: Don't allow opaque return types to reference DynamicSelfType
...
This cannot be represented in the ABI because we expect that the
opaque return type can be instantiated from the generic arguments
of its declaring context. Reconstructing type metadata for the
DynamicSelfType would require opaque return type instantiation
to also take the self *value*.
Fixes rdar://72407668 / https://github.com/apple/swift/issues/56367
2022-07-14 11:07:52 -04:00
Holly Borla
429488f6c9
[Sema] Use ExistentialType for Any and AnyObject.
2022-06-17 18:29:15 -07: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
9fa39e94cf
[MiscDiagnostics] Unhandled throw check should use recorded conformance
...
Use a conformance reference recorded in a `ForEachStmt` by
the type-checker, instead of trying to look it up again.
2022-05-30 23:17:41 -07:00
Allan Shortlidge
60146b32b4
Sema: Accept existentials without any in swiftinterfaces.
...
Resolves rdar://93052306
2022-05-10 17:43:05 -07:00
Hamish Knight
c5a53ef73e
[Sema] Don't warn on trailing closures in closure conditions
...
Add ClosureExpr to the list of expressions we don't
walk into for the purposes of diagnosing trailing
closures in conditional initializers.
rdar://92521618
2022-04-29 14:47:19 +01:00
Moritz Dietsche
5d55ffea51
[lib/Sema] Suggest return when the last statement would be a valid … ( #42415 )
...
* [lib/Sema] Suggest `return` when the last statement would be a valid return value
Addresses SR-10988. When a multi-statement function body contains no return keyword but the last statement would be a valid return value, the compiler currently proposes a fixit to add the return keyword.
This changes extends this behavior to functions with opaque return types.
2022-04-23 10:56:12 -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
1c426a30d1
Merge pull request #42484 from xedin/drop-se-0326-flag
...
[TypeChecker] NFC: Remove `-experimental-multi-statement-closures` flag
2022-04-20 14:39:35 -07:00
Pavel Yaskevich
6db0001863
[TypeChecker] NFC: Remove -experimental-multi-statement-closures flag
...
SE-0326 has been enabled by default, so this flag is no longer necessary.
2022-04-20 10:40:27 -07:00
Pavel Yaskevich
de4cfdf95b
[TypeChecker] Disallow if #unavailable to produce different opaque result
...
Only `if #available` conditions should be allowed to produce a different
underlying type for opaque result to support backward deployment.
2022-04-19 15:27:18 -07: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
3b523d568e
[TypeChecker] Allow opaque to have multiple underlying types based on availability
...
Allow opaque type declarations to have multiple unique underlying
types if all such types are conditional on availability via
`if #available(...)` and there is only one universally available
substitution. Neither nesting of availability conditions nor other
dynamic conditions are allowed.
For example:
```swift
protocol P {}
@available(iOS 31.337, *)
struct X : P {
}
struct Y : P {
}
func test() -> some P {
if #available(iOS 31.337, *) {
// ... some computation ...
return X()
}
return Y()
}
```
Allows `some P` to refer to `X` instead of `Y` on `iOS 31.337`.
2022-03-29 12:44:28 -07:00
Pavel Yaskevich
a5a50a3658
[AST] NFC: Rename underlying type accessors of OpaqueTypeDecl
...
Adds a `Unique` component to the accessor names to draw the
distinction between unique and conditionally available substitutions.
2022-03-28 16:22:08 -07:00
Pavel Yaskevich
6462b0d175
[MiscDiagnostics] Fix a crash in OpaqueUnderlyingTypeChecker
...
Since opaque result type can reference generic parameters of context,
it cannot reply purely on "index" of the opaque generic parameter
while diagnosing a problem, it needs to perform a type substitution
using a substitution map of a particular candidate to determine the
underlying type.
Resolves: rdar://90456579
2022-03-25 16:50:53 -07:00
Pavel Yaskevich
e52c3a0548
[MiscDiagnostics] Produce warnings about confusable self iff its explicit
...
Restrict the warning to diagnose only explicit instances of `self` reference
that do not mention the parent type via dot syntax e.g. `MyStruct.self`.
Resolves: SR-15897
Resolves: SR-15691
Resolves: rdar://90624344
2022-03-22 19:07:30 -07:00
Keith Smiley
f6b2e2e40c
Fix invalid warning for enum cases named self ( #41520 )
...
https://github.com/apple/swift/pull/37992/ introduced a warning when you
were likely to confuse `self` with `TypeName.self`, this also applied to
enum cases that were named `self`, these cases should not be easily
confused at call sites since their use requires prefixing them with a
`.`. There was also no way to avoid this warning since other syntax such
as `TypeName.self`, which produces the enum type instead, or
`` TypeName.`self` `` which produced the same warning again.
Fixes https://bugs.swift.org/browse/SR-15691
2022-02-23 09:46:07 -08:00
Doug Gregor
791c9c7d13
Implement most of the semantic analysis for named opaque result types.
...
Address small gaps in several places to make named opaque result types
partially work:
* Augment name lookup to look into the generic parameters when inside the
result type, which is used both to create structure and add requirements
via a `where` clause.
* Resolve opaque generic type parameter references to
OpaqueTypeArchetypeType instances, as we do for the "some" types
* Customize some opaque-type-specific diagnostics and type printing to
refer to the opaque generic parameter names specifically
* Fix some minor issues with the constraint system not finding
already-opened opaque generic type parameters and with the handling of
the opaque result type candidate set.
The major limitation on opaque types, where we cannot add requirements
that aren't strictly protocol or superclass requirements on the
generic parameters, remains. Until then, named opaque result types are
no more expressive than structural opaque result types.
2022-01-04 21:14:04 -08:00
Doug Gregor
f1ca2d7804
Enable SE-0328 "Structural opaque result types" by default.
...
Remove the error that prevented the use of multiple opaque result types,
which was the remaining blocker for SE-0328's structural opaque result
types. Add some type checking tests for this feature, and customize
the diagnostics so they describe *which* opaque result type failed to
match when indeed there is a failure.
2021-12-27 19:02:42 -08:00
Cal Stephens
367b1120ab
Fix last test failure
2021-12-26 20:48:35 -08:00
Doug Gregor
b97ef02d85
Opaque opaque types and compute substitutions in the constraint system
...
Opaque opaque types and record them within the "opened types" of the
constraint system, then use that information to compute the set of
substitutions needed for the opaque type declaration using the normal
mechanism of the constraint solver. Record these substitutions within
the underlying-to-opaque conversion.
Use the recorded substitutions in the underlying-to-opaque conversion
to set the underlying substitutions for the opaque type declaration
itself, rather than reconstructing the substitutions in an ad hoc manner
that does not account for structural opaque result types.
2021-12-26 20:33:58 -08:00
Cal Stephens
0f336368ea
Update comments
2021-12-26 14:32:34 -08:00
Cal Stephens
c03950b52e
Use LabeledConditionalStmt instead of just IfStmt / GuardStmt
2021-12-26 14:09:57 -08:00
Cal Stephens
6fe7dc517e
Always emit an error for invalid inner closures trying to use implicit self from an outer closure
2021-12-25 17:14:35 -08:00
Cal Stephens
6c682b719e
Fix another test failure, from a defer FuncDecl
2021-12-25 13:57:27 -08:00
Cal Stephens
e21b4d7322
Reject normal ValueDecls but allow ConstructorDecl from '@autoclosure @escaping () -> String = String()'
2021-12-25 10:21:29 -08:00
Cal Stephens
a5b3312da5
Fix more cases, write more test
2021-12-24 20:51:57 -08:00
Cal Stephens
854f024ec1
Fix issue where '@autoclosure () -> String = String()' would be rejected as an invalid implicit self
2021-12-24 16:44:35 -08:00
Cal Stephens
72074b30be
Fix some test failures
2021-12-24 16:34:24 -08:00
Cal Stephens
5f8e567b79
Fix crash
2021-12-24 08:17:17 -08:00
Cal Stephens
30f07e13dc
Fix edge cases
2021-12-23 18:23:59 -08:00
Cal Stephens
2292e38a38
Fix issue where implicit self wasn't rejected before self is unwrapped
2021-12-23 11:01:53 -08:00
Cal Stephens
4eee6f89b9
Unconditionally permit implicit self in weak closures
2021-12-23 11:01:53 -08:00
Holly Borla
8d52f71561
[NFC][Sema] Rename checkUnsupportedProtocolType to checkExistentialTypes.
2021-12-09 23:15:02 -08:00
Holly Borla
7c7b3ba0da
Revert "[NFC, Typechecker] Remove UnsupportedProtocolVisitor and checkUnsupportedProtocolType()"
...
This reverts commit 15f88e9be3 .
2021-12-09 23:15:02 -08:00
Pavel Yaskevich
4cd404d020
[MiscDiagnostics] Introduce a base class for diagnostic walkers
...
Put some common logic related to local declaration to the base
class and refactor other walkers to use it instead of `ASTWalker`.
2021-12-03 10:57:33 -08:00
Pavel Yaskevich
9bd603bfc9
[Diagnostics] Apply "unhandled throw" diagnostic for for-in loop in closures
...
Extract diagnostic into a method and use it while type-checking
`for-in` in top-level code and in closures.
2021-12-03 10:56:32 -08:00
Saleem Abdulrasool
349af3707d
Merge pull request #40305 from compnerd/semitruck
...
gardening: make c++98-compat-extra-semi an error
2021-11-30 08:18:36 -08:00
Pavel Yaskevich
bc54bc6bb7
Revert "[TypeChecker] SE-0326: Enable multi-statement closure inference by default"
2021-11-29 17:26:08 -08:00
Saleem Abdulrasool
910fbee14e
gardening: make c++98-compat-extra-semi an error
...
This cleans up 90 instances of this warning and reduces the build spew
when building on Linux. This helps identify actual issues when
building which can get lost in the stream of warning messages. It also
helps restore the ability to build the compiler with gcc.
2021-11-27 11:40:17 -08:00
Hamish Knight
ede9302704
[Sema] Fix spurious trailing closure warning
...
With the argument list refactoring, it's no
longer sufficient to stop walking when we encounter
an explicit tuple or paren. Add an additional
check to stop walking when we encounter an explicit
argument list.
rdar://85343171
2021-11-19 19:26:04 +00:00
Pavel Yaskevich
8b901544ee
[MiscDiagnostics] Introduce a base class for diagnostic walkers
...
Put some common logic related to local declaration to the base
class and refactor other walkers to use it instead of `ASTWalker`.
2021-11-15 16:42:05 -08:00
Pavel Yaskevich
7b0f68c05f
[Diagnostics] Apply "unhandled throw" diagnostic for for-in loop in closures
...
Extract diagnostic into a method and use it while type-checking
`for-in` in top-level code and in closures.
2021-11-15 16:42:05 -08:00
Robert Widmann
ded4dd2103
Suggest Replacement Types for Invalid Placeholders
...
Now that placeholder types are preserved, we can open them wherever they appear in positions where they are used as contextual types. Use the checks we already run in the primaries to ban placeholders in top-level positions. Only now, use the inferred type of any associated expressions or statements to present the user with a contextual return type.
For parameters in functions and enum cases, we use any default argument expressions to get the contextual type.
For functions, we use a traversal similar to the opaque result type finder to find the type of any return statements in the program and present those as options.
2021-11-03 10:29:15 -07:00
Alexis Laferrière
1a3f28500b
[Sema] Don't check availability in assigned properties initializers
...
For a non-public property where the type is defined by an assignment, like
`internal var internalAssigned = NewStruct()`, type-checking the type's
availability is done via checking the initializer expression.
In -check-api-availaiblity-only mode, pass down a flag to not check
availability in expressions for initializer expressions of such
non-public properties.
rdar://84389825
2021-10-25 13:46:53 -07:00
Hamish Knight
dc60996f89
Merge pull request #38836 from hamishknight/toil-and-tuple
2021-09-04 19:30:04 +01:00
Jack March
7e0a7f322a
fix SR-4559 (unapplied reference to method named "self" can be used without qualification)
...
https://bugs.swift.org/browse/SR-4559
2021-09-02 21:17:42 +01:00
John McCall
a00ed9f2dd
Merge pull request #39118 from rjmccall/implicit-self-capture-capture-warning
...
Fix the condition for warning about implicit capture of self captures.
2021-09-02 01:09:21 -04:00
Konrad `ktoso` Malawski
b73050e49e
Merge pull request #39095 from AnthonyLatsis/se-309
...
SE-0309: Unlock existential types for all protocols
2021-09-02 11:27:39 +09:00
Hamish Knight
3e28bbbd2c
Update for review feedback
...
- Remove OriginalArguments in favor of storing the
pre-rewritten argument list, which simplifies things
nicely
- Adopt llvm::indexed_accessor_iterator
2021-09-01 18:40:29 +01:00