-
-
Notifications
You must be signed in to change notification settings - Fork 661
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
Unclosed monomorphs in function signature #11381
Comments
I thought that this might work since fa2faa1, but it doesn"t. I suspect that we create a monomorph via |
Nice! Slightly related, from the updated test:
Would |
This comes from fa2faa1, so the situation is that there"s already a |
I guess my suggestion was to use Any instead of Dynamic when closing a monomorph that has no constraints, but maybe that wouldn"t happen there anyway because of expected type? |
It doesn"t have no constraints, its only constraint is |
I randomly found this problem today in the test for #2685:
The problem is that the return type of
func1
remains a monomorph because those are not bound toDynamic
. It is instead unified with the type ofvar a:Int
and thus the function itself ends up as(a : Dynamic) -> Int
, which is just wrong.Very related to #3033 and I still maintain that functions should not expose their monomorphs. I"ll try to see what happens if we bind leftover monomorphs to
Dynamic
(and maybeVoid
for some return types?), but I expect some friction here.The text was updated successfully, but these errors were encountered: