Skip to content

Conversation

@dy-tea
Copy link
Member

@dy-tea dy-tea commented Jan 3, 2026

Fixes #26195.

@dy-tea
Copy link
Member Author

dy-tea commented Jan 3, 2026

Adventofcode has a cgen issue, will look into it.

@dy-tea dy-tea marked this pull request as draft January 4, 2026 00:02
@spytheman
Copy link
Member

This PR managed to find implicit type conversion bugs in stats.v , which is a very good sign.
Thank you @dy-tea .

@spytheman
Copy link
Member

the vlib/v/slow_tests/inout/publish_shared_object_method_call.vv failure can be worked around with:

 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

@dy-tea
Copy link
Member Author

dy-tea commented Jan 6, 2026

Good that it is finding issues. Been kind of going in circles fixing a test and a different one breaks for a while :/

@dy-tea
Copy link
Member Author

dy-tea commented Jan 8, 2026

Just rebased to master for now.

@dy-tea
Copy link
Member Author

dy-tea commented Jan 8, 2026

I believe this is also a type promotion bug:

 FAIL  [1096/2677] C:  1448.9 ms, R:     0.000 ms vlib/v/tests/comptime/comptime_infix_assign_test.v
>> compilation failed:
vlib/v/tests/comptime/comptime_infix_assign_test.v:20:21: error: cannot use `int` as `u64` in argument 1 to `u64_to_hex`
   18 |             else { return '' }
   19 |         }
   20 |         return u64_to_hex(item, len)
      |                           ~~~~
   21 |     } $else $if T is $array {
   22 |         mut hex := ''

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

checker: missing type checking when generic fn is passed to generic struct fn

2 participants