-
Notifications
You must be signed in to change notification settings - Fork 105
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
Type checker doesn't reject parametrised shared functions #3519
Comments
There is no good story for polymorphic shared endpoints atm. Sorry for that :-( |
But we should not be crashing, for sure. |
Possible repro: actor {
type Bad<T> = Nat;
public query func foo<T>() : async Bad<T> { loop {} };
} |
@borovan are you sure your example doesn't compile? Can you provide a self-sufficient example like above? this works for me at least: actor {
type Bad<T> = { thing : Nat };
public shared ({caller}) func bar<T>(inp : Int) : async Bad<T> { return { thing = 42 } };
} |
this crashes for me |
|
while you're here, do you have any code that uses typ-params? I was trying to figure out what it does as part of the new subtype system? :) |
Totally works for me, using
|
hmm i dunno then... its not like i need it to work at all |
I can't reproduce it either (on linux) |
Ok, I think I can reproduce it with an empty main actor that imports the class above. |
#3522 contains the repro (not a fix) |
#3522 now contains a fix |
@borovan thanks for reporting this! |
with 0.7.1
doing silly generic tests and
my god our life would be easier if this could work :)
The text was updated successfully, but these errors were encountered: