Created
October 25, 2012 00:41
-
-
Save dcsobral/3949827 to your computer and use it in GitHub Desktop.
Miles Sabin Exercise
This file contains 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
scala> class Tester[R <: ResourceManager#Resource] { | |
| def apply(r: R) = assert(r.hash == "9e47088d", "Expected: 9e47088d, Found: "+r.hash) | |
| } | |
defined class Tester | |
scala> def testHash[RM <: ResourceManager](rm: RM) = new Tester[rm.Resource] | |
testHash: [RM <: ResourceManager](rm: RM)Tester[rm.Resource] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment