diff options
author | Nadrieril | 2019-12-22 18:24:21 +0000 |
---|---|---|
committer | Nadrieril | 2019-12-22 18:24:21 +0000 |
commit | fa6de4c077ab4f1c28d2ec64a33a3be8c5a9bb1c (patch) | |
tree | c0506c6bad8ff70e7108b3c6a9f34acbd5fb4010 /dhall/src/semantics | |
parent | 6e0d808e0f5683de942d912231fa10211b6d1377 (diff) |
Update dhall-lang submodule
Diffstat (limited to 'dhall/src/semantics')
-rw-r--r-- | dhall/src/semantics/phase/typecheck.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/dhall/src/semantics/phase/typecheck.rs b/dhall/src/semantics/phase/typecheck.rs index c439f74..856f5c3 100644 --- a/dhall/src/semantics/phase/typecheck.rs +++ b/dhall/src/semantics/phase/typecheck.rs @@ -774,7 +774,15 @@ fn type_last_layer( for l in labels { match kts.get(l) { None => return mkerr(ProjectionMissingEntry), - Some(t) => new_kts.insert(l.clone(), t.clone()), + Some(t) => { + use std::collections::hash_map::Entry; + match new_kts.entry(l.clone()) { + Entry::Occupied(_) => { + return mkerr(ProjectionDuplicateField) + } + Entry::Vacant(e) => e.insert(t.clone()), + } + } }; } |