Skip to content

Commit

Permalink
Fix immutable BFields not being marked as readonly
Browse files Browse the repository at this point in the history
  • Loading branch information
Thushara-Piyasekara committed Apr 9, 2024
1 parent 4196e06 commit 65f4a2e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ private static BIntersectionType setImmutableIntersectionType(Type type, Set<Typ
for (Map.Entry<String, Field> entry : originalFields.entrySet()) {
Field originalField = entry.getValue();
fields.put(entry.getKey(),
new BField(getImmutableType(originalField.getFieldType(), unresolvedTypes),
originalField.getFieldName(), originalField.getFlags()));
new BField(getImmutableType(originalField.getFieldType(), unresolvedTypes),
originalField.getFieldName(), originalField.getFlags() | SymbolFlags.READONLY));
}

BRecordType immutableRecordType = new BRecordType(
Expand Down

0 comments on commit 65f4a2e

Please sign in to comment.