SwiftKotlin icon indicating copy to clipboard operation
SwiftKotlin copied to clipboard

Remove unecessary {} on method definitions

Open angelolloqui opened this issue 7 years ago • 0 comments

When body is empty, Kotlin allows to remove the {}

Example:

class A {
    init() {}
    func test() {}
}

Translates to:

class A {
    constructor() {}
    fun test() {}
}

But could be:

class A {
    constructor()
    fun test()
}

angelolloqui avatar Oct 18 '17 16:10 angelolloqui