Commit Graph

7 Commits

Author SHA1 Message Date
Ben Barham
6775624ea3 [Test] Fix up rest of availability test
This was partially fixed in 5e44a45b35,
but tvos and watchos also need to be updated.
2022-06-01 15:12:03 -07:00
Ben Barham
5e44a45b35 [Test] More test updates to take into account VersionTuple change 2022-05-26 12:19:46 -07:00
Ben Barham
92b6dd24c2 Merge branch 'main' into manually-merge-main 2022-05-25 15:55:35 -07:00
Allan Shortlidge
7687a63dcf Sema: Use the availability of the extended nominal as a floor for the availability of extensions. The primary motivation for this change is to reduce unnecessary availability diagnostics for API library authors. Many API libraries contain existing extension decls that lack declared availability where the extension introduces additional members to the extended type in the same release that the extended type was declared. Others contain extensions where the extension itself does not have declared availability but each of the members do. In both cases, the code is safe as written so the extra diagnostics would be a nuisance.
Resolves rdar://93630782
2022-05-23 21:52:12 -07:00
Ben Barham
f2bd6ce9cb [next] Remove subminor version from various tests
The "0" subminor is no longer included after
114b4d96e4 (which generally doesn't add a
subminor). Remove it from checks depending on it.
2022-05-11 17:06:29 -07:00
Allan Shortlidge
5ad00f6a65 AST: Rename the ResilienceBoundary member of the TypeRefinementContext::Reason enum to APIBoundary.
I missed needing to rename this in https://github.com/apple/swift/pull/58707.
2022-05-06 19:12:09 -07:00
Allan Shortlidge
00ac799592 Sema: Fix isExported() for extension decls in order to correct availability diagnostics when -target-min-inlining-version min is specified.
Previously, an extension decl was always considered exported (externally visible to module clients) as long as it extended an exported type. Extensions need to either contain some externally visible member (e.g. a public method) or implement a conformance to a public protcol, though, to actually be exported. Without this fix, the compiler incorrectly requires internal extensions to types that are always available at runtime to have declared availability which would be a nuisance for library authors.

As part of testing this change, I expanded the attr_inlinable_available.swift test case significantly and that prompted me to scrap the copy of the test specific to macCatalyst as it seemed like needing to keep the two tests in sync was going to be a liability going forward. I replaced the deleted test with a couple of more targeted tests that use `-dump-type-refinement-contexts` to verify the effect of `-target-min-inlining-version min` on the root refinement context. Again a macCatalyst version of the test is required because we don't have bots that are configured to make the macCatalyst runtime the "target" OS.

Resolves rdar://91382040
2022-04-22 14:33:36 -07:00