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:
Christoffer Lerno
2025-09-16 18:05:21 +02:00
committed by GitHub
parent 8342ac80d3
commit 92aefb15f8
28 changed files with 563 additions and 214 deletions

View 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;
}