mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-31 17:17:26 +00:00
Bool derive key for Decode
This commit is contained in:
parent
dba72c0565
commit
f079e8c96b
2 changed files with 19 additions and 0 deletions
|
@ -8806,4 +8806,22 @@ mod solve_expr {
|
|||
"###
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn derive_decoder_for_bool() {
|
||||
infer_queries!(
|
||||
indoc!(
|
||||
r#"
|
||||
app "test" provides [main] to "./platform"
|
||||
|
||||
main : Decoder Bool _
|
||||
main = Decode.custom \bytes, fmt ->
|
||||
Decode.decodeWith bytes Decode.decoder fmt
|
||||
# ^^^^^^^^^^^^^^
|
||||
"#
|
||||
),
|
||||
@"Decoding#Decode.decoder(4) : List U8, fmt -[[]]-> { rest : List U8, result : [Err [TooShort], Ok [False, True]] } | fmt has DecoderFormatting"
|
||||
print_only_under_alias: true
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue