KT-64205 [AA] Rearrange testData for reference shortener

Get rid of `referenceShortener/referenceShortener` nested directory
This commit is contained in:
Roman Golyshev
2023-12-13 17:18:01 +02:00
committed by teamcity
parent 21b7405435
commit 146d93a044
355 changed files with 394 additions and 394 deletions
@@ -0,0 +1,5 @@
package some
annotation class SomeAnnotation
class Complete(@set:<expr>some.SomeAnnotation</expr> var field: Int)
@@ -0,0 +1,8 @@
Before shortening: some.SomeAnnotation
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
[type] some.SomeAnnotation
with SHORTEN_AND_IMPORT:
[type] some.SomeAnnotation
with SHORTEN_AND_STAR_IMPORT:
[type] some.SomeAnnotation
@@ -0,0 +1,9 @@
// FILE: main.kt
package test
val anonymous = <expr>@dependency.Ann</expr> fun() {}
// FILE: dependency.kt
package dependency
annotation class Ann
@@ -0,0 +1,7 @@
Before shortening: @dependency.Ann
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
with SHORTEN_AND_IMPORT:
[type] dependency.Ann
with SHORTEN_AND_STAR_IMPORT:
[type] dependency.Ann
@@ -0,0 +1,9 @@
// FILE: main.kt
package test
val anonymous = fun <expr>dependency.Type</expr>.() {}
// FILE: dependency.kt
package dependency
class Type
@@ -0,0 +1,7 @@
Before shortening: dependency.Type
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
with SHORTEN_AND_IMPORT:
[type] dependency.Type
with SHORTEN_AND_STAR_IMPORT:
[type] dependency.Type
@@ -0,0 +1,9 @@
// FILE: main.kt
package test
val anonymous = fun(): <expr>dependency.Type</expr> = dependency.Type()
// FILE: dependency.kt
package dependency
class Type
@@ -0,0 +1,7 @@
Before shortening: dependency.Type
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
with SHORTEN_AND_IMPORT:
[type] dependency.Type
with SHORTEN_AND_STAR_IMPORT:
[type] dependency.Type
@@ -0,0 +1,16 @@
package one
class A
class B
fun foo(a: () -> Unit) {
}
foo {
<expr>one.A</expr>
}
foo {
one.B
}
@@ -0,0 +1,8 @@
Before shortening: one.A
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
[qualifier] one.A
with SHORTEN_AND_IMPORT:
[qualifier] one.A
with SHORTEN_AND_STAR_IMPORT:
[qualifier] one.A
@@ -0,0 +1,4 @@
// WITH_STDLIB
// FILE: main.kt
fun test() = <expr>kotlin.text.charset("")</expr>
@@ -0,0 +1,8 @@
Before shortening: kotlin.text.charset("")
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
[qualifier] kotlin.text.charset("")
with SHORTEN_AND_IMPORT:
[qualifier] kotlin.text.charset("")
with SHORTEN_AND_STAR_IMPORT:
[qualifier] kotlin.text.charset("")
@@ -0,0 +1,7 @@
// WITH_STDLIB
// FILE: main.kt
import java.nio.charset.Charset
fun charset(charsetName: String): Charset = Charset.forName(charsetName)
fun test() = <expr>kotlin.text.charset("")</expr>
@@ -0,0 +1,5 @@
Before shortening: kotlin.text.charset("")
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
with SHORTEN_AND_IMPORT:
with SHORTEN_AND_STAR_IMPORT:
@@ -0,0 +1,13 @@
// FILE: main.kt
package a.b.c
fun foo() {}
fun test() {
<expr>dependency.foo()</expr>
}
// FILE: dependency.kt
package dependency
fun foo() {}
@@ -0,0 +1,6 @@
Before shortening: dependency.foo()
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
with SHORTEN_AND_IMPORT:
[qualifier] dependency.foo()
with SHORTEN_AND_STAR_IMPORT:
@@ -0,0 +1,22 @@
// FILE: main.kt
package my.simple.name
open class SuperClass {
companion object {
fun check() {}
}
}
class Child: SuperClass {
class Foo constructor() {
constructor(i: Int) : this()
fun foo() {
<expr>my.simple.name.SuperClass.check()</expr>
}
companion object {
fun check() {}
}
}
}
@@ -0,0 +1,8 @@
Before shortening: my.simple.name.SuperClass.check()
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
[qualifier] my.simple.name.SuperClass
with SHORTEN_AND_IMPORT:
[qualifier] my.simple.name.SuperClass
with SHORTEN_AND_STAR_IMPORT:
[qualifier] my.simple.name.SuperClass
@@ -0,0 +1,22 @@
// FILE: main.kt
package my.simple.name
open class SuperClass {
companion object {
fun check() {}
}
}
class Child: SuperClass {
class Foo constructor() {
constructor(i: Int) : this()
fun foo() {
<expr>Child.Foo.check()</expr>
}
companion object {
fun check() {}
}
}
}
@@ -0,0 +1,8 @@
Before shortening: Child.Foo.check()
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
[qualifier] Child.Foo.check()
with SHORTEN_AND_IMPORT:
[qualifier] Child.Foo.check()
with SHORTEN_AND_STAR_IMPORT:
[qualifier] Child.Foo.check()
@@ -0,0 +1,28 @@
// FILE: main.kt
package my.simple.name
class ClassFarAway {
companion object {
fun check() {}
}
}
open class SuperClass {
companion object {
fun check() {}
}
}
class Child: SuperClass {
class Foo constructor() {
constructor(i: Int) : this()
fun foo() {
<expr>my.simple.name.ClassFarAway.check()</expr>
}
companion object {
fun check() {}
}
}
}
@@ -0,0 +1,8 @@
Before shortening: my.simple.name.ClassFarAway.check()
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
[qualifier] my.simple.name.ClassFarAway
with SHORTEN_AND_IMPORT:
[qualifier] my.simple.name.ClassFarAway
with SHORTEN_AND_STAR_IMPORT:
[qualifier] my.simple.name.ClassFarAway
@@ -0,0 +1,13 @@
// FILE: main.kt
package a.b.c
class Outer {
class Inner {
companion object {
}
}
}
fun foo(): Class<*> {
return <expr>a.b.c.Outer.Inner::class.java</expr>
}
@@ -0,0 +1,8 @@
Before shortening: a.b.c.Outer.Inner::class.java
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
[qualifier] a.b.c.Outer
with SHORTEN_AND_IMPORT:
[qualifier] a.b.c.Outer.Inner
with SHORTEN_AND_STAR_IMPORT:
[qualifier] a.b.c.Outer.Inner
@@ -0,0 +1,12 @@
// FILE: main.kt
package a.b.c
class Outer {
class Middle {
class Inner {
fun foo(): Class<*> {
return <expr>a.b.c.Outer.Middle.Inner::class.java</expr>
}
}
}
}
@@ -0,0 +1,8 @@
Before shortening: a.b.c.Outer.Middle.Inner::class.java
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
[qualifier] a.b.c.Outer.Middle.Inner
with SHORTEN_AND_IMPORT:
[qualifier] a.b.c.Outer.Middle.Inner
with SHORTEN_AND_STAR_IMPORT:
[qualifier] a.b.c.Outer.Middle.Inner
@@ -0,0 +1,3 @@
// WITH_STDLIB
// FILE: main.kt
fun other() : <expr>java.util.SortedSet</expr>
@@ -0,0 +1,7 @@
Before shortening: java.util.SortedSet
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
with SHORTEN_AND_IMPORT:
[type] java.util.SortedSet
with SHORTEN_AND_STAR_IMPORT:
[type] java.util.SortedSet
@@ -0,0 +1,14 @@
// FILE: main.kt
package a.b.c
class Outer {
class Inner {
companion object {
}
}
}
fun foo(): Class<*> {
class Outer
return <expr>a.b.c.Outer.Inner::class.java</expr>
}
@@ -0,0 +1,7 @@
Before shortening: a.b.c.Outer.Inner::class.java
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
with SHORTEN_AND_IMPORT:
[qualifier] a.b.c.Outer.Inner
with SHORTEN_AND_STAR_IMPORT:
[qualifier] a.b.c.Outer.Inner
@@ -0,0 +1,8 @@
// FILE: main.kt
class SortedSet
fun test() {
val a = <expr>java.util.SortedSet</expr>
}
fun foo(set: SortedSet)
@@ -0,0 +1,5 @@
Before shortening: java.util.SortedSet
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
with SHORTEN_AND_IMPORT:
with SHORTEN_AND_STAR_IMPORT:
@@ -0,0 +1,6 @@
// FILE: main.kt
class SortedSet
fun test() {
val a = <expr>java.util.SortedSet</expr>
}
@@ -0,0 +1,6 @@
Before shortening: java.util.SortedSet
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
with SHORTEN_AND_IMPORT:
[qualifier] java.util.SortedSet
with SHORTEN_AND_STAR_IMPORT:
@@ -0,0 +1,13 @@
// FILE: main.kt
package a.b.c
class Outer {
class Inner {
fun foo(): Class<*> {
class Outer
return <expr>a.b.c.Outer.Inner::class.java</expr>
}
companion object {
}
}
}
@@ -0,0 +1,8 @@
Before shortening: a.b.c.Outer.Inner::class.java
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
[qualifier] a.b.c.Outer.Inner
with SHORTEN_AND_IMPORT:
[qualifier] a.b.c.Outer.Inner
with SHORTEN_AND_STAR_IMPORT:
[qualifier] a.b.c.Outer.Inner
@@ -0,0 +1,13 @@
// FILE: main.kt
package a.b.c
class Outer {
class Outer
class Inner {
fun foo(): Class<*> {
return <expr>a.b.c.Outer.Inner::class.java</expr>
}
companion object {
}
}
}
@@ -0,0 +1,8 @@
Before shortening: a.b.c.Outer.Inner::class.java
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
[qualifier] a.b.c.Outer.Inner
with SHORTEN_AND_IMPORT:
[qualifier] a.b.c.Outer.Inner
with SHORTEN_AND_STAR_IMPORT:
[qualifier] a.b.c.Outer.Inner
@@ -0,0 +1,16 @@
// FILE: main.kt
package foo.www.ddd
class Check {
class BBD {
class Bwd {
fun dad() {
val Bwd = 42
class BBD
val a = <expr>foo.www.ddd.Check.BBD.Bwd::class.java.annotatedInterfaces.size</expr>
}
}
}
}
@@ -0,0 +1,8 @@
Before shortening: foo.www.ddd.Check.BBD.Bwd::class.java.annotatedInterfaces.size
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
[qualifier] foo.www.ddd.Check
with SHORTEN_AND_IMPORT:
[qualifier] foo.www.ddd.Check.BBD.Bwd
with SHORTEN_AND_STAR_IMPORT:
[qualifier] foo.www.ddd.Check.BBD.Bwd
@@ -0,0 +1,16 @@
// FILE: main.kt
package foo.www.ddd
class Check {
class BBD {
class Bwd {
fun dad() {
val Bwd = 42
val BBD = 3
val a = <expr>foo.www.ddd.Check.BBD.Bwd::class.java.annotatedInterfaces.size</expr>
}
}
}
}
@@ -0,0 +1,8 @@
Before shortening: foo.www.ddd.Check.BBD.Bwd::class.java.annotatedInterfaces.size
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
[qualifier] foo.www.ddd.Check
with SHORTEN_AND_IMPORT:
[qualifier] foo.www.ddd.Check.BBD.Bwd
with SHORTEN_AND_STAR_IMPORT:
[qualifier] foo.www.ddd.Check.BBD.Bwd
@@ -0,0 +1,15 @@
// FILE: main.kt
package foo.www.ddd
class Check {
class BBD {
class Bwd {
class BBD
fun dad() {
val Bwd = 42
val a = <expr>foo.www.ddd.Check.BBD.Bwd::class.java.annotatedInterfaces.size</expr>
}
}
}
}
@@ -0,0 +1,8 @@
Before shortening: foo.www.ddd.Check.BBD.Bwd::class.java.annotatedInterfaces.size
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
[qualifier] foo.www.ddd.Check
with SHORTEN_AND_IMPORT:
[qualifier] foo.www.ddd.Check.BBD.Bwd
with SHORTEN_AND_STAR_IMPORT:
[qualifier] foo.www.ddd.Check.BBD.Bwd
@@ -0,0 +1,15 @@
// FILE: main.kt
package foo.www.ddd
class Check {
class BBD {
class BBD
class Bwd {
fun dad() {
val Bwd = 42
val a = <expr>foo.www.ddd.Check.BBD.Bwd::class.java.annotatedInterfaces.size</expr>
}
}
}
}
@@ -0,0 +1,8 @@
Before shortening: foo.www.ddd.Check.BBD.Bwd::class.java.annotatedInterfaces.size
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
[qualifier] foo.www.ddd.Check
with SHORTEN_AND_IMPORT:
[qualifier] foo.www.ddd.Check.BBD.Bwd
with SHORTEN_AND_STAR_IMPORT:
[qualifier] foo.www.ddd.Check.BBD.Bwd
@@ -0,0 +1,17 @@
// FILE: main.kt
package foo.www.ddd
class BBD {
class Bwd
}
class Check {
class BBD {
class Bwd {
fun dad() {
val Bwd = 42
val a = <expr>foo.www.ddd.Check.BBD.Bwd::class.java.annotatedInterfaces.size</expr>
}
}
}
}
@@ -0,0 +1,8 @@
Before shortening: foo.www.ddd.Check.BBD.Bwd::class.java.annotatedInterfaces.size
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
[qualifier] foo.www.ddd.Check.BBD
with SHORTEN_AND_IMPORT:
[qualifier] foo.www.ddd.Check.BBD.Bwd
with SHORTEN_AND_STAR_IMPORT:
[qualifier] foo.www.ddd.Check.BBD.Bwd
@@ -0,0 +1,13 @@
// FILE: main.kt
package foo.www.ddd
class Check {
class BBD {
class Bwd {
fun dad() {
val a = <expr>foo.www.ddd.Check.BBD.Bwd::class.java.annotatedInterfaces.size</expr>
}
}
}
}
@@ -0,0 +1,8 @@
Before shortening: foo.www.ddd.Check.BBD.Bwd::class.java.annotatedInterfaces.size
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
[qualifier] foo.www.ddd.Check.BBD.Bwd
with SHORTEN_AND_IMPORT:
[qualifier] foo.www.ddd.Check.BBD.Bwd
with SHORTEN_AND_STAR_IMPORT:
[qualifier] foo.www.ddd.Check.BBD.Bwd
@@ -0,0 +1,13 @@
// FILE: main.kt
package foo.www.ddd
class Check {
class BBD {
companion object Bwd {
fun dad() {
val Bwd = 42
val a = <expr>foo.www.ddd.Check.BBD.Bwd::class.java.annotatedInterfaces.size</expr>
}
}
}
}
@@ -0,0 +1,8 @@
Before shortening: foo.www.ddd.Check.BBD.Bwd::class.java.annotatedInterfaces.size
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
[qualifier] foo.www.ddd.Check.BBD
with SHORTEN_AND_IMPORT:
[qualifier] foo.www.ddd.Check.BBD.Bwd
with SHORTEN_AND_STAR_IMPORT:
[qualifier] foo.www.ddd.Check.BBD.Bwd
@@ -0,0 +1,13 @@
// FILE: main.kt
package foo.www.ddd
class Check {
class BBD {
object Bwd {
fun dad() {
val Bwd = 42
val a = <expr>foo.www.ddd.Check.BBD.Bwd::class.java.annotatedInterfaces.size</expr>
}
}
}
}
@@ -0,0 +1,8 @@
Before shortening: foo.www.ddd.Check.BBD.Bwd::class.java.annotatedInterfaces.size
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
[qualifier] foo.www.ddd.Check.BBD
with SHORTEN_AND_IMPORT:
[qualifier] foo.www.ddd.Check.BBD.Bwd
with SHORTEN_AND_STAR_IMPORT:
[qualifier] foo.www.ddd.Check.BBD.Bwd
@@ -0,0 +1,13 @@
// FILE: main.kt
package foo.www.ddd
class Check {
class BBD {
companion object {
fun dad() {
val Bwd = 42
val a = <expr>foo.www.ddd.Check.BBD.Companion::class.java.annotatedInterfaces.size</expr>
}
}
}
}
@@ -0,0 +1,8 @@
Before shortening: foo.www.ddd.Check.BBD.Companion::class.java.annotatedInterfaces.size
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
[qualifier] foo.www.ddd.Check.BBD.Companion
with SHORTEN_AND_IMPORT:
[qualifier] foo.www.ddd.Check.BBD.Companion
with SHORTEN_AND_STAR_IMPORT:
[qualifier] foo.www.ddd.Check.BBD.Companion
@@ -0,0 +1,19 @@
// FILE: main.kt
package a.b.c
class Outer {
fun <E> E.foo(x: E, y: E, z: E) = x.hashCode() + y.hashCode() + z.hashCode()
class Inner {
fun foo(a: Int, b: Boolean, c: String) = c + a + b
companion object {
fun <T, E, D> foo(a: T, b: E, c: D) = a.hashCode() + b.hashCode() + c.hashCode()
}
}
}
fun test(): Int {
fun foo(a: Int, b: Boolean, c: Int) = a + b.hashCode() + c
return <expr>a.b.c.Outer.Inner.Companion.foo(1, false, "bar")</expr>
}
@@ -0,0 +1,8 @@
Before shortening: a.b.c.Outer.Inner.Companion.foo(1, false, "bar")
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
[qualifier] a.b.c.Outer
with SHORTEN_AND_IMPORT:
[qualifier] a.b.c.Outer.Inner.Companion
with SHORTEN_AND_STAR_IMPORT:
[qualifier] a.b.c.Outer.Inner.Companion
@@ -0,0 +1,14 @@
// FILE: main.kt
package a.b.c
class MyClass(val id: Int) {
companion object {
fun foo() = ""
}
}
fun test() {
<expr>a.b.c.MyClass.Companion.foo()</expr>
}
fun foo() = ""
@@ -0,0 +1,8 @@
Before shortening: a.b.c.MyClass.Companion.foo()
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
[qualifier] a.b.c.MyClass
with SHORTEN_AND_IMPORT:
[qualifier] a.b.c.MyClass.Companion.foo()
with SHORTEN_AND_STAR_IMPORT:
[qualifier] a.b.c.MyClass.Companion
@@ -0,0 +1,14 @@
// FILE: main.kt
import dependency.A
fun test() {
val b = A.B(<expr>dependency.Foo()</expr>)
}
// FILE: dependency.kt
package dependency
class Foo
sealed class A {
class B(foo: Foo): A()
}
@@ -0,0 +1,7 @@
Before shortening: dependency.Foo()
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
with SHORTEN_AND_IMPORT:
[qualifier] dependency.Foo()
with SHORTEN_AND_STAR_IMPORT:
[qualifier] dependency.Foo()
@@ -0,0 +1,12 @@
// FILE: main.kt
package a.b.c
class A {
fun foo() {}
}
fun foo() = 1
context(A)
fun test() {
<expr>a.b.c.foo()</expr>
}
@@ -0,0 +1,5 @@
Before shortening: a.b.c.foo()
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
with SHORTEN_AND_IMPORT:
with SHORTEN_AND_STAR_IMPORT:
@@ -0,0 +1,18 @@
package a.b.c
import a.b.c.MyEnum.Companion.foo
enum class MyEnum(val id: Int) {
A(1),
B(2);
companion object {
fun foo() = ""
}
}
fun test() {
<expr>a.b.c.MyEnum.Companion.foo()</expr>
}
fun foo() = ""
@@ -0,0 +1,8 @@
Before shortening: a.b.c.MyEnum.Companion.foo()
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
[qualifier] a.b.c.MyEnum.Companion.foo()
with SHORTEN_AND_IMPORT:
[qualifier] a.b.c.MyEnum.Companion.foo()
with SHORTEN_AND_STAR_IMPORT:
[qualifier] a.b.c.MyEnum.Companion.foo()
@@ -0,0 +1,8 @@
enum class C(val i: Int) {
ONE(<expr>C.K</expr>)
;
companion object {
const val K = 1
}
}
@@ -0,0 +1,7 @@
Before shortening: C.K
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
with SHORTEN_AND_IMPORT:
[qualifier] C.K
with SHORTEN_AND_STAR_IMPORT:
[qualifier] C.K
@@ -0,0 +1,8 @@
enum class C(val i: Int) {
ONE(<expr>C.foo()</expr>)
;
companion object {
fun foo() = 1
}
}
@@ -0,0 +1,7 @@
Before shortening: C.foo()
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
with SHORTEN_AND_IMPORT:
[qualifier] C.foo()
with SHORTEN_AND_STAR_IMPORT:
[qualifier] C.foo()
@@ -0,0 +1,15 @@
// FILE: main.kt
package test
import dependency.Bar.extFun
fun usage(str: String) {
<expr>str.extFun()</expr>
}
// FILE: dependency.kt
package dependency
object Bar {
fun String.extFun() {}
}
@@ -0,0 +1,5 @@
Before shortening: str.extFun()
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
with SHORTEN_AND_IMPORT:
with SHORTEN_AND_STAR_IMPORT:
@@ -0,0 +1,11 @@
package test
fun <T> T.extFun(): T = this
object Bar
class Other
fun Other.usage() {
<expr>Bar.extFun()</expr>
}
@@ -0,0 +1,5 @@
Before shortening: Bar.extFun()
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
with SHORTEN_AND_IMPORT:
with SHORTEN_AND_STAR_IMPORT:
@@ -0,0 +1,12 @@
package test
val <T> T.extProperty: T
get() = this
object Bar
class Other
fun Other.usage() {
<expr>Bar.extProperty</expr>
}
@@ -0,0 +1,5 @@
Before shortening: Bar.extProperty
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
with SHORTEN_AND_IMPORT:
with SHORTEN_AND_STAR_IMPORT:
@@ -0,0 +1,9 @@
// FILE: main.kt
package test
fun take(action: (<expr>dependency.Foo</expr>) -> Unit) {}
// FILE: dependency.kt
package dependency
class Foo
@@ -0,0 +1,7 @@
Before shortening: dependency.Foo
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
with SHORTEN_AND_IMPORT:
[type] dependency.Foo
with SHORTEN_AND_STAR_IMPORT:
[type] dependency.Foo
@@ -0,0 +1,12 @@
// FILE: main.kt
package test
import com.dependency.bar as bar1
import com.dependency.*
fun foo() = <expr>com.dependency.bar</expr>
// FILE: dependency.kt
package com.dependency
val bar = 3
@@ -0,0 +1,8 @@
Before shortening: com.dependency.bar
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
[qualifier] com.dependency.bar -> bar1
with SHORTEN_AND_IMPORT:
[qualifier] com.dependency.bar -> bar1
with SHORTEN_AND_STAR_IMPORT:
[qualifier] com.dependency.bar -> bar1
@@ -0,0 +1,11 @@
// FILE: main.kt
package test
import com.dependency.bar as bar1
fun foo() = <expr>com.dependency.bar()</expr>
// FILE: dependency.kt
package com.dependency
fun bar() = 3
@@ -0,0 +1,8 @@
Before shortening: com.dependency.bar()
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
[qualifier] com.dependency.bar() -> bar1
with SHORTEN_AND_IMPORT:
[qualifier] com.dependency.bar() -> bar1
with SHORTEN_AND_STAR_IMPORT:
[qualifier] com.dependency.bar() -> bar1
@@ -0,0 +1,11 @@
// FILE: main.kt
package test
import com.dependency.bar as bar1
fun foo() = <expr>com.dependency.bar</expr>
// FILE: dependency.kt
package com.dependency
val bar = 3
@@ -0,0 +1,8 @@
Before shortening: com.dependency.bar
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
[qualifier] com.dependency.bar -> bar1
with SHORTEN_AND_IMPORT:
[qualifier] com.dependency.bar -> bar1
with SHORTEN_AND_STAR_IMPORT:
[qualifier] com.dependency.bar -> bar1
@@ -0,0 +1,11 @@
// FILE: main.kt
package test
import com.dependency.Bar as Bar1
fun foo(): <expr>com.dependency.Bar</expr> = Bar1()
// FILE: dependency.kt
package com.dependency
class Bar
@@ -0,0 +1,8 @@
Before shortening: com.dependency.Bar
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
[type] com.dependency.Bar -> Bar1
with SHORTEN_AND_IMPORT:
[type] com.dependency.Bar -> Bar1
with SHORTEN_AND_STAR_IMPORT:
[type] com.dependency.Bar -> Bar1
@@ -0,0 +1,17 @@
// FILE: main.kt
package test
import com.dependency.Bar as Bar1
fun foo() = <expr>com.dependency.Bar.bar()</expr>
// FILE: dependency.kt
package com.dependency
class Bar {
companion object
}
fun Bar.bar(): Bar {
return this
}
@@ -0,0 +1,8 @@
Before shortening: com.dependency.Bar.bar()
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
[qualifier] com.dependency.Bar -> Bar1
with SHORTEN_AND_IMPORT:
[qualifier] com.dependency.Bar -> Bar1
with SHORTEN_AND_STAR_IMPORT:
[qualifier] com.dependency.Bar -> Bar1
@@ -0,0 +1,12 @@
// FILE: main.kt
import a.b.c.dependency.Foo
/**
* [<expr>a.b.c.dependency.Foo</expr>]
*/
fun test() {}
// FILE: dependency.kt
package a.b.c.dependency
class Foo
@@ -0,0 +1,8 @@
Before shortening: a.b.c.dependency.Foo
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
[kdoc] a.b.c.dependency.Foo
with SHORTEN_AND_IMPORT:
[kdoc] a.b.c.dependency.Foo
with SHORTEN_AND_STAR_IMPORT:
[kdoc] a.b.c.dependency.Foo
@@ -0,0 +1,14 @@
// FILE: main.kt
import dependency.Foo
/**
* [<expr>dependency.Foo</expr>.foo]
*/
fun test() {}
// FILE: dependency.kt
package dependency
object Foo {
fun foo() {}
}
@@ -0,0 +1,8 @@
Before shortening: dependency.Foo
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
[kdoc] dependency.Foo
with SHORTEN_AND_IMPORT:
[kdoc] dependency.Foo
with SHORTEN_AND_STAR_IMPORT:
[kdoc] dependency.Foo
@@ -0,0 +1,14 @@
// FILE: main.kt
import dependency.Foo
/**
* [<expr>_root_ide_package_.dependency.Foo</expr>.foo]
*/
fun test() {}
// FILE: dependency.kt
package dependency
object Foo {
fun foo() {}
}
@@ -0,0 +1,9 @@
Before shortening: _root_ide_package_.dependency.Foo
with DO_NOT_SHORTEN:
[kdoc] _root_ide_package_.dependency
with SHORTEN_IF_ALREADY_IMPORTED:
[kdoc] _root_ide_package_.dependency.Foo
with SHORTEN_AND_IMPORT:
[kdoc] _root_ide_package_.dependency.Foo
with SHORTEN_AND_STAR_IMPORT:
[kdoc] _root_ide_package_.dependency.Foo
@@ -0,0 +1,12 @@
// FILE: main.kt
import dependency.Foo
/**
* [<expr>dependency.Foo.unresolved</expr>]
*/
fun test() {}
// FILE: dependency.kt
package dependency
class Foo
@@ -0,0 +1,8 @@
Before shortening: dependency.Foo.unresolved
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
[kdoc] dependency.Foo
with SHORTEN_AND_IMPORT:
[kdoc] dependency.Foo
with SHORTEN_AND_STAR_IMPORT:
[kdoc] dependency.Foo
@@ -0,0 +1,15 @@
package test
class MyClass {
companion object {
val prop = ""
}
object Other {
val prop = ""
fun usage() {
println(<expr>MyClass.prop</expr>)
}
}
}
@@ -0,0 +1,5 @@
Before shortening: MyClass.prop
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
with SHORTEN_AND_IMPORT:
with SHORTEN_AND_STAR_IMPORT:
@@ -0,0 +1,16 @@
// FILE: main.kt
package a.b.c
fun test(n: Int) {
return if (<expr>x.y.z.Outer.Inner.VALUE0 > x.y.z.Outer.Inner.VALUE1</expr>) 1
else n
}
// FILE: values.kt
package x.y.z
class Outer {
object Inner {
val VALUE0 = 13
val VALUE1 = 17
}
}
@@ -0,0 +1,9 @@
Before shortening: x.y.z.Outer.Inner.VALUE0 > x.y.z.Outer.Inner.VALUE1
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
with SHORTEN_AND_IMPORT:
[qualifier] x.y.z.Outer.Inner.VALUE0
[qualifier] x.y.z.Outer.Inner.VALUE1
with SHORTEN_AND_STAR_IMPORT:
[qualifier] x.y.z.Outer.Inner.VALUE0
[qualifier] x.y.z.Outer.Inner.VALUE1

Some files were not shown because too many files have changed in this diff Show More