mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-28 18:30:06 +00:00
Diverging procedures proc() -> ! (no return)
This commit is contained in:
@@ -785,6 +785,15 @@ bit_set_type :: proc() {
|
||||
}
|
||||
}
|
||||
|
||||
diverging_procedures :: proc() {
|
||||
// Diverging procedures may never return
|
||||
foo :: proc() -> ! {
|
||||
fmt.println("I'm a diverging procedure");
|
||||
}
|
||||
|
||||
foo();
|
||||
}
|
||||
|
||||
|
||||
main :: proc() {
|
||||
when true {
|
||||
@@ -800,5 +809,6 @@ main :: proc() {
|
||||
cstring_example();
|
||||
deprecated_attribute();
|
||||
bit_set_type();
|
||||
diverging_procedures();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user