Skip to content

Problem with SelfInvocationContext #466

@AndreiKingsley

Description

@AndreiKingsley

SelfInvocationContext is a special interface that actually works like trait. It has invoke() extension function that opens scope with this as a reciever:

public operator fun <T : SelfInvocationContext> T.invoke(block: T.() -> Unit): T = apply(block)

It simplifies DSL creation (see Axis or Legend API for example), but it complicates work with Kandy in Gradle projects, since user need invoke import (and IDEA doesn't even suggest to add this import!).

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiCommon API for plottinginvalidThis doesn't seem right

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions