mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-28 03:58:12 +08:00
Add an env-gated inferred type dump
This commit is contained in:
@@ -847,6 +847,9 @@ impl TypingContext {
|
|||||||
// Get the node input type from the proto node declaration
|
// Get the node input type from the proto node declaration
|
||||||
let impls = self.lookup.get(&node.identifier).ok_or_else(|| vec![GraphError::new(node, GraphErrorType::NoImplementations)])?;
|
let impls = self.lookup.get(&node.identifier).ok_or_else(|| vec![GraphError::new(node, GraphErrorType::NoImplementations)])?;
|
||||||
let (node_io, entry) = resolve_entry(node, &inputs, impls)?;
|
let (node_io, entry) = resolve_entry(node, &inputs, impls)?;
|
||||||
|
if std::env::var("GRAPHENE_TYPE_DEBUG").is_ok() {
|
||||||
|
eprintln!("type {} {} -> {}", node_id, node.identifier, node_io.ty());
|
||||||
|
}
|
||||||
self.inferred.insert(node_id, node_io.clone());
|
self.inferred.insert(node_id, node_io.clone());
|
||||||
self.constructor.insert(node_id, entry.constructor);
|
self.constructor.insert(node_id, entry.constructor);
|
||||||
Ok(node_io)
|
Ok(node_io)
|
||||||
|
|||||||
Reference in New Issue
Block a user