Validate let expressions

Emit an error if they're found in an invalid position.
This commit is contained in:
Chayim Refael Friedman 2022-01-30 12:23:36 +02:00
parent a1b7169b48
commit 821b791b6d
3 changed files with 261 additions and 0 deletions

View file

@ -0,0 +1,14 @@
fn foo() {
const _: () = let _ = None;
let _ = if true { (let _ = None) };
if true && (let _ = None) {
(let _ = None);
while let _ = None {
match None {
_ if let _ = None => { let _ = None; }
}
}
}
}