mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Resolving &X.b when X is a const incorrectly checked for runtime constness #2842
Creating a generic instance fails if it is created after interface checking #2840
This commit is contained in:
8
test/test_suite/any/generic_interface_stage.c3t
Normal file
8
test/test_suite/any/generic_interface_stage.c3t
Normal file
@@ -0,0 +1,8 @@
|
||||
import std;
|
||||
fn int foo() => 0;
|
||||
alias FooFn = fn int();
|
||||
enum Bar : const FooFn
|
||||
{
|
||||
FOO = fn () => (int)(iptr)ExclusiveRange{int}.typeid,
|
||||
BAR = &foo,
|
||||
}
|
||||
4
test/test_suite/builtins/catch_zero_unaligned.c3
Normal file
4
test/test_suite/builtins/catch_zero_unaligned.c3
Normal file
@@ -0,0 +1,4 @@
|
||||
fn void unaligned_load_store(void* dst, void* src) @nostrip
|
||||
{
|
||||
$$unaligned_store(dst, $$unaligned_load((char*)src, 2, false), 0, false); // #error: Alignment must not be zero
|
||||
}
|
||||
Reference in New Issue
Block a user