Skip to content

Fix list element mapping, add test coverage, and split test files#12

Merged
wilmveel merged 1 commit intomainfrom
fix/binary-dependency-field-resolution
Mar 25, 2026
Merged

Fix list element mapping, add test coverage, and split test files#12
wilmveel merged 1 commit intomainfrom
fix/binary-dependency-field-resolution

Conversation

@wilmveel
Copy link
Copy Markdown
Contributor

@wilmveel wilmveel commented Mar 24, 2026

Summary

  • Fix list element mapping: Generate list.map { } IR calls when list element types differ, fixing a bug where List<SourceItem>List<TargetItem> passed elements through without transformation (e.g. value class unwrap in list elements)
  • Add comprehensive test coverage: 12 new tests covering all missing widening conversions (Byte→Short/Int/Float/Double, Short→Long/Float/Double, Int→Float, Long→Float/Double) and value class edge cases (unwrap in nested, unwrap in list)
  • Split test file: Refactor monolithic KMapperTest.kt (52 tests) into 6 focused files: BasicMappingTest, NullableAndDefaultsTest, EnumMappingTest, ListMappingTest, NumericWideningTest, ValueClassTest

Test plan

  • All 52 integration tests pass
  • All compiler-plugin tests pass
  • New list element mapping verified with value class unwrap in list
  • Existing complexList test now correctly asserts AccountDto instead of Account
  • Companion invoke tests from main preserved in ValueClassTest

🤖 Generated with Claude Code

Generate list.map { } calls in IR when list element types differ,
fixing a bug where List<SourceItem> → List<TargetItem> passed elements
through without transformation. Also adds missing test cases from the
implicit mappings spec (widening + value class edge cases) and splits
the monolithic KMapperTest into 6 focused test files.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@wilmveel wilmveel force-pushed the fix/binary-dependency-field-resolution branch from 3d055b3 to 36a23a6 Compare March 24, 2026 12:09
@wilmveel wilmveel changed the title Fix binary dependency field resolution, list mapping, and test coverage Fix list element mapping, add test coverage, and split test files Mar 24, 2026
@wilmveel wilmveel merged commit 0513fb4 into main Mar 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant