Skip to content
This repository was archived by the owner on Nov 30, 2022. It is now read-only.
This repository was archived by the owner on Nov 30, 2022. It is now read-only.

Discarded non-Unit value? #91

@michalrus

Description

@michalrus

Take this code:

var button = slot[Button]
button <~ On.click { button <~ hide }

… and compile it with -Ywarn-value-discard (useful flag!) using the 2.11.8 compiler.

It fails with:

[error] /home/m/Development/[…]/TestActivity.scala:19: discarded non-Unit value
[error]     button <~ On.click { button <~ show }
[error]                        ^
[error] one error found

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions