We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
noreturn main
1 parent b051cc6 commit a3865ebCopy full SHA for a3865eb
changelog/main_return_type.dd
@@ -0,0 +1,9 @@
1
+`main` can now return type `noreturn` and supports return inference
2
+
3
+If `main` never returns (due to an infinite loop or always throwing an
4
+exception), it can now be declared as returning `noreturn`.
5
+See https://dlang.org/spec/type.html#noreturn.
6
7
+If `main` is declared with `auto`, the inferred return type must be
8
+one of `void`, `int` and `noreturn`.
9
0 commit comments