Derive encode for bool

This commit is contained in:
Ayaz Hafiz 2023-03-20 15:28:31 -04:00
parent 9563b444cd
commit 5be8ff700d
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
2 changed files with 16 additions and 0 deletions

View file

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