From 128a564be05afb1cb2ec76884a81c2bd536899fd Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Sat, 3 Oct 2026 00:46:51 +0200 Subject: Replace noreturn type with an attribute --- testsuite/compilable/noreturn_procedure.elna | 6 ++++++ testsuite/fail_compilation/noreturn_return.elna | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 testsuite/compilable/noreturn_procedure.elna create mode 100644 testsuite/fail_compilation/noreturn_return.elna (limited to 'testsuite') diff --git a/testsuite/compilable/noreturn_procedure.elna b/testsuite/compilable/noreturn_procedure.elna new file mode 100644 index 0000000..3604f0f --- /dev/null +++ b/testsuite/compilable/noreturn_procedure.elna @@ -0,0 +1,6 @@ +module + +proc exit() #{noreturn} +return + +end. diff --git a/testsuite/fail_compilation/noreturn_return.elna b/testsuite/fail_compilation/noreturn_return.elna new file mode 100644 index 0000000..7ce50aa --- /dev/null +++ b/testsuite/fail_compilation/noreturn_return.elna @@ -0,0 +1,6 @@ +module + +proc die() #{noreturn} -> Int (* @Error Attribute 'noreturn' cannot be used with a return type *) +extern + +end. -- cgit v1.2.3