[FIR] Fix tests (ARGUMENT_TYPE_MISMATCH instead of INCOMPATIBLE_CANDIDATE)
This commit is contained in:
committed by
TeamCityServer
parent
4ffab5fe5a
commit
ad9b962536
Vendored
+2
-2
@@ -25,7 +25,7 @@ class E<T> {
|
||||
// selection of the proper constructor
|
||||
// but a type mismatch for the first
|
||||
// argument
|
||||
constructor(e: T, i: Int) : <!INAPPLICABLE_CANDIDATE!>this<!>(i, 10) {}
|
||||
constructor(e: T, i: Int) : this(<!ARGUMENT_TYPE_MISMATCH!>i<!>, 10) {}
|
||||
}
|
||||
|
||||
class I<T> {
|
||||
@@ -33,7 +33,7 @@ class I<T> {
|
||||
// selection of the proper constructor
|
||||
// but a type mismatch for the first
|
||||
// argument
|
||||
constructor(e: T, i: Int) : <!INAPPLICABLE_CANDIDATE!>this<!>(i, 10)
|
||||
constructor(e: T, i: Int) : this(<!ARGUMENT_TYPE_MISMATCH!>i<!>, 10)
|
||||
}
|
||||
|
||||
class J<T> {
|
||||
|
||||
+2
-2
@@ -7,9 +7,9 @@ class A {
|
||||
class B(other: B = <!NO_THIS!>this<!>)
|
||||
|
||||
class C() {
|
||||
constructor(x: Int) : <!INAPPLICABLE_CANDIDATE!>this<!>({
|
||||
constructor(x: Int) : this({
|
||||
val a = 10
|
||||
<!INSTANCE_ACCESS_BEFORE_SUPER_CALL!>this<!>
|
||||
<!ARGUMENT_TYPE_MISMATCH, INSTANCE_ACCESS_BEFORE_SUPER_CALL!>this<!>
|
||||
}) {}
|
||||
}
|
||||
|
||||
|
||||
@@ -62,8 +62,8 @@ fun <T> test2(t : T)
|
||||
t.bar()
|
||||
}
|
||||
|
||||
val t1 = <!INAPPLICABLE_CANDIDATE!>test2<!><A>(A())
|
||||
val t2 = <!INAPPLICABLE_CANDIDATE!>test2<!><B>(C())
|
||||
val t1 = test2<A>(<!ARGUMENT_TYPE_MISMATCH!>A()<!>)
|
||||
val t2 = test2<B>(<!ARGUMENT_TYPE_MISMATCH!>C()<!>)
|
||||
val t3 = test2<C>(C())
|
||||
|
||||
val <T, B : T> x : Int = 0
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ class G<E : <!FINAL_UPPER_BOUND!>Double<!>>(val balue: E) : F<E>(balue) {
|
||||
override var rest: E = balue
|
||||
}
|
||||
|
||||
class H<E : <!FINAL_UPPER_BOUND!>String<!>>(val balue: E) : <!INAPPLICABLE_CANDIDATE!>F<E><!>(balue) {
|
||||
class H<E : <!FINAL_UPPER_BOUND!>String<!>>(val balue: E) : F<E>(<!ARGUMENT_TYPE_MISMATCH!>balue<!>) {
|
||||
override var rest: E = balue // no report because of INAPPLICABLE_CANDIDATE
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ class G<E : <!FINAL_UPPER_BOUND!>Double<!>>(val balue: E) : F<E>(balue) {
|
||||
override fun rest(): E = balue
|
||||
}
|
||||
|
||||
class H<E : <!FINAL_UPPER_BOUND!>String<!>>(val balue: E) : <!INAPPLICABLE_CANDIDATE!>F<E><!>(balue) {
|
||||
class H<E : <!FINAL_UPPER_BOUND!>String<!>>(val balue: E) : F<E>(<!ARGUMENT_TYPE_MISMATCH!>balue<!>) {
|
||||
override fun rest(): E = balue // no report because of INAPPLICABLE_CANDIDATE
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -22,7 +22,7 @@ FILE: upperBoundViolated.kt
|
||||
lval b1: R|B<kotlin/Int>| = R|/B.B|<R|kotlin/Int|>()
|
||||
lval b2: R|B<C>| = R|/B.B|<R|C|>()
|
||||
lval b3: R|B<kotlin/Any?>| = R|/B.B|<R|kotlin/Any?|>()
|
||||
lval b4: R|B<A>| = R|/B.B|<<ERROR TYPE REF: Symbol not found for UnexistingType>>()
|
||||
lval b4: R|ERROR CLASS: Unresolved name: NumberPhile| = R|/B.B|<<ERROR TYPE REF: Symbol not found for UnexistingType>>().<Unresolved name: NL>#(ERROR_EXPR(No right operand)).<Unresolved name: Int>#(<Call has no callee>#()).<Unresolved name: NumberPhile>#(ERROR_EXPR(No right operand))
|
||||
lval b5: R|B<B<ERROR CLASS: Symbol not found for UnexistingType>>| = R|/B.B|<R|B<ERROR CLASS: Symbol not found for UnexistingType>|>()
|
||||
R|/fest|<R|kotlin/Boolean|>()
|
||||
R|/fest|<R|C|>()
|
||||
@@ -58,8 +58,8 @@ FILE: upperBoundViolated.kt
|
||||
|
||||
}
|
||||
public final typealias NL<K> = R|NumColl<kotlin/collections/List<K>>|
|
||||
public final val test7: R|NumColl<kotlin/collections/List<kotlin/Int>>| = R|/NumColl.NumColl|<R|kotlin/Int|>()
|
||||
public get(): R|NumColl<kotlin/collections/List<kotlin/Int>>|
|
||||
public final val test7: R|ERROR CLASS: Unresolved name: NumberPhile| = R|/NumColl.NumColl|<R|kotlin/Int|>().<Unresolved name: NumberPhile>#(ERROR_EXPR(No right operand))
|
||||
public get(): R|ERROR CLASS: Unresolved name: NumberPhile|
|
||||
public final val test8: R|NumColl<kotlin/collections/List<kotlin/String>>| = R|/NumColl.NumColl|<R|kotlin/String|>()
|
||||
public get(): R|NumColl<kotlin/collections/List<kotlin/String>>|
|
||||
public final class NumberPhile<T : R|kotlin/Number|> : R|kotlin/Any| {
|
||||
@@ -70,5 +70,5 @@ FILE: upperBoundViolated.kt
|
||||
}
|
||||
public final val np1: R|NumberPhile<kotlin/Int>| = R|/NumberPhile.NumberPhile|<R|kotlin/Int|>(Int(10))
|
||||
public get(): R|NumberPhile<kotlin/Int>|
|
||||
public final val np2: R|NumberPhile<kotlin/String>| = <Inapplicable(INAPPLICABLE): /NumberPhile.NumberPhile>#<R|kotlin/String|>(String(Test))
|
||||
public get(): R|NumberPhile<kotlin/String>|
|
||||
public final val np2: R|NumberPhile<kotlin/Number>| = <Inapplicable(INAPPLICABLE): /NumberPhile.NumberPhile>#<R|kotlin/Number|>(String(Test))
|
||||
public get(): R|NumberPhile<kotlin/Number>|
|
||||
|
||||
+3
-3
@@ -14,7 +14,7 @@ fun test() {
|
||||
val b1 = B<<!UPPER_BOUND_VIOLATED!>Int<!>>()
|
||||
val b2 = B<C>()
|
||||
val b3 = B<<!UPPER_BOUND_VIOLATED!>Any?<!>>()
|
||||
val b4 = B<<!UNRESOLVED_REFERENCE!>UnexistingType<!>>()
|
||||
val b4 = B<<!UNRESOLVED_REFERENCE!>UnexistingType<!>>()<!UNRESOLVED_REFERENCE{PSI}!>NL<!><!SYNTAX{PSI}!><<!>Int<!SYNTAX{PSI}!>><!>()NumberPhile<!SYNTAX{PSI}!><!>
|
||||
val b5 = B<<!UPPER_BOUND_VIOLATED!>B<<!UNRESOLVED_REFERENCE!>UnexistingType<!>><!>>()
|
||||
fest<<!UPPER_BOUND_VIOLATED!>Boolean<!>>()
|
||||
fest<C>()
|
||||
@@ -40,9 +40,9 @@ fun <K, L : K> rest() {
|
||||
|
||||
class NumColl<T : Collection<Number>>
|
||||
typealias NL<K> = NumColl<List<K>>
|
||||
val test7 = NL<Int>()
|
||||
val test7 = NL<Int>()<!UNRESOLVED_REFERENCE{PSI}!>NumberPhile<!><!SYNTAX{PSI}!><!>
|
||||
val test8 = NL<String>()
|
||||
|
||||
class NumberPhile<T: Number>(x: T)
|
||||
val np1 = NumberPhile(10)
|
||||
val np2 = <!INAPPLICABLE_CANDIDATE!>NumberPhile<!>("Test")
|
||||
val np2 = NumberPhile(<!ARGUMENT_TYPE_MISMATCH!>"Test"<!>)
|
||||
|
||||
Reference in New Issue
Block a user