mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-06 04:18:12 +08:00
@@ -544,13 +544,13 @@ impl TypingContext {
|
|||||||
let impls = self.lookup.get(&node.identifier).ok_or(format!("No implementations found for {:?}", node.identifier))?;
|
let impls = self.lookup.get(&node.identifier).ok_or(format!("No implementations found for {:?}", node.identifier))?;
|
||||||
|
|
||||||
if matches!(input, Type::Generic(_)) {
|
if matches!(input, Type::Generic(_)) {
|
||||||
return Err(format!("Generic types are not supported as inputs yet {:?} occured in {:?}", &input, node.identifier));
|
return Err(format!("Generic types are not supported as inputs yet {:?} occurred in {:?}", &input, node.identifier));
|
||||||
}
|
}
|
||||||
if parameters.iter().any(|p| {
|
if parameters.iter().any(|p| {
|
||||||
matches!(p,
|
matches!(p,
|
||||||
Type::Fn(_, b) if matches!(b.as_ref(), Type::Generic(_)))
|
Type::Fn(_, b) if matches!(b.as_ref(), Type::Generic(_)))
|
||||||
}) {
|
}) {
|
||||||
return Err(format!("Generic types are not supported in parameters: {:?} occured in {:?}", parameters, node.identifier));
|
return Err(format!("Generic types are not supported in parameters: {:?} occurred in {:?}", parameters, node.identifier));
|
||||||
}
|
}
|
||||||
fn covariant(from: &Type, to: &Type) -> bool {
|
fn covariant(from: &Type, to: &Type) -> bool {
|
||||||
match (from, to) {
|
match (from, to) {
|
||||||
|
|||||||
Reference in New Issue
Block a user