Setup spacing rules for secondary constructors

#KT-6968 Fixed
This commit is contained in:
Denis Zharkov
2015-03-12 20:14:49 +03:00
parent 9e5192e0e3
commit 22425de5cb
11 changed files with 254 additions and 2 deletions
@@ -0,0 +1,63 @@
class A {
constructor() {
}
constructor() {
}
fun foo() {
}
constructor() {
}
fun foo() {
}
constructor() {
}
val x = 1
constructor() {
}
fun foo() {
}
val x = 1
constructor() {
}
val x = 1
val x = 1
constructor() {
}
constructor() {
x = 1
}
fun foo() = 1
constructor() {
}
fun foo() = 1
constructor() : this() {
}
constructor() : this() {
}
constructor() : this() {
}
constructor() : super() {
}
}
@@ -0,0 +1,31 @@
class A {
constructor() {}
constructor() {}
fun foo() {}
constructor() {}
fun foo() {}
constructor() {}
val x = 1
constructor() {}
fun foo() {}
val x = 1
constructor() {}
val x = 1
val x = 1
constructor() {}
constructor() {
x = 1
}
fun foo() = 1
constructor() {}
fun foo() = 1
constructor() : this() {}
constructor():this() {}
constructor(): this () {}
constructor(): super(){}
}
@@ -0,0 +1,16 @@
class A {
constructor() {
}
constructor(): this() {
}
constructor(): super() {
}
constructor(): super() {
}
}
// SET_TRUE: SPACE_BEFORE_EXTEND_COLON
// SET_FALSE: SPACE_AFTER_EXTEND_COLON
@@ -0,0 +1,16 @@
class A {
constructor() {
}
constructor() :this() {
}
constructor() :super() {
}
constructor() :super() {
}
}
// SET_TRUE: SPACE_BEFORE_EXTEND_COLON
// SET_FALSE: SPACE_AFTER_EXTEND_COLON
@@ -0,0 +1,9 @@
class A {
constructor() {}
constructor() : this() {}
constructor(): super() {}
constructor():super() {}
}
// SET_TRUE: SPACE_BEFORE_EXTEND_COLON
// SET_FALSE: SPACE_AFTER_EXTEND_COLON
@@ -0,0 +1,25 @@
class A {
constructor() {
}
constructor() : this() {
}
constructor() {
}
constructor() //eol comment
{
}
constructor() : super(1, 2, 3) //eol comment
{
}
constructor() {
}
}
// SET_TRUE: LBRACE_ON_NEXT_LINE
@@ -0,0 +1,30 @@
class A
{
constructor()
{
}
constructor() : this()
{
}
constructor()
{
}
constructor() //eol comment
{
}
constructor() : super(1, 2, 3) //eol comment
{
}
constructor()
{
}
}
// SET_TRUE: LBRACE_ON_NEXT_LINE
@@ -0,0 +1,25 @@
class A {
constructor() {}
constructor() : this()
{}
constructor()
{
}
constructor() //eol comment
{
}
constructor():super(1,2,3) //eol comment
{}
constructor() {
}
}
// SET_TRUE: LBRACE_ON_NEXT_LINE