Tests: add runtime (and runtime sources) to some tests that rely on being able to resolve references to built ins
This commit is contained in:
Vendored
+1
@@ -2,6 +2,7 @@
|
||||
// ACTION: Create extension function 'Foo'
|
||||
// ACTION: Rename reference
|
||||
// ERROR: Unresolved reference: Foo
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun test() {
|
||||
val a = 2.<caret>Foo(1)
|
||||
|
||||
Vendored
+1
@@ -2,6 +2,7 @@
|
||||
// ACTION: Create extension function 'Foo'
|
||||
// ACTION: Rename reference
|
||||
// ERROR: Unresolved reference: Foo
|
||||
// WITH_RUNTIME
|
||||
|
||||
class A<T>(val items: List<T>) {
|
||||
fun test() = items.<caret>Foo<Int, String>(2, "2")
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// "Create extension function 'plus'" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
class A<T>(val n: T)
|
||||
|
||||
|
||||
Vendored
+1
@@ -1,4 +1,5 @@
|
||||
// "Create extension function 'plus'" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
class A<T>(val n: T)
|
||||
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// "Create extension function '!u00A0'" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun test() {
|
||||
val t: Int = 1 <caret>`!u00A0` 2
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// "Create extension function '!u00A0'" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun test() {
|
||||
val t: Int = 1 `!u00A0` 2
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// "Create extension function 'foo'" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun test() {
|
||||
val a: Int = Unit.<caret>foo(2)
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// "Create extension function 'foo'" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun test() {
|
||||
val a: Int = Unit.foo(2)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// "Create extension function 'foo'" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
class A<T>(val n: T)
|
||||
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// "Create extension function 'foo'" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
class A<T>(val n: T)
|
||||
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// "Create extension function 'foo'" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
class A<T>(val items: List<T>) {
|
||||
fun test(): Int {
|
||||
|
||||
Vendored
+1
@@ -1,4 +1,5 @@
|
||||
// "Create extension function 'foo'" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
class A<T>(val items: List<T>) {
|
||||
fun test(): Int {
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// "Create extension function 'foo'" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
class A<T>(val items: List<T>) {
|
||||
fun test(): Int {
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// "Create extension function 'foo'" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
class A<T>(val items: List<T>) {
|
||||
fun test(): Int {
|
||||
|
||||
idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments/extensionWithReceiverArg.kt
Vendored
+1
@@ -1,4 +1,5 @@
|
||||
// "Create extension function 'foo'" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
class A<T>(val items: List<T>) {
|
||||
fun test(): Int {
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// "Create extension function 'foo'" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
class A<T>(val items: List<T>) {
|
||||
fun test(): Int {
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// "Create extension function 'foo'" "true"
|
||||
// WITH_RUNTIME
|
||||
fun <T, U> T.map(f: T.() -> U) = f()
|
||||
|
||||
fun consume(s: String) {}
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// "Create extension function 'foo'" "true"
|
||||
// WITH_RUNTIME
|
||||
fun <T, U> T.map(f: T.() -> U) = f()
|
||||
|
||||
fun consume(s: String) {}
|
||||
|
||||
Vendored
+1
@@ -1,4 +1,5 @@
|
||||
// "Create extension function 'component2'" "true"
|
||||
// WITH_RUNTIME
|
||||
class FooIterator<T> {
|
||||
operator fun hasNext(): Boolean { return false }
|
||||
operator fun next(): Any {
|
||||
|
||||
Vendored
+1
@@ -1,4 +1,5 @@
|
||||
// "Create extension function 'component2'" "true"
|
||||
// WITH_RUNTIME
|
||||
class FooIterator<T> {
|
||||
operator fun hasNext(): Boolean { return false }
|
||||
operator fun next(): Any {
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// "Create extension function 'get'" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun x (y: Any) {
|
||||
val z: Any = y<caret>[""]
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// "Create extension function 'get'" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun x (y: Any) {
|
||||
val z: Any = y[""]
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// "Create extension function 'invoke'" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
class A<T>(val n: T)
|
||||
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// "Create extension function 'invoke'" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
class A<T>(val n: T)
|
||||
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// "Create extension function 'set'" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
class Foo<T> {
|
||||
fun <T> x (y: Any, w: java.util.ArrayList<T>) {
|
||||
|
||||
+1
@@ -1,6 +1,7 @@
|
||||
import java.util.ArrayList
|
||||
|
||||
// "Create extension function 'set'" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
class Foo<T> {
|
||||
fun <T> x (y: Any, w: java.util.ArrayList<T>) {
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// "Create extension function 'unaryMinus'" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun test() {
|
||||
val a = <caret>-false
|
||||
|
||||
Vendored
+1
@@ -1,4 +1,5 @@
|
||||
// "Create extension function 'unaryMinus'" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun test() {
|
||||
val a = -false
|
||||
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
// "Create secondary constructor" "false"
|
||||
// ERROR: Too many arguments for public constructor Any() defined in kotlin.Any
|
||||
// WITH_RUNTIME
|
||||
|
||||
interface T {
|
||||
|
||||
|
||||
+1
@@ -2,6 +2,7 @@
|
||||
// ERROR: Unresolved reference: foo
|
||||
// ACTION: Create extension function 'foo'
|
||||
// ACTION: Replace infix call with ordinary call
|
||||
// WITH_RUNTIME
|
||||
fun refer() {
|
||||
1 <caret>foo 2
|
||||
}
|
||||
+1
@@ -2,6 +2,7 @@
|
||||
// ERROR: Unresolved reference: foo
|
||||
// ACTION: Create extension function 'foo'
|
||||
// ACTION: Replace infix call with ordinary call
|
||||
// WITH_RUNTIME
|
||||
fun refer() {
|
||||
1 <caret>foo 2
|
||||
}
|
||||
+1
@@ -2,6 +2,7 @@
|
||||
// ACTION: Create extension property 'foo'
|
||||
// ACTION: Rename reference
|
||||
// ERROR: Unresolved reference: foo
|
||||
// WITH_RUNTIME
|
||||
|
||||
class A<T>(val n: T)
|
||||
|
||||
|
||||
+1
@@ -2,6 +2,7 @@
|
||||
// ERROR: Unresolved reference: foo
|
||||
// ACTION: Create extension function 'foo'
|
||||
// ACTION: Replace infix call with ordinary call
|
||||
// WITH_RUNTIME
|
||||
fun refer() {
|
||||
1 <caret>foo 2
|
||||
}
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
// "Create extension property 'foo'" "true"
|
||||
// ERROR: Property must be initialized
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun test() {
|
||||
val a: Int = Unit.<caret>foo
|
||||
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
// "Create extension property 'foo'" "true"
|
||||
// ERROR: Property must be initialized
|
||||
// WITH_RUNTIME
|
||||
|
||||
val Unit.foo: Int
|
||||
|
||||
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
// "Create extension property 'foo'" "true"
|
||||
// ERROR: Property must be initialized
|
||||
// WITH_RUNTIME
|
||||
|
||||
class A<T>(val n: T)
|
||||
|
||||
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
// "Create extension property 'foo'" "true"
|
||||
// ERROR: Property must be initialized
|
||||
// WITH_RUNTIME
|
||||
|
||||
class A<T>(val n: T)
|
||||
|
||||
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
// "Create extension property 'foo'" "true"
|
||||
// ERROR: Property must be initialized
|
||||
// WITH_RUNTIME
|
||||
|
||||
class A<T>(val n: T)
|
||||
|
||||
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
// "Create extension property 'foo'" "true"
|
||||
// ERROR: Property must be initialized
|
||||
// WITH_RUNTIME
|
||||
|
||||
class A<T>(val n: T)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user