Fix of bug where missing return wasn't detected.

This commit is contained in:
Christoffer Lerno
2022-10-13 13:34:54 +02:00
parent 4d08fee30e
commit effec3a1f6
3 changed files with 14 additions and 2 deletions

View File

@@ -0,0 +1,12 @@
module test;
import std::io;
macro int foo(int y) // #error: Missing return
{
if (y > 5) return y;
}
fn void main()
{
int x = foo(3);
}