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

Discarded non-Unit value? #91

Open
michalrus opened this issue Oct 6, 2016 · 0 comments
Open

Discarded non-Unit value? #91

michalrus opened this issue Oct 6, 2016 · 0 comments

Comments

@michalrus
Copy link

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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant