Commit Graph

13 Commits

Author SHA1 Message Date
Pavel Yaskevich
6b323f1663 [BuilderTransform] Verify that builder type has at least one accessible build{Partial}Block
Check accessibility of all build{Partial}Block overloads and
diagnose if none of them are as accessible as type, otherwise
swift interfaces could end up with invalid result builder
declarations when type is public and all builder methods are
internal.

Resolves: rdar://104384604
2023-03-08 12:46:50 -08:00
Rintaro Ishizaki
b6119018d7 [SourceKit] Print custom attributes in interface-gen requests
Custom attributes were not printed because they are marked
'UserInaccesible'.

* Make CustomAttr 'RejectByParser' instead of 'UserInaccessible'
* Remove special treatment for Result Builder attributes
* Load implicit modules in module/header interface gen requests

rdar://79927502
2022-03-02 11:05:26 -08:00
Doug Gregor
6a40a3a8aa [SE-0289] Add support for @resultBuilder.
"Function builders" are being renamed to "result builders". Add the
corresponding `@resultBuilder` attribute, with `@_functionBuilder` as
an alias for it, Update test cases to use @resultBuilder.
2020-10-20 13:24:51 -07:00
Frederick Kellison-Linn
b82c57a800 [Sema] Require function builders to have at least one buildBlock method
If the supplied method is not static, offer a fix-it to make it static
2020-09-05 01:46:42 -04:00
Slava Pestov
76ebf23579 Add regression test for rdar://57549596 / https://bugs.swift.org/browse/SR-11874 2019-12-03 20:51:52 -05:00
Xi Ge
0e438f6ebd IDE: always print custom attributes associated with function builder
rdar://51592635
2019-07-09 10:33:30 -07:00
Jordan Rose
42522ca4ae [ParseableInterface] Module-qualify protocol types too
Otherwise we can get in trouble when a local type is named, say,
'Sequence'.

Also contains test updates and a fix for Harlan's previous commit,
which actually affects all typealiases, not just those in the Builtin
module.
2019-03-29 08:52:22 -07:00
Slava Pestov
3feaf8731a Serialization: Fix deserialization of generic typealiases
The recovery logic was erronously kicking in, because it was comparing
the substituted underlying type with the declaration's underlying type.

For a generic typealias, these never equal, so instead, serialize the
unsubstituted type, and substitute it in deserialization.
2018-09-11 23:56:16 -07:00
Dmitri Gribenko
486cab447d tests: replace 'rm -rf %t && mkdir -p %t' with '%empty-directory(%t)'
These changes were made using a script.
2017-06-04 11:08:39 -07:00
Dmitri Gribenko
55864d10cb Tests: use 'mkdir -p' 2016-09-02 21:36:45 -07:00
Dmitri Gribenko
d175b3b66d Migrate FileCheck to %FileCheck in tests 2016-08-10 23:52:02 -07:00
Doug Gregor
823c24b355 [SE-0112] Rename ErrorProtocol to Error.
This is bullet (5) of the proposed solution in SE-0112, and the last
major piece to be implemented.
2016-07-12 10:53:52 -07:00
Xi Ge
66fb8062fe ModulePrinting: For decls without doc-comment, we print the doc-comment associated with their conformances, if any.
Inspired by rdar://24409720
2016-03-21 14:35:32 -07:00