mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
31 lines
413 B
Plaintext
31 lines
413 B
Plaintext
module values <Type>;
|
|
|
|
struct Values
|
|
{
|
|
Type[] values;
|
|
int count;
|
|
}
|
|
|
|
fn void test()
|
|
{
|
|
|
|
}
|
|
module main;
|
|
|
|
import values;
|
|
import std::collections::list;
|
|
|
|
fn void test1()
|
|
{
|
|
int x = values::test{}(); // #error: requires generic arguments inside
|
|
}
|
|
|
|
fn void test2()
|
|
{
|
|
List{Values{ }} v1s; // #error: 'Values' requires generic arguments inside the '{}', did you forget them
|
|
}
|
|
|
|
fn void main()
|
|
{
|
|
List{Values{int}} v2s;
|
|
} |