Kotlin extractor: use special <nulltype> for null literals

This matches the Java extractor's treatment of these literals, and so enables dataflow type-tracking to avoid special-casing Kotlin. Natively, Kotlin would regard this as kotlin.Nothing?, the type that can only contain null (kotlin.Nothing without a ? can take nothing at all), which gets Java-ified as java.lang.Void, and this will continue to be used when a null type has to be "boxed", as in representing substituted generic constraints with no possible type.
This commit is contained in:
Chris Smowton
2024-11-01 16:14:04 +00:00
parent cec0544ca5
commit 5d3f723df9
3 changed files with 12 additions and 5 deletions

View File

@@ -45,9 +45,9 @@
| generic_anonymous.kt:13:27:13:47 | get(...) | int |
| generic_anonymous.kt:13:40:13:40 | i | int |
| generic_anonymous.kt:17:9:17:29 | T0 | T0 |
| generic_anonymous.kt:17:26:17:29 | null | Void |
| generic_anonymous.kt:17:26:17:29 | null | <nulltype> |
| generic_anonymous.kt:21:9:21:29 | T1 | T1 |
| generic_anonymous.kt:21:26:21:29 | null | Void |
| generic_anonymous.kt:21:26:21:29 | null | <nulltype> |
| generic_anonymous.kt:24:5:32:5 | Unit | Unit |
| generic_anonymous.kt:25:9:31:9 | Unit | Unit |
| generic_anonymous.kt:26:13:26:37 | <Stmt> | new Object(...) { ... } |