Closed Dracks closed 8 months ago
A short reproducible test case:
pub struct Module {
}
pub struct Service {
callback fn ()
}
pub fn (mut self Module) do_anything[T]() {
}
pub fn (mut self Module) register[T]() {
_ := Service{
callback: fn [mut self] [T]() {
self.do_anything[T]()
}
}
}
struct Something {
}
struct SomethingDifferent {
}
fn main(){
mut mod := Module{}
mod.register[Something]()
mod.register[SomethingDifferent]()
}
Describe the bug
Code: https://vosca.dev/p/b33945f186
When you try to run this code, raises a C code, if you transform it to C code, you can see that the function is generated for the struct Something but not for SomethingDifferent
Expected Behavior
The code runs well
Current Behavior
Output:
Reproduction Steps
I tried to do a small code from 0, and I was not able to reproducte, thats why I generate all this sample from my code (I already did some cleanup)
Possible Solution
No response
Additional Information/Context
No response
V version
V 0.3.4 fc4c431.45f16a2
Environment details (OS name and version, etc.)