KT-69481: Added tests for RTTIGenerator.mapRuntimeType pointer distinction #5657
+85
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
YouTrack link: https://youtrack.jetbrains.com/issue/KT-69481/Native-add-tests-for-distinguishing-reference-and-pointers-in-RTTGenerator.mapRuntimeType
Add codegen test verifying that mapRuntimeType correctly distinguishes Kotlin object references (RT_OBJECT) from raw C pointers (RT_NATIVE_PTR) when both are represented as
ptrin LLVM with opaque pointers.The test creates classes with mixed CPointer and Kotlin object fields, then verifies GC correctly traces object references without crashing on raw pointers.