Bool derive key for Decode

This commit is contained in:
Ayaz Hafiz 2023-03-20 15:06:53 -04:00
parent dba72c0565
commit f079e8c96b
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
2 changed files with 19 additions and 0 deletions

View file

@ -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
);
}
}