Skip to content

Commit

Permalink
fixed edge cases from new types in StandardLibrary
Browse files Browse the repository at this point in the history
  • Loading branch information
LostbBlizzard committed Aug 31, 2024
1 parent 9754d16 commit 0bd914e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ void SystematicAnalysis::OnAssignExpressionNode(const AssignExpressionNode& node

if (node._ReassignAddress == false)
{
ExpressionType._IsAddress = false;
if (!AssignType.IsDynamicTrait())
{
ExpressionType._IsAddress = false;
}
}


Expand Down Expand Up @@ -156,9 +159,13 @@ void SystematicAnalysis::OnAssignExpressionNode(const AssignExpressionNode& node
}


if (!AssignExType._IsAddress )
if (!AssignExType._IsAddress)
{
//obj = _IR_LookingAtIRBlock->NewLoadPtr(obj.Pointer);
if (AssignExType.IsLocationValue() && !domove_ctor)
{
obj = _IR_LookingAtIRBlock->NewLoadPtr(obj.Pointer);
ExIR = _IR_LookingAtIRBlock->NewLoad_Dereferenc(ExIR,IR_ConvertToIRType(AssignExType));//This current line may be in the wrong place. I will update it when i find the edge case
}
AssignExType._IsAddress = true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ void SystematicAnalysis::OnDeclareVariablenode(const DeclareVariableNode& node,
auto& VarType = syb->VarType;


auto& Ex = _LastExpressionType;
auto Ex = _LastExpressionType;
auto Token = NeverNullptr(node._Type._name._ScopedName.back()._token);
Type_DeclareVariableTypeCheck(VarType, Ex, Token);

Expand Down

0 comments on commit 0bd914e

Please sign in to comment.