Some refactoring of the bitstruct representation. Correctly represent inner types. #1471

This commit is contained in:
Christoffer Lerno
2024-09-21 13:43:52 +02:00
parent d727696830
commit cdae3ec936
16 changed files with 162 additions and 77 deletions

View File

@@ -0,0 +1,21 @@
module test;
struct Foo
{
bitstruct abc : int
{
bool a;
}
}
fn void test1()
{
Foo x;
x.abc = "abc"; // #error: to the inner type 'Foo.abc'
}
fn void test2()
{
Foo x;
x.abc = 2; // #error: type 'Foo.abc' is not permitted, but you may do an explicit
}

View File

@@ -71,7 +71,7 @@ struct Aa1
fn void test_conversion_struct()
{
Aa1 a1;
int aa = a1.bb; // #error: 'bb' to 'int'
int aa = a1.bb; // #error: 'Aa1.bb' to 'int'
}
struct Struct