-
Notifications
You must be signed in to change notification settings - Fork 39
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
Nonref object inheritance hints and converts to base in varargs a… #74
Conversation
e45ec8c
to
3457eab
Compare
Waiting for #59 in order check against the spec semantics. |
@beef331 mind rebasing this, I'm with you on the hint. They're all value types. |
Ideally this should also include spec-like test for #59 (comment) that checks that Latter part can be revised later (check array literal differently and/or perfrom implicit conversions), but for now this should be made into compiler error (if it isn't already). Same applies to the |
3457eab
to
f8d0b83
Compare
…nd on assignment array handling and more elaborate tests Better error message for implict object converstion
f8d0b83
to
40c7309
Compare
@@ -0,0 +1,53 @@ | |||
discard """ |
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.
@beef331 is the intention with these tests to fold into the spec?
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.
It probably should be moved to the spec I guess since it's for regression assurance.
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.
OK, if you know how to do it now then go for it, otherwise ask @haxscramper when he's about and do it later?
(we can merge this in the meantime)
bors r+ |
Build succeeded: |
…nd on assignment
This should make it so non ref objects can be used as one expected.
varargs[Base]
can accept[Base, Derived, Base, Derived2]
and so forth. It also makes it so any object conversion up or down(Though down conversion is explicit so no clue why it checks) emits a hint to inform about loss of possible information.var a: Base = Derived(field2: 300)
emits'Derived(field2: 300)' implicitly converted to 'Base' [/home/jason/nimskull/bin/abuse.nim(26, 22)] [ImplicitObjConv]