From f4ed05cd90a5caef3facd2e7ee04869f84c31a23 Mon Sep 17 00:00:00 2001 From: Denis Zharkov Date: Wed, 18 Mar 2015 15:46:22 +0300 Subject: [PATCH] Update specs formatting --- spec-docs/secondary-constructors.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec-docs/secondary-constructors.md b/spec-docs/secondary-constructors.md index 8ecbce01f17..ce6165185f6 100644 --- a/spec-docs/secondary-constructors.md +++ b/spec-docs/secondary-constructors.md @@ -20,14 +20,14 @@ class Foo(a: Bar): MySuper() { No primary constructor: ``` kotlin class Foo: MySuper { // initialization of superclass is not allowed - constructor(a: Int): super(a + 1) { ... } // must call super() here + constructor(a: Int) : super(a + 1) { ... } // must call super() here } ``` No primary constructor + two overloaded constructors ``` kotlin class Foo: MySuper { // initialization of superclass is not allowed - constructor(a: Int): super(a + 1) { ... } + constructor(a: Int) : super(a + 1) { ... } constructor() : this(1) { ... } // either super() or delegate to another constructor } ``` @@ -47,7 +47,7 @@ class Foo: MySuper { // initialization of superclass is not allowed No primary constructor => no supertype initialization allowed in the class header: ``` kotlin class Foo : Bar() { // Error - constructor(x: Int): this() {} + constructor(x: Int) : this() {} } ```