Last active
August 29, 2015 14:17
-
-
Save aakashns/ee49091b62853114fb04 to your computer and use it in GitHub Desktop.
Group type class with implicit annotation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| error: could not find implicit value for evidence parameter of type Group[Boolean] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| error: No member of type class Group found for type Boolean |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import annotation.implicitNotFound | |
| @implicitNotFound("No member of type class Group found for type ${T}") | |
| trait Group[T] { | |
| // code .. | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sum(Seq(true, false)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment