Unexpected appearance of minOf/maxOf for T: Comparable<T> in smart completion tests

This commit is contained in:
Ilya Gorbunov
2016-12-28 22:05:01 +03:00
parent 18245c5b73
commit eb07d9407d
4 changed files with 24 additions and 0 deletions
@@ -14,5 +14,11 @@ fun bar() {
// EXIST: { itemText: "object: C1<...>(){...}" }
// EXIST: { itemText: "object: C2(){...}" }
// EXIST: { itemText: "object: C3(){...}" }
// all these items shouldn't be proposed, see KT-15479
// EXIST: { itemText: "enumValueOf" }
// EXIST: { itemText: "maxOf", tailText: "(a: T, b: T) (kotlin.comparisons)" }
// EXIST: { itemText: "maxOf", tailText: "(a: T, b: T, c: T) (kotlin.comparisons)" }
// EXIST: { itemText: "minOf", tailText: "(a: T, b: T) (kotlin.comparisons)" }
// EXIST: { itemText: "minOf", tailText: "(a: T, b: T, c: T) (kotlin.comparisons)" }
// NOTHING_ELSE
@@ -15,5 +15,11 @@ fun bar() {
// EXIST: { itemText: "object: C1<...>(){...}" }
// EXIST: { itemText: "object: C2(){...}" }
// EXIST: { itemText: "object: C4<String>(){...}" }
// all these items shouldn't be proposed, see KT-15479
// EXIST: { itemText: "enumValueOf" }
// EXIST: { itemText: "maxOf", tailText: "(a: T, b: T) (kotlin.comparisons)" }
// EXIST: { itemText: "maxOf", tailText: "(a: T, b: T, c: T) (kotlin.comparisons)" }
// EXIST: { itemText: "minOf", tailText: "(a: T, b: T) (kotlin.comparisons)" }
// EXIST: { itemText: "minOf", tailText: "(a: T, b: T, c: T) (kotlin.comparisons)" }
// NOTHING_ELSE
@@ -10,5 +10,11 @@ fun bar() {
// EXIST: { itemText: "object: I<...>{...}" }
// EXIST: { itemText: "object: C<...>(){...}" }
// all these items shouldn't be proposed, see KT-15479
// EXIST: { itemText: "enumValueOf" }
// EXIST: { itemText: "maxOf", tailText: "(a: T, b: T) (kotlin.comparisons)" }
// EXIST: { itemText: "maxOf", tailText: "(a: T, b: T, c: T) (kotlin.comparisons)" }
// EXIST: { itemText: "minOf", tailText: "(a: T, b: T) (kotlin.comparisons)" }
// EXIST: { itemText: "minOf", tailText: "(a: T, b: T, c: T) (kotlin.comparisons)" }
// NOTHING_ELSE
@@ -17,5 +17,11 @@ fun bar() {
// EXIST: { itemText: "object: I<...>{...}" }
// EXIST: { itemText: "object: C1<X>(){...}" }
// EXIST: { itemText: "object: C2(){...}" }
// all these items shouldn't be proposed, see KT-15479
// EXIST: { itemText: "enumValueOf" }
// EXIST: { itemText: "maxOf", tailText: "(a: T, b: T) (kotlin.comparisons)" }
// EXIST: { itemText: "maxOf", tailText: "(a: T, b: T, c: T) (kotlin.comparisons)" }
// EXIST: { itemText: "minOf", tailText: "(a: T, b: T) (kotlin.comparisons)" }
// EXIST: { itemText: "minOf", tailText: "(a: T, b: T, c: T) (kotlin.comparisons)" }
// NOTHING_ELSE