martinboehme
f4e74f7907
When qualifying Clang types with a module, make sure we choose a visible module ( #32465 )
...
Clang types need special treatment because multiple Clang modules can contain the same type declarations from a textually included header, but not all of these modules may be visible.
This fixes
https://bugs.swift.org/browse/SR-13032
The newly added test breaks without this fix.
2020-12-11 08:15:05 +01:00
John McCall
ee0bb0a2d5
Freeze PartialAsyncTask as a Job*.
...
Also fix the extra inhabitants of Builtin.RawUnsafeContinuation
and try to make adding types like this a little less boiler-plate
in the future.
2020-12-04 01:06:29 -05:00
Slava Pestov
1a89813bf5
AST: Introduce Builtin.RawUnsafeContinuation type
...
This is otherwise identical to Builtin.RawPointer, but has the spare
bits of a heap object pointer.
2020-12-01 20:03:22 -05:00
Ben Barham
b07c06e839
[Serialization] Fix crashes when allowing compiler errors in modules
2020-11-18 12:35:21 +10:00
Alejandro Alonso
424802fb34
Revert SE-0283 ( #34492 )
...
Reverted despite build failures.
2020-10-29 17:32:06 -07:00
Anthony Latsis
4ce7a2d060
CodeCompletion: Annotate archetypes, generic parameters and dependent members
2020-10-27 14:39:52 +03:00
Azoy
f21a306ae5
[AST] Introduce BuiltinProtocolConformance
2020-10-22 18:24:27 -04:00
swift-ci
cb900a6b69
Merge pull request #34057 from varungandhi-apple/vg-track-isDerivable-update-mangling
2020-10-21 18:18:43 -07:00
Varun Gandhi
6cb71c6b45
[ASTPrinter] Print Clang type only if not derivable from Swift type.
2020-10-21 15:57:57 -07:00
Nathan Hawes
be231208f3
[CodeCompletion][CSGen] Treat ErrorExprs as holes when generating constraints for code completion
...
This lets us still provide member completions when the base expression contains parse errors or unresolved decls
e.g. returnsAString(undefined).<complete here>
2020-10-08 19:02:39 -07:00
Pavel Yaskevich
c946c803db
Merge pull request #34036 from xedin/replace-error-types-with-holes
...
[CSGen] Avoid failing on invalid declarations
2020-09-23 11:58:32 -07:00
Pavel Yaskevich
bdfa8d9099
[AST] Allow hole types to originate from declarations
...
Associating holes directly with declarations is useful in
cases when declarations are invalid e.g. directly `ErrorType`
or have error types inside.
2020-09-22 15:47:57 -07:00
Varun Gandhi
7b967a8030
Merge pull request #33085 from varungandhi-apple/vg-clang-types-in-sil-retry
...
Propagate Clang function types through SIL
2020-09-22 08:48:34 -07:00
Varun Gandhi
983399c1e7
[Printer] Conditionally print Clang types in emitted SIL.
2020-09-16 10:34:43 -07:00
Brent Royal-Gordon
cff4ddf13a
[NFC] Adopt new ImportPath types and terminology
...
# Conflicts:
# lib/IDE/CodeCompletion.cpp
2020-09-10 19:07:49 -07:00
swift-ci
9f2f1d8b83
Merge pull request #33748 from brentdax/template-toolkit
2020-09-03 14:03:11 -07:00
Brent Royal-Gordon
dd726a0015
[NFC] Avoid repeatedly instantiating std::function
2020-09-01 12:54:55 -07:00
Nathan Hawes
9da1d89520
Manually merge remote-tracking branch 'upstream/master' into HEAD
...
Conflicts:
lib/AST/ExtInfo.cpp
2020-08-31 10:50:54 -07:00
Varun Gandhi
8df83150fb
Merge pull request #33541 from varungandhi-apple/vg-clang-types-in-sil-setup
...
Setup code for Clang types in SIL.
2020-08-28 14:34:27 -07:00
swift_jenkins
fb946baf59
Merge remote-tracking branch 'origin/master' into master-rebranch
2020-08-28 11:08:22 -07:00
Pavel Yaskevich
a6c3e6f543
Merge pull request #33658 from xedin/introduce-hole-type
...
[ConstraintSystem] Introduce a new type to represent a type hole
2020-08-28 10:40:15 -07:00
Varun Gandhi
8da4d53d2c
[NFC] Use ClangTypeInfo's implicit null state instead of an extra Optional.
2020-08-27 13:14:05 -07:00
Pavel Yaskevich
78ea3de8e4
[AST] Introduce a new type to represent a type hole in constraint system
...
Instead of using `UnresolvedType` as a placeholder for a type hole,
let's switch over to a dedicated "rich" `HoleType` which is capable
of storing "originator" type - type variable or dependent member
type which couldn't be resolved.
This makes it easier for the solver to determine origins of
a hole which helps to diagnose certain problems better. It also
helps code completion to locate "expected type" of the context
even when it couldn't be completely resolved.
2020-08-26 16:55:39 -07:00
swift_jenkins
80f2475366
Merge remote-tracking branch 'origin/master' into master-rebranch
2020-08-25 20:46:48 -07:00
swift-ci
148ba9d66d
Merge pull request #33636 from nate-chandler/move-flag-to-SILExtInfo
2020-08-25 20:31:10 -07:00
Nate Chandler
f74a3b47fc
[SIL] Added async flag to SILExtInfo.
2020-08-25 17:33:27 -07:00
Nate Chandler
94b5f76654
Revert "[SIL] Add SILFunctionType flag for async."
...
This reverts commit 9b8828848d .
2020-08-25 13:37:26 -07:00
swift_jenkins
3134f7e170
Merge remote-tracking branch 'origin/master' into master-rebranch
2020-08-24 20:25:48 -07:00
Slava Pestov
b0208a134f
AST: Move getSugaredType() from GenericEnvironment to GenericSignature
...
None of this actually involves archetypes, so it can just be an
operation on the GenericSignature itself.
2020-08-24 19:16:36 -04:00
swift_jenkins
fe3ae26d36
Merge remote-tracking branch 'origin/master' into master-rebranch
2020-08-24 11:46:13 -07:00
Alexis Laferrière
bfe74f53cd
[ModuleInterface] Only skip extensions without public members
...
Additionnal restrictions to still print some extensions to
implementation-only imported types if marked SPI.
2020-08-21 15:18:26 -07:00
Alexis Laferrière
fd78da5137
[ModuleInterface] Don't print extensions to implementation-only imported types
...
Extensions to implementation-only types are accepted at type-checking
only if they don't define any public members. However if they declared a
conformance to a public type they were also printed in the
swiftinterface, making it unparsable because of an unknown type.
Still accept such extensions but don't print them.
rdar://problem/67516588
2020-08-20 17:12:31 -07:00
swift_jenkins
8cfd9be2cb
Merge remote-tracking branch 'origin/master' into master-rebranch
2020-08-19 15:06:17 -07:00
Nate Chandler
9b8828848d
[SIL] Add SILFunctionType flag for async.
2020-08-19 11:29:58 -07:00
swift_jenkins
b1cc1ae5ae
Merge remote-tracking branch 'origin/master' into master-rebranch
2020-08-18 18:26:20 -07:00
Anthony Latsis
492156c10f
Remove SubscriptDecl::getBodyResultTypeLoc
2020-08-19 00:09:10 +03:00
Anthony Latsis
21faa48298
Remove FuncDecl::getBodyResultTypeLoc
2020-08-19 00:09:10 +03:00
swift_jenkins
2fae6fb4b6
Merge remote-tracking branch 'origin/master' into master-rebranch
2020-08-15 09:26:14 -07:00
Slava Pestov
0c0a96339f
SIL: Print ErrorTypes with @error_type prefix to avoid confusion
...
In diagnostics, we print wrapped ErrorTypes as their original type.
This is confusing when debugging SIL issues though, where we don't
expect to see ErrorTypes. Print them as '@error_type <origtype>'
instead.
2020-08-15 03:09:12 -04:00
swift_jenkins
4ddfc1abd7
Merge remote-tracking branch 'origin/master' into master-rebranch
2020-08-14 20:26:14 -07:00
Slava Pestov
92bc89b78f
GSB: Add an inferred AnyObject constraint to @objc protocol requirement signatures
...
This simplifies GenericSignatureImpl::requiresClass(), which no longer
has to look through the conformances of the equivalence class.
2020-08-13 00:23:47 -04:00
swift-ci
ae09b1eb08
Merge remote-tracking branch 'origin/master' into master-rebranch
2020-08-04 18:03:56 -07:00
Anthony Latsis
78f0259bfb
Merge pull request #33283 from AnthonyLatsis/type-locura-2
...
ASTWalker: Offload TypeLoc
2020-08-05 00:17:33 +03:00
Nathan Hawes
607e2b8822
Manually merge remote-tracking branch 'upstream/master' into HEAD
2020-08-04 13:47:48 -07:00
Anthony Latsis
17f12da381
[NFC] AST: Remove TypedPattern:getTypeLoc()
2020-08-04 18:46:21 +03:00
Varun Gandhi
3882beb85d
[NFC] Use consistent naming scheme for predicate methods. ( #33265 )
...
bool throws() -> isThrowing(), bool async() -> isAsync()
2020-08-03 16:37:29 -07:00
swift-ci
a0a181159c
Merge remote-tracking branch 'origin/master' into master-rebranch
2020-07-31 16:07:19 -07:00
Slava Pestov
cd79b5428e
AST: Remove ProtocolDecl's overload of getDeclaredType()
2020-07-31 13:52:42 -04:00
Slava Pestov
94c6bff65d
AST: Replace some calls to getDeclaredType() with getDeclaredInterfaceType()
2020-07-31 13:39:01 -04:00
swift-ci
0d8e3e1d71
Merge remote-tracking branch 'origin/master' into master-rebranch
2020-07-29 09:14:39 -07:00