mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Improved generic inference in initializers #2541.
This commit is contained in:
13
test/test_suite/generic/generic_inference.c3
Normal file
13
test/test_suite/generic/generic_inference.c3
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user