Skip to content

Conversation

@Azoy
Copy link
Contributor

@Azoy Azoy commented Apr 17, 2020

cc: @jckarter Does this look right?

Copy link
Contributor

@aschwaighofer aschwaighofer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you also either need a

@available(...) func callAsFunction(request: Int, args: [Any.Type]) -> MetadataResponse { 

or a guard around the accessor call:

#if available(...) _swift_metadataAccessorCall(ptr, request, $0, args.count) 
@jckarter
Copy link
Contributor

Yeah. A good way to get the compiler to help might be to try building the test with an explicit deployment target, like %target-swift-build -target x86_64-apple-macosx10.14.4 %s. Then you should in theory get compiler errors wherever you need availability guards for your new API.

@Azoy Azoy closed this May 22, 2020
@Azoy Azoy deleted the but-only-from-the-future-swift branch August 11, 2020 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants