-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
ast,checker: add type checking for param of fn passed as generic arg #26257
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
base: master
Are you sure you want to change the base?
Conversation
|
Adventofcode has a cgen issue, will look into it. |
|
This PR managed to find implicit type conversion bugs in stats.v , which is a very good sign. |
|
the fn (shared eb EventBus[T]) publish(event_type EventType, data T) {
lock eb {
for _, subscriber in eb.subscribers[event_type] {
- subscriber(data)
+ subscriber[T](data)
}
}
}but imho should not have to, the type should have been inferred |
|
Good that it is finding issues. Been kind of going in circles fixing a test and a different one breaks for a while :/ |
|
Just rebased to master for now. |
|
I believe this is also a type promotion bug: |
Fixes #26195.