mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Typedefs and structs with inline types supporting lengthof would not work with lengthof #2641.
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user