Make public: reformat after removing primary constructor visibility modifier

#KT-29444 Fixed
This commit is contained in:
Toshiaki Kameyama
2019-01-25 05:38:00 +03:00
committed by Nikolay Krasko
parent c2968b6a68
commit 6f7830a4b2
6 changed files with 6 additions and 6 deletions
@@ -61,7 +61,7 @@ class KtPrimaryConstructor : KtConstructor<KtPrimaryConstructor> {
override fun removeModifier(modifier: KtModifierKeywordToken) {
super.removeModifier(modifier)
if (modifierList == null) {
getConstructorKeyword()?.delete()
removeRedundantConstructorKeywordAndSpace()
}
}
@@ -1,2 +1,2 @@
// INTENTION_TEXT: Make public
class C <caret>private constructor(val v: Int)
class C <caret>private constructor(val /* check no reformat here */ v: Int)
@@ -1,2 +1,2 @@
// INTENTION_TEXT: Make public
class C <caret>(val v: Int)
class C<caret>(val /* check no reformat here */ v: Int)
@@ -1,6 +1,6 @@
open class C0(val x: Any?) {}
open class C1 (var _x1: Int = 1, _x2: Float?, val _x3: ((Int) -> Int)?) : C0(_x3){
open class C1(var _x1: Int = 1, _x2: Float?, val _x3: ((Int) -> Int)?) : C0(_x3){
fun bar() {
val y1 = _x1;
val y2 = _x2;
@@ -1,6 +1,6 @@
open class C0<X>(val x: X) {}
open class C1<T: Any> (var _x1: T? = null, _x2: Double?, val _x3: ((Int) -> Int)?) : C0<((Int) -> Int)?>(_x3){
open class C1<T: Any>(var _x1: T? = null, _x2: Double?, val _x3: ((Int) -> Int)?) : C0<((Int) -> Int)?>(_x3){
fun bar() {
val y1 = _x1;
val y2 = _x2;
@@ -1 +1 @@
class X (n: Int)
class X(n: Int)