-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Follow-up to Availability PR #54
Conversation
Your PR requires formatting changes to meet the project's style guidelines. Click here to view the suggested changes.diff --git a/src/syntax.jl b/src/syntax.jl
index bff8593..f77e70a 100644
--- a/src/syntax.jl
+++ b/src/syntax.jl
@@ -311,7 +311,7 @@ macro objcwrapper(ex...)
end
immutable = something(immutable, true)
comparison = something(comparison, !immutable)
- availability = something(availability, PlatformAvailability[])
+ availability = something(availability, PlatformAvailability[])
# parse class definition
if Meta.isexpr(def, :(<:))
@@ -352,7 +352,7 @@ macro objcwrapper(ex...)
# add a pseudo constructor to the abstract type that also checks for nil pointers.
function $name(ptr::id)
- @static if !ObjectiveC.is_available($availability)
+ @static if !ObjectiveC.is_available($availability)
throw($UnavailableError(Symbol($name), $availability))
end
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #54 +/- ##
==========================================
+ Coverage 71.91% 77.73% +5.82%
==========================================
Files 10 13 +3
Lines 769 988 +219
==========================================
+ Hits 553 768 +215
- Misses 216 220 +4 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some bikeshedding.
Switches
is_unavailable
tois_available
as mentioned in #51 (comment).Also reduces (removes?) places where the code assumes macOS.
PlatformAvailability
s for a different platform are ignored (returntrue
whenis_applicable
is called, in line with the Clang availability behaviour.