Write to trace in case class qualifier is a short reference to default object

This allows to fix some cases when there is a difference between explicit and short reference to default object
Fix shorten reference, optimize imports and import insert helper for default objects
ShortenReferences always transforms default object references to shorter form for now
Fix DescriptorUtils#getFqName() for default objects (affects test data mostly)
Fix DescriptorUtils#getImportableDescriptor()
This commit is contained in:
Pavel V. Talanov
2015-02-25 13:19:39 +03:00
parent 7f672f8078
commit 989f07962b
40 changed files with 278 additions and 104 deletions
@@ -1 +1 @@
Property A.t will become invisible after extraction
Property A.Default.t will become invisible after extraction
@@ -3,5 +3,7 @@ package source
import library.*
class Bar {
class object {
val c : Int
}
}
@@ -3,6 +3,7 @@ package target
import library.JavaClass
import library.KtClass
import library.KtObject
import source.Bar
class Foo {
val jv1 = JavaClass.foo()
@@ -13,4 +14,11 @@ class Foo {
val kt2 = KtObject.foo()
val kt3 = KtClass.Inner.foo()
val kt4 = KtObject.Inner.foo()
val kt5 = KtClass.foo()
val kt6 = KtClass
val kt7 = KtClass
val kt8 = Bar
val kt9 = Bar
val kt10 = Bar.c
}
@@ -11,8 +11,17 @@ class <caret>Foo {
val kt2 = KtObject.foo()
val kt3 = KtClass.Inner.foo()
val kt4 = KtObject.Inner.foo()
val kt5 = KtClass.Default.foo()
val kt6 = KtClass.Default
val kt7 = KtClass
val kt8 = Bar
val kt9 = Bar.Default
val kt10 = Bar.Default.c
}
class Bar {
class object {
val c : Int
}
}