Permit foreach values to be optional. Update matching algorithm.

This commit is contained in:
Christoffer Lerno
2024-07-27 21:11:54 +02:00
parent 51661f5c55
commit 4976ebcef4
5 changed files with 36 additions and 24 deletions

View File

@@ -33,7 +33,7 @@ fn void test4()
fn void test5()
{
foreach (int! y : z) foo(); // #error: The variable may not be an optional.
foreach (int! y : z) foo();
}
fn void test6()

View File

@@ -33,7 +33,7 @@ fn void test4()
fn void test5()
{
foreach_r (int! y : z) foo(); // #error: The variable may not be an optional.
foreach_r (int! y : z) foo();
}
fn void test6()