1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 03:52:19 +02:00

Fixed variable assignment detection with classes member values

This commit is contained in:
Brian Fiete 2021-01-21 04:42:15 -08:00
parent 458eb90752
commit e1394e2fb7
2 changed files with 37 additions and 4 deletions

View file

@ -603,7 +603,7 @@ bool BfGenericInferContext::InferGenericArguments(BfMethodInstance* methodInstan
{
InferGenericArgument(methodInstance, srcGenericArg, ifaceConstraint, BfIRValue());
auto typeInstance = srcGenericArg->ToTypeInstance();
if (typeInstance == NULL)
if ((typeInstance == NULL) && (srcGenericArg->IsWrappableType()))
typeInstance = mModule->GetWrappedStructType(srcGenericArg);
if (typeInstance != NULL)
@ -4544,9 +4544,12 @@ BfTypedValue BfExprEvaluator::LookupField(BfAstNode* targetSrc, BfTypedValue tar
}
if ((mResultLocalVar != NULL) && (fieldInstance->mMergedDataIdx != -1))
{
fieldInstance->GetDataRange(mResultLocalVarField, mResultLocalVarFieldCount);
mResultLocalVarRefNode = targetSrc;
{
if (mResultLocalVarFieldCount != 1)
{
fieldInstance->GetDataRange(mResultLocalVarField, mResultLocalVarFieldCount);
mResultLocalVarRefNode = targetSrc;
}
}
if ((curCheckType->IsIncomplete()) && (!curCheckType->mNeedsMethodProcessing))