aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/http-server/http-server.tm1
-rw-r--r--src/compile.c3
-rw-r--r--src/stdlib/util.h2
3 files changed, 0 insertions, 6 deletions
diff --git a/examples/http-server/http-server.tm b/examples/http-server/http-server.tm
index 4c04491a..80774bff 100644
--- a/examples/http-server/http-server.tm
+++ b/examples/http-server/http-server.tm
@@ -112,7 +112,6 @@ enum RouteEntry(ServeFile(file:Path), Redirect(destination:Text))
return HTTPResponse(body, content_type=_content_type(file))
is Redirect(destination)
return HTTPResponse("Found", 302, headers={"Location"=destination})
- return HTTPResponse("Unreachable", 500)
func load_routes(directory:Path -> {Text=RouteEntry})
routes : &{Text=RouteEntry}
diff --git a/src/compile.c b/src/compile.c
index c03def22..888a0975 100644
--- a/src/compile.c
+++ b/src/compile.c
@@ -1928,9 +1928,6 @@ static CORD _compile_statement(env_t *env, ast_t *ast)
CORD compile_statement(env_t *env, ast_t *ast) {
CORD stmt = _compile_statement(env, ast);
- if (ast->tag != Block && get_type(env, ast)->tag == AbortType && env->fn_ret
- && (env->fn_ret->tag != VoidType && env->fn_ret->tag != AbortType))
- stmt = CORD_all(stmt, "\nUNREACHABLE_RETURN(", compile_type(env->fn_ret), ");");
return with_source_info(env, ast, stmt);
}
diff --git a/src/stdlib/util.h b/src/stdlib/util.h
index e54c1cab..25cd49f9 100644
--- a/src/stdlib/util.h
+++ b/src/stdlib/util.h
@@ -21,8 +21,6 @@
#define WHEN(type, subj, var, body) { type var = subj; switch (var.$tag) body }
-#define UNREACHABLE_RETURN(t) { errx(1, "Unreachable"); t _unreachable; return _unreachable; }
-
#ifndef public
#define public __attribute__ ((visibility ("default")))
#endif