1
0
mirror of https://github.com/Siccity/xNode.git synced 2025-12-20 09:16:01 +08:00

Update NodePort.cs

This commit is contained in:
Raistlin Wolfe 2022-09-12 18:25:14 -06:00 committed by GitHub
parent d19ea40e38
commit 7473083b84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -279,6 +279,9 @@ namespace XNode {
if (output.typeConstraint == XNode.Node.TypeConstraint.Strict && input.ValueType != output.ValueType) return false;
if (output.typeConstraint == XNode.Node.TypeConstraint.InheritedInverse && !output.ValueType.IsAssignableFrom(input.ValueType)) return false;
if (output.typeConstraint == XNode.Node.TypeConstraint.InheritedAny && !input.ValueType.IsAssignableFrom(output.ValueType) && !output.ValueType.IsAssignableFrom(input.ValueType)) return false;
if (output.typeConstraint == XNode.Node.TypeConstraint.Castable && !input.ValueType.IsCastableFrom(output.ValueType)) return false;
if (output.typeConstraint == XNode.Node.TypeConstraint.CastableInverse && !output.ValueType.IsCastableFrom(input.ValueType)) return false;
if (output.typeConstraint == XNode.Node.TypeConstraint.CastableAny && !input.ValueType.IsCastableFrom(output.ValueType) && !output.ValueType.IsCastableFrom(input.ValueType)) return false;
// Success
return true;
}