Crash when trying to define a method macro that isn't @construct but has no arguments.

This commit is contained in:
Christoffer Lerno
2025-02-20 15:51:21 +01:00
parent 341a70bd5d
commit 79db06ecd1
3 changed files with 31 additions and 13 deletions

View 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();
}