mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Show code that caused unreachable code #2207
`$echo` would suppress warning about unreachable code. #2205
This commit is contained in:
12
test/test_suite/functions/unreachable_code_trace.c3
Normal file
12
test/test_suite/functions/unreachable_code_trace.c3
Normal file
@@ -0,0 +1,12 @@
|
||||
import std;
|
||||
|
||||
macro something() {
|
||||
unreachable("Hi there");
|
||||
}
|
||||
|
||||
fn void main() {
|
||||
something();
|
||||
|
||||
$echo "Hello";
|
||||
io::printn("Hello, World"); // #warning: This code will never execute
|
||||
}
|
||||
Reference in New Issue
Block a user