Improved generic inference in initializers #2541.

This commit is contained in:
Christoffer Lerno
2025-10-22 23:48:32 +02:00
parent 9cf271f5fb
commit 883052a6bb
3 changed files with 29 additions and 3 deletions

View File

@@ -0,0 +1,13 @@
import std::collections::linkedlist;
struct Foo
{
LinkedList {int} x;
}
fn int main(String[] args)
{
Foo f;
f.x = linkedlist::@new(tmem);
Foo f1 = { .x = linkedlist::@new(tmem) };
return 0;
}