Skip to content

Commit

Permalink
Use field position of the symbol for intersection
Browse files Browse the repository at this point in the history
  • Loading branch information
nipunayf committed Feb 7, 2024
1 parent 465988e commit ee57954
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5615,10 +5615,10 @@ private boolean populateFields(IntersectionContext intersectionContext, BRecordT
invokableSymbol.flags = tsymbol.flags;
} else {
recordFieldSymbol = new BVarSymbol(intersectionFlags, name, env.enclPkg.packageID,
intersectionFieldType, newTypeSymbol, lhsRecordField.pos, SOURCE);
intersectionFieldType, newTypeSymbol, lhsRecordField.symbol.pos, SOURCE);
}

newTypeFields.put(key, new BField(name, recordFieldSymbol.pos, recordFieldSymbol));
newTypeFields.put(key, new BField(name, null, recordFieldSymbol));
newTypeSymbol.scope.define(name, recordFieldSymbol);
}
return true;
Expand Down

0 comments on commit ee57954

Please sign in to comment.