Fix binding issue on evaluation

This commit is contained in:
2019-01-21 12:57:30 +01:00
parent ca9361cd0f
commit 86f47ae002
6 changed files with 28 additions and 13 deletions

View File

@@ -10,16 +10,7 @@ namespace Upsilon.BaseTypes.UserData
Value = obj;
_typeInfo = UserDataTypeHandler.GetTypeInfo(obj.GetType());
}
public override TypeContainer Type
{
get
{
var typeData = _typeInfo.BoundTypeName;
if (typeData != null)
return new TypeContainer(typeData);
return BaseTypes.Type.Unknown;
}
}
public override TypeContainer Type { get; } = new IgnoredUserDataTypeContainer();
private object Value { get; }
private readonly UserDataType _typeInfo;

View File

@@ -14,6 +14,7 @@ namespace Upsilon.BaseTypes.UserData
Subtraction,
Multiplication,
Division,
Modulo
}
public class UserDataTypeOperators
@@ -64,6 +65,9 @@ namespace Upsilon.BaseTypes.UserData
case "op_Division":
LoadMethod(OperatorType.Division, methodInfo);
break;
case "op_Modulus":
LoadMethod(OperatorType.Modulo, methodInfo);
break;
}
}
}