Skip to content

Override methods can not have default values in Kotlin #90

Closed
@angelolloqui

Description

This code

class Test {
    override func dostuff(x: Int = 5) {
    }
}

gets transpiled as

class Test {
    
    override fun dostuff(x: Int = 5) {}
}

But that is not valid Kotlin for overriden methods. It should be:

class Test {
    
    override fun dostuff(x: Int) {}
}

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions