mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 15:21:12 +00:00
Constrain optional fields
This commit is contained in:
parent
1bdfe578bd
commit
7330e82f75
5 changed files with 39 additions and 10 deletions
|
@ -1,4 +1,5 @@
|
|||
use crate::env::Env;
|
||||
use crate::expr::Expr;
|
||||
use crate::num::{finish_parsing_base, finish_parsing_float, finish_parsing_int};
|
||||
use crate::scope::Scope;
|
||||
use roc_module::ident::{Ident, Lowercase, TagName};
|
||||
|
@ -50,7 +51,7 @@ pub struct RecordDestruct {
|
|||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub enum DestructType {
|
||||
Required,
|
||||
Optional(Variable),
|
||||
Optional(Variable, Located<Expr>),
|
||||
Guard(Variable, Located<Pattern>),
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue