mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Generic inference (#2475)
* Change generic symbol resolution.
* Infer generic parameters lhs -> rhs: `List{int} x = list::NOHEAP`.
* Regression: Compiler segfault when assigning struct literal with too few members #2483
This commit is contained in:
committed by
GitHub
parent
8342ac80d3
commit
92aefb15f8
13
test/test_suite/struct/too_few_elements.c3
Normal file
13
test/test_suite/struct/too_few_elements.c3
Normal file
@@ -0,0 +1,13 @@
|
||||
import std;
|
||||
fn int main()
|
||||
{
|
||||
Colour col = {255, 255, 0}; // #error: Too few elements in initializer
|
||||
return 0;
|
||||
}
|
||||
struct Colour
|
||||
{
|
||||
char a;
|
||||
char r;
|
||||
char g;
|
||||
char b;
|
||||
}
|
||||
Reference in New Issue
Block a user