Created
October 21, 2011 15:54
-
-
Save soc/1304183 to your computer and use it in GitHub Desktop.
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
object UnitsTest extends App { | |
import metascala.Units._ | |
val length1 = m(23) | |
val length2 = m(17) | |
val area: Area = length1 * length2 // Works, Quantity[_2, _0] | |
val time = s(42) | |
val foo: Foo = time * length1 // Works, Quantity[_1, _1] | |
//val speed: Speed = length1 / time // Doesn't work, Quantity[_1, _1#Neg] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment