Files
c3c/test/test_suite/generic/generic_inference.c3t
2026-01-18 00:33:43 +01:00

24 lines
388 B
Plaintext

module test;
import std, libc, test2;
fn void hello(Foo{int} x) {}
fn void main()
{
List{int} l = list::ONHEAP;
Maybe{int} m = maybe::value(3);
List{int} y = (List){};
Quaternion z = quaternion::IDENTITY;
z = z * quaternion::IDENTITY;
hello(test2::get_foo());
hello((Foo){});
hello(test2::get_foo{int}());
}
module test2 <Type>;
fn Foo get_foo() => {};
struct Foo
{
Type t;
}