mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Crash when trying to define a method macro that isn't @construct but has no arguments.
This commit is contained in:
17
test/test_suite/macro_methods/macro_methods_no_args.c3
Normal file
17
test/test_suite/macro_methods/macro_methods_no_args.c3
Normal file
@@ -0,0 +1,17 @@
|
||||
import std::io;
|
||||
// Issue #1990
|
||||
struct Foo
|
||||
{
|
||||
uint field;
|
||||
}
|
||||
|
||||
macro Foo.bar() // #error: A method must start with an argument
|
||||
{
|
||||
io.printn("UwU");
|
||||
}
|
||||
|
||||
fn void main()
|
||||
{
|
||||
Foo foo = {};
|
||||
foo.bar();
|
||||
}
|
||||
Reference in New Issue
Block a user