Allow implicit discard when right-hand side is Void.

This is the most intuitive/expected behavior. Otherwise, it forces a pointless let-binding to 'Void' or into a discard.
This commit is contained in:
KtorZ
2024-03-08 23:48:42 +01:00
parent d73f8fd6c2
commit d6cc9bdfbe
6 changed files with 79 additions and 16 deletions

View File

@@ -0,0 +1,8 @@
fn label(str: String) -> Void {
trace str Void
}
test foo() {
label(@"Foo")
True
}