Don't show argument name hints for dynamic calls.

Mark function descriptors created for dynamic calls as having
synthesized parameter names.

 #KT-21275 Fixed
This commit is contained in:
Dmitry Jemerov
2017-12-19 13:42:31 +01:00
parent 3e7e01dc4d
commit c336159b2b
2 changed files with 7 additions and 0 deletions
@@ -136,6 +136,7 @@ class DynamicCallableDescriptors(storageManager: StorageManager, builtIns: Kotli
Modality.FINAL,
Visibilities.PUBLIC
)
functionDescriptor.setHasSynthesizedParameterNames(true)
return functionDescriptor
}
@@ -172,4 +172,10 @@ annotation class ManyArgs(val name: String, val surname: String)
fun <T> T.test(block: (receiver: T, Int) -> Unit) = block(<hint text="receiver:"/>this, 0)
""")
}
fun `test dynamic`() {
check("""fun foo(x: dynamic) {
x.foo("123")
}""")
}
}