Fix incremental compilation problems related to type alias constructors
1. Determine source element for descriptors with NO_SOURCE recursively. 2. Always provide type abbreviation for type alias constructor return type. #KT-15495 Fixed
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
package foo
|
||||
|
||||
internal typealias TypeAlias = Int
|
||||
internal typealias TypeAlias = Int
|
||||
internal typealias TypeAlias2 = TypeAlias
|
||||
@@ -2,4 +2,8 @@ package foo
|
||||
|
||||
internal fun useTypeAlias(x: TypeAlias) {
|
||||
x.toString()
|
||||
}
|
||||
|
||||
internal fun useTypeAlias2(x: TypeAlias2) {
|
||||
x.toString()
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package test
|
||||
|
||||
class C
|
||||
|
||||
internal typealias CAlias = C
|
||||
internal typealias CAlias2 = CAlias
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
================ Step #1 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/test/UseTypeAliasConstructorKt.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/useTypeAliasConstructor.kt
|
||||
End of files
|
||||
Exit code: OK
|
||||
------------------------------------------
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
package test
|
||||
|
||||
val c = CAlias()
|
||||
val c2 = CAlias2()
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package test
|
||||
|
||||
class C {
|
||||
companion object
|
||||
}
|
||||
|
||||
internal typealias CAlias = C
|
||||
internal typealias CAlias2 = CAlias
|
||||
@@ -0,0 +1,11 @@
|
||||
================ Step #1 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/test/UseTypeAliasObjectKt.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/useTypeAliasObject.kt
|
||||
End of files
|
||||
Exit code: OK
|
||||
------------------------------------------
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
package test
|
||||
|
||||
val cc = CAlias
|
||||
val cc2 = CAlias2
|
||||
Reference in New Issue
Block a user