Serialize and deserialize 'header' modifier for descriptors

This fixes KT-17001 because now 'header' modifier is loaded correctly
for deserialized members and the standard disambiguation in
OverloadingConflictResolver.compareCallsByUsedArguments takes place,
where header members are discriminated against the corresponding impl
members

 #KT-17001 Fixed
This commit is contained in:
Alexander Udalov
2017-03-22 20:07:28 +03:00
parent ee33879031
commit db1f039586
17 changed files with 162 additions and 30 deletions
@@ -0,0 +1,7 @@
package test
header fun stringToByteArray(str: String): ByteArray
header var prop: String
fun ttt() {}
@@ -0,0 +1,5 @@
package test
impl fun stringToByteArray(str: String): ByteArray = byteArrayOf()
impl var prop: String = ""
@@ -0,0 +1,7 @@
package test
fun bar() {
stringToByteArray("foo bar baz")
prop
prop = ""
}
@@ -0,0 +1,11 @@
-- Common --
Exit code: OK
Output:
-- JVM --
Exit code: OK
Output:
-- JVM (2) --
Exit code: OK
Output: