-
Notifications
You must be signed in to change notification settings - Fork 138
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
Add isSubtype
function for runtime values
#1189
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1189 +/- ##
==========================================
+ Coverage 73.38% 73.39% +0.01%
==========================================
Files 272 272
Lines 34584 34603 +19
==========================================
+ Hits 25379 25398 +19
Misses 8032 8032
Partials 1173 1173
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
Nice work!
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.
LGTM!
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.
Great work on your first PR! 👏 🥳
Co-authored-by: Bastian Müller <bastian@axiomzen.co>
Co-authored-by: Bastian Müller <bastian@axiomzen.co>
Closes #473
Description
Adds a
fun isSubtype(of otherType : Type) : Bool
to runtime types which compares their static types and returns true if the receiver is a subtype of the argument and false if not. Note that unknown types (which have no static type) will return false if they are the receiver of the method or the argument, as it is illogical to check whether an unknown type is a supertype or subtype of anything else.master
branchFiles changed
in the Github PR explorer