-
Notifications
You must be signed in to change notification settings - Fork 26
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
C-level support for upcasts #198
Conversation
Does it make sense to create a test case? |
Good point! Added. |
There's a typo, |
That’s weird, I saw 70 passing tests. Will examine... |
It seems it was running a version that I compiled manually in the test directory. At some point I added |
Does it make sense to edit
|
That's a nicer solution. I'll go with that. Thanks! |
I think it's ready to be merged. It's good that I don't need maintain this |
When you do the rebase, I think it's good to regroup the |
Normally I would agree, but since the second commit also changes the testing script I think it's good if that is clearly visible. |
Or do you mean that the testing script change should be in a commit of its own? |
Yes, since the second commit msg uses |
Fair, I'll look into it. |
Before we had subtyping, a type cast (`x : Foo`) was a no-op dynamically since it could only be used to help the typechecker figure out the correct type. Now we need to do an actual pointer cast so that assignments and function argument types get the right types in the generated code. This PR fixes this.
To avoid problems where residual compiled programs are run by `make test` even if compilation of said program fails, the makefile in the test directory will start by removing all old compiled programs.
This should be better I think |
Yes, this is what I had in mind. |
C-level support for upcasts
Before we had subtyping, a type cast (
x : Foo
) was a no-opdynamically since it could only be used to help the typechecker figure
out the correct type. Now we need to do an actual pointer cast so that
assignments and function argument types get the right types in the
generated code. This PR fixes this.