Typedefs and structs with inline types supporting lengthof would not work with lengthof #2641.

This commit is contained in:
Christoffer Lerno
2025-12-12 20:57:32 +01:00
parent 475816251b
commit 15662bd32f
3 changed files with 32 additions and 1 deletions

View File

@@ -1,6 +1,19 @@
module regression;
import std;
struct Foo
{
inline int[2] a;
}
fn void lengthof_aggregates() @test
{
Foo g;
g.len;
String foo = "abc";
test::eq(lengthof(g), 2);
test::eq(lengthof(foo), 3);
}
fn void lenof_test() @test
{