Thanks @Araq!
working example if anyone wants to know
type
A = object of RootObj
B = ref object of A
proc thing() : ref A = B()
let x = thing()
Run
This doesn't seem to work either. Just as with the version I have in the
original post this compiles but crashes at runtime
How can I do something like this?
type
@mashingan was right, it was the use of the ..< , thank you!
I'm messing around with templates and can't get passed this template/generic
instantiation of 'test' from here. What is wrong with this code?
let val = 10
template test(val: typed) =
case val:
of low(int)..<5:
echo "under 5"
else:
Hey @marks, you're right it should be added there. It is an old package and is
just in maintenance mode so it definitely needs some updating. I'm not the
original creator of the bindings but I plan on making a pull sometime in the
near future to update it with my changes and instructions for
Hello, I personally use the wxWidgets bindings. There isn't a ton of
documentation on the Nim bindings specifically, but between the examples and
wxWidgets c++ documentation, it is easy enough to navigate. Check out he
wxWidgets window creation example I just uploaded to Rosetta Code,