WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Extending a type from kotlinx-browser in webMain breaks compileWebMainKotlinMetadata #32

@eymar

Description

@eymar

The default declarations miss some properties so we've been extending the types in our code like this:

internal external class InputEventExt(type: String) : InputEvent {
    val inputType: String
}

It used to work well until we tried to move this code to webMain. Previously, such declrations were duplicated in jsMain and wasmJsMain.

After moving to webMain the compilation tasks succeed, but webMain metadata compilation fails:

> Task :library:compileWebMainKotlinMetadata FAILED
...
No value passed for parameter 'type'.

I assume it means the type for InputEvent constructor:

public expect open class InputEvent(type: String, eventInitDict: InputEventInit = definedExternally) : UIEvent, JsAny {

Expected behaviour:
I can extend a type from kotlinx-browser in webMain. Both compilation and metadata compilation should succeed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions