mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
In some cases, the compiler would dereference a compile time null. #2215
This commit is contained in:
12
test/test_suite/safe/deref_ct.c3
Normal file
12
test/test_suite/safe/deref_ct.c3
Normal file
@@ -0,0 +1,12 @@
|
||||
module test;
|
||||
macro void test()
|
||||
{
|
||||
any *$value;
|
||||
typeid t = $value.type; // #error: This value is known to be null so you
|
||||
}
|
||||
|
||||
fn int main()
|
||||
{
|
||||
test();
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user