Skip to content

Commit

Permalink
Merge pull request #43540 from HindujaB/fix-typecast-record-field
Browse files Browse the repository at this point in the history
[2201.9.x] Fix typecast error thrown for default record field
  • Loading branch information
warunalakshitha authored Nov 2, 2024
2 parents 5017754 + 31109b6 commit 3ed166d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,8 @@ public void setTypeForcefully(Type type) {

protected void populateInitialValues(BMapInitialValueEntry[] initialValues) {
Map<String, BFunctionPointer<Object, ?>> defaultValues = new HashMap<>();
if (type.getTag() == TypeTags.RECORD_TYPE_TAG) {
defaultValues.putAll(((BRecordType) type).getDefaultValues());
if (referredType.getTag() == TypeTags.RECORD_TYPE_TAG) {
defaultValues.putAll(((BRecordType) referredType).getDefaultValues());
}

for (BMapInitialValueEntry initialValue : initialValues) {
Expand Down

0 comments on commit 3ed166d

Please sign in to comment.