New visualizer
This commit is contained in:
+2
-2
@@ -105,7 +105,7 @@ type
|
||||
function GetOperator: TScalar.TBinaryOp;
|
||||
function GetRight: IAstNode;
|
||||
public
|
||||
constructor Create(ALeft: IAstNode; AOperator: TScalar.TBinaryOp; ARight: IAstNode);
|
||||
constructor Create(const ALeft: IAstNode; AOperator: TScalar.TBinaryOp; const ARight: IAstNode);
|
||||
function Accept(const Visitor: IAstVisitor): TDataValue; override;
|
||||
end;
|
||||
|
||||
@@ -369,7 +369,7 @@ end;
|
||||
|
||||
{ TBinaryExpressionNode }
|
||||
|
||||
constructor TBinaryExpressionNode.Create(ALeft: IAstNode; AOperator: TScalar.TBinaryOp; ARight: IAstNode);
|
||||
constructor TBinaryExpressionNode.Create(const ALeft: IAstNode; AOperator: TScalar.TBinaryOp; const ARight: IAstNode);
|
||||
begin
|
||||
inherited Create;
|
||||
FLeft := ALeft;
|
||||
|
||||
@@ -143,7 +143,8 @@ begin
|
||||
if FKind <> vkGeneric then
|
||||
raise EInvalidCast.Create('Cannot read value as generic of ' + String(PTypeInfo(TypeInfo(T)).Name) + '.');
|
||||
{$ifdef DEBUG}
|
||||
if TVal<T>(FInterface).TypeHandle <> TypeInfo(T) then
|
||||
var val := TVal<T>(FInterface);
|
||||
if val.TypeHandle <> TypeInfo(T) then
|
||||
raise EInvalidCast.Create('Generic type is not a ' + String(PTypeInfo(TypeInfo(T)).Name) + '.');
|
||||
{$endif}
|
||||
Result := TVal<T>(FInterface).Value;
|
||||
|
||||
Reference in New Issue
Block a user