mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-31 09:07:21 +00:00
Derive encode for bool
This commit is contained in:
parent
9563b444cd
commit
5be8ff700d
2 changed files with 16 additions and 0 deletions
|
@ -8824,4 +8824,19 @@ mod solve_expr {
|
|||
print_only_under_alias: true
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn derive_to_encoder_for_bool() {
|
||||
infer_queries!(
|
||||
indoc!(
|
||||
r#"
|
||||
app "test" provides [main] to "./platform"
|
||||
|
||||
main = Encode.toEncoder Bool.true
|
||||
# ^^^^^^^^^^^^^^^^
|
||||
"#
|
||||
),
|
||||
@"Encoding#Encode.toEncoder(2) : Bool -[[] + fmt:Encode.bool(17):1]-> Encoder fmt | fmt has EncoderFormatting"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue