mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Assert when encountering a malformed module alias.
This commit is contained in:
@@ -598,7 +598,7 @@ fn bool test_file(Path file_path, TestOutput* output, usz index)
|
||||
}
|
||||
if (try next)
|
||||
{
|
||||
io::fprintfn((OutStream)&output.buffer, `FAILED - %s did not contain: "%s"`, file.ptr.name, next)!!;
|
||||
io::fprintfn((OutStream)&output.buffer, `FAILED - %s did not contain: %s`, file.ptr.name, next)!!;
|
||||
io::fprintfn((OutStream)&output.buffer, "\n\n\n---------------------------------------------------> %s\n\n", file.ptr.name)!!;
|
||||
(void)file_ll.seek(0);
|
||||
io::fprintn((OutStream)&output.buffer, (String)io::read_fully(tmem, &file_ll))!!;
|
||||
|
||||
1
test/test_suite/module/module_alias_broken.c3
Normal file
1
test/test_suite/module/module_alias_broken.c3
Normal file
@@ -0,0 +1 @@
|
||||
alias foo = module; // #error: 'module' should be followed by a module name.
|
||||
@@ -2,7 +2,7 @@ import std;
|
||||
struct Foo
|
||||
{
|
||||
int a;
|
||||
int[int.max] b; // #error: "Struct member 'b' would cause the struct to become too large
|
||||
int[int.max] b; // #error: Struct member 'b' would cause the struct to become too large
|
||||
}
|
||||
|
||||
fn int main()
|
||||
|
||||
Reference in New Issue
Block a user