Created
March 6, 2018 20:44
-
-
Save capocasa/756990d8d16cea943081cc0432f31b99 to your computer and use it in GitHub Desktop.
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
echo " | |
import system | |
type Bar[T] = ref object | |
value: T | |
type types = int32|int64 # if I change this to just int32 or int64 it works (compiles) | |
# if I replace Bar everywhere with seq it also compiles fine | |
proc Foo[T: Bar[types]](): T = | |
when T is Bar: nil | |
discard Foo[Bar[int32]]() | |
" > a.nim | |
nim c a.nim | |
SIGSEGV: Illegal storage access. (Attempt to read from nil?) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment