[FIR] Add constraint to flexible type for declared argument for java parameter

This commit is contained in:
Dmitriy Novozhilov
2020-03-25 18:04:19 +03:00
parent 3acb64c536
commit 48fb279721
24 changed files with 79 additions and 58 deletions
@@ -1,21 +1,21 @@
FILE fqName:<root> fileName:/javaConstructorWithTypeParameters.kt
FUN name:test1 visibility:public modality:FINAL <> () returnType:<root>.J1<kotlin.Int>
FUN name:test1 visibility:public modality:FINAL <> () returnType:<root>.J1<kotlin.Int?>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test1 (): <root>.J1<kotlin.Int> declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.J1' type=<root>.J1<kotlin.Int> origin=null
<class: T1>: kotlin.Int
FUN name:test2 visibility:public modality:FINAL <> () returnType:<root>.J1<kotlin.Int>
RETURN type=kotlin.Nothing from='public final fun test1 (): <root>.J1<kotlin.Int?> declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.J1' type=<root>.J1<kotlin.Int?> origin=null
<class: T1>: kotlin.Int?
FUN name:test2 visibility:public modality:FINAL <> () returnType:<root>.J1<kotlin.Int?>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test2 (): <root>.J1<kotlin.Int> declared in <root>'
ERROR_EXPR 'Cannot bind 2 type arguments to ??? call with 1 type parameters' type=<root>.J1<kotlin.Int>
FUN name:test3 visibility:public modality:FINAL <> (j1:<root>.J1<kotlin.Any>) returnType:<root>.J1.J2<kotlin.Int>
RETURN type=kotlin.Nothing from='public final fun test2 (): <root>.J1<kotlin.Int?> declared in <root>'
ERROR_EXPR 'Cannot bind 2 type arguments to ??? call with 1 type parameters' type=<root>.J1<kotlin.Int?>
FUN name:test3 visibility:public modality:FINAL <> (j1:<root>.J1<kotlin.Any>) returnType:<root>.J1.J2<kotlin.Int?>
VALUE_PARAMETER name:j1 index:0 type:<root>.J1<kotlin.Any>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test3 (j1: <root>.J1<kotlin.Any>): <root>.J1.J2<kotlin.Int> declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.J1.J2' type=<root>.J1.J2<kotlin.Int> origin=null
<class: T2>: kotlin.Int
FUN name:test4 visibility:public modality:FINAL <> (j1:<root>.J1<kotlin.Any>) returnType:<root>.J1.J2<kotlin.Int>
RETURN type=kotlin.Nothing from='public final fun test3 (j1: <root>.J1<kotlin.Any>): <root>.J1.J2<kotlin.Int?> declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.J1.J2' type=<root>.J1.J2<kotlin.Int?> origin=null
<class: T2>: kotlin.Int?
FUN name:test4 visibility:public modality:FINAL <> (j1:<root>.J1<kotlin.Any>) returnType:<root>.J1.J2<kotlin.Int?>
VALUE_PARAMETER name:j1 index:0 type:<root>.J1<kotlin.Any>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test4 (j1: <root>.J1<kotlin.Any>): <root>.J1.J2<kotlin.Int> declared in <root>'
ERROR_EXPR 'Cannot bind 2 type arguments to ??? call with 1 type parameters' type=<root>.J1.J2<kotlin.Int>
RETURN type=kotlin.Nothing from='public final fun test4 (j1: <root>.J1<kotlin.Any>): <root>.J1.J2<kotlin.Int?> declared in <root>'
ERROR_EXPR 'Cannot bind 2 type arguments to ??? call with 1 type parameters' type=<root>.J1.J2<kotlin.Int?>