diff options
author | Nadrieril | 2019-04-15 12:22:02 +0200 |
---|---|---|
committer | Nadrieril | 2019-04-15 12:22:02 +0200 |
commit | 63aa21c581933a10b2b1ab96c632c72834cf2115 (patch) | |
tree | 9e534d7a4107fae5aae33637a5ea7c8a2f58c873 /dhall_core/src/visitor.rs | |
parent | 75420d0822652d6592b74199ea35281dbdf84efb (diff) |
Handle empty optionals correctly
Closes #78
Diffstat (limited to 'dhall_core/src/visitor.rs')
-rw-r--r-- | dhall_core/src/visitor.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/dhall_core/src/visitor.rs b/dhall_core/src/visitor.rs index b0424ac..3b06f8b 100644 --- a/dhall_core/src/visitor.rs +++ b/dhall_core/src/visitor.rs @@ -148,6 +148,10 @@ where ), EmptyListLit(t) => EmptyListLit(v.visit_subexpr(t)?), NEListLit(es) => NEListLit(vec(es, |e| v.visit_subexpr(e))?), + OldOptionalLit(x, t) => OldOptionalLit( + opt(x, |e| v.visit_subexpr(e))?, + v.visit_subexpr(t)?, + ), EmptyOptionalLit(t) => EmptyOptionalLit(v.visit_subexpr(t)?), NEOptionalLit(e) => NEOptionalLit(v.visit_subexpr(e)?), RecordType(kts) => RecordType(btmap(kts, v)?), |