Created
February 14, 2015 20:15
-
-
Save gmpreussner/af6cceaa2c54403b6c87 to your computer and use it in GitHub Desktop.
static[T] hangs compiler
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
type | |
RectArray*[R, C: static[int], T] = distinct array[R * C, T] | |
StaticMatrix*[R, C: static[int], T] = object | |
elements*: RectArray[R, C, T] | |
StaticVector*[N: static[int], T] = StaticMatrix[N, 1, T] | |
proc foo*[N, T](a: StaticVector[N, T]): T = 0.T | |
proc foobar*[N, T](a, b: StaticVector[N, T]): T = 0.T | |
var a: StaticVector[3, int] | |
echo foo(a) # OK | |
echo foobar(a, a) # <--- hangs compiler |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fixed in nim-lang/Nim@442dc30