properly bound with StaticValue or StaticType<MaskType: StaticType>
All checks were successful
/ test (push) Successful in 14m38s

This commit is contained in:
Jacob Lifshay 2024-07-30 20:25:37 -07:00
parent 2dce478d48
commit cd99dbc849
Signed by: programmerjake
SSH key fingerprint: SHA256:B1iRVvUJkvd7upMIiMqn6OyxvD2SgJkAH3ZnUOj6z+c
8 changed files with 37 additions and 45 deletions

View file

@ -186,22 +186,9 @@ impl ValueDeriveGenerics {
let predicates = &mut generics.make_where_clause().predicates;
let static_type_predicates = &mut static_type_generics.make_where_clause().predicates;
for type_param in type_params {
predicates.push(parse_quote! {#type_param: ::fayalite::ty::Value});
predicates.push(parse_quote! {
<#type_param as ::fayalite::expr::ToExpr>::Type:
::fayalite::ty::Type<Value = #type_param>
});
static_type_predicates.push(parse_quote! {#type_param: ::fayalite::ty::Value});
static_type_predicates.push(parse_quote! {
<#type_param as ::fayalite::expr::ToExpr>::Type:
::fayalite::ty::StaticType<Value = #type_param>
});
static_type_predicates.push(parse_quote! {
<
<#type_param as ::fayalite::expr::ToExpr>::Type
as ::fayalite::ty::Type
>::MaskType: ::fayalite::ty::StaticType
});
predicates.push(parse_quote! {#type_param: ::fayalite::ty::Value<Type: ::fayalite::ty::Type<Value = #type_param>>});
static_type_predicates
.push(parse_quote! {#type_param: ::fayalite::ty::StaticValue});
}
}
Self {