Fix primitive types mapping

Use boxed version if type was enhaced to not-nullable
This commit is contained in:
Denis Zharkov
2016-02-05 11:17:39 +03:00
parent 68110f5859
commit c879f83037
7 changed files with 21 additions and 5 deletions
@@ -42,6 +42,8 @@ import org.jetbrains.kotlin.utils.toReadOnlyList
// For flexible types, both bounds are indexed in the same way: `(A<B>..C<D>)` gives `0 - (A<B>..C<D>), 1 - B and D`.
fun KotlinType.enhance(qualifiers: (Int) -> JavaTypeQualifiers) = this.enhancePossiblyFlexible(qualifiers, 0).typeIfChanged
fun KotlinType.hasEnhancedNullability()
= annotations.findAnnotation(JvmAnnotationNames.ENHANCED_NULLABILITY_ANNOTATION) != null
private enum class TypeComponentPosition {
FLEXIBLE_LOWER,