1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-17 23:56:05 +02:00

Fixed attributed indexer expression

This commit is contained in:
Brian Fiete 2020-12-25 12:28:40 -08:00
parent 4ee40c8a06
commit 25a7d5fed1
2 changed files with 7 additions and 4 deletions

View file

@ -10826,6 +10826,8 @@ BfIRValue BfModule::CastToValue(BfAstNode* srcNode, BfTypedValue typedVal, BfTyp
{ {
auto svTypeInst = toType->ToTypeInstance(); auto svTypeInst = toType->ToTypeInstance();
PopulateType(svTypeInst);
PopulateType(svTypeInst->mBaseType);
mBfIRBuilder->PopulateType(svTypeInst); mBfIRBuilder->PopulateType(svTypeInst);
auto stringCharPtr = GetStringCharPtr(stringId); auto stringCharPtr = GetStringCharPtr(stringId);

View file

@ -7707,8 +7707,9 @@ BfExpression* BfReducer::CreateIndexerExpression(BfExpression* target)
if (attributeDirective != NULL) if (attributeDirective != NULL)
{ {
BfAttributedExpression* attribExpr = mAlloc->Alloc<BfAttributedExpression>(); BfAttributedExpression* attribExpr = mAlloc->Alloc<BfAttributedExpression>();
attribExpr->mAttributes = attributeDirective; ReplaceNode(indexerExpr, attribExpr);
MEMBER_SET(attribExpr, mExpression, indexerExpr); attribExpr->mExpression = indexerExpr;
MEMBER_SET(attribExpr, mAttributes, attributeDirective);
return attribExpr; return attribExpr;
} }