Fix issue with zero arg @operator(construct). Assert on add to uninitialized ct variable #1765

This commit is contained in:
Christoffer Lerno
2025-01-03 11:45:46 +01:00
parent 56d25cdeeb
commit a3d15fe16c
5 changed files with 16 additions and 18 deletions

View File

@@ -0,0 +1,6 @@
fn int main()
{
var $a;
$a += 1; // #error: not yet initialized
return 0;
}

View File

@@ -0,0 +1,5 @@
struct Foo { int a; }
fn Foo Foo.foo() @operator(construct)
{
return { 1 };
}