mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
explicitly match errors
This commit is contained in:
parent
f330e9aa29
commit
892d264304
2 changed files with 32 additions and 9 deletions
|
@ -165,13 +165,13 @@ fn record_2_fields() {
|
|||
\#Derived.stateRecord, #Derived.fmt ->
|
||||
when when #Derived.stateRecord.first is
|
||||
Ok #Derived.first -> Ok #Derived.first
|
||||
_ ->
|
||||
Err (NoField) ->
|
||||
when decodeWith [] decoder #Derived.fmt is
|
||||
#Derived.decRec2 -> #Derived.decRec2.result is
|
||||
Ok #Derived.first ->
|
||||
when when #Derived.stateRecord.second is
|
||||
Ok #Derived.second -> Ok #Derived.second
|
||||
_ ->
|
||||
Err (NoField) ->
|
||||
when decodeWith [] decoder #Derived.fmt is
|
||||
#Derived.decRec -> #Derived.decRec.result is
|
||||
Ok #Derived.second ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue