Generate actual keyword for secondary constructors #KT-20008 Fixed
This commit is contained in:
@@ -253,15 +253,15 @@ private fun KtPsiFactory.generateFunction(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return if (expectedFunction is KtSecondaryConstructor) {
|
return (if (expectedFunction is KtSecondaryConstructor) {
|
||||||
createSecondaryConstructor(expectedFunction.text + " " + body)
|
createSecondaryConstructor(expectedFunction.text + " " + body)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
createFunction(expectedFunction.text + " " + body).apply {
|
createFunction(expectedFunction.text + " " + body)
|
||||||
replaceExpectModifier(actualNeeded)
|
} as KtFunction).apply {
|
||||||
if (returnType != null && KotlinBuiltIns.isUnit(returnType)) {
|
replaceExpectModifier(actualNeeded)
|
||||||
typeReference = null
|
if (returnType != null && KotlinBuiltIns.isUnit(returnType)) {
|
||||||
}
|
typeReference = null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -10,7 +10,7 @@ actual class My {
|
|||||||
|
|
||||||
actual fun baz() {}
|
actual fun baz() {}
|
||||||
|
|
||||||
constructor(flag: Boolean) {
|
actual constructor(flag: Boolean) {
|
||||||
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user