Skip to content

Commit

Permalink
Fix issue with intersection of readonly and record type with defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
chiranSachintha committed Apr 9, 2024
1 parent e75f1c8 commit 9d3af26
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2738,7 +2738,7 @@ private boolean validateSpecifiedFields(BLangRecordLiteral mappingConstructor, B

private void determineDefaultValues(Map<String, BType> typesOfDefaultValues, BRecordType mutableType,
AnalyzerData data) {
if (mutableType.tsymbol == null || mutableType.tsymbol.pkgID == PackageID.DEFAULT) {
if (mutableType.tsymbol == null || mutableType.tsymbol.pkgID == data.env.enclPkg.packageID) {
// TODO: Eliminate the need for this logic by addressing the issue identified in #41764.
findDefaultValuesFromEnclosingPackage(data.env.enclPkg.typeDefinitions, mutableType, data,
typesOfDefaultValues);
Expand Down

0 comments on commit 9d3af26

Please sign in to comment.