Just today I started writing my first lines of nim code (great language, I'm really excited so far).
Of course I've made some mistakes in my first code parts, but one of these mistakes lead to the compiler terminating compilation without giving an error or any hint at all of what is going wrong. Though I'm not sure this is the right place to report this behavior, I thought better do it here then just ignore it.
I had a test program, where I played around with concepts and in one of the concepts I had a typo ('x' instead of 't'). This was no problem so far until I made an import of the typetraits module. With this import "nim c main.nim" just terminates without generating any code and without reporting any error.
Here is a minimal code snippet to reproduce the issue (Nim 0.15.2 Linux amd64):
import typetraits # without this import the program compiles (and echoes false)
type
SomeTestConcept = concept t
x.name is string # typo: t.name was intended (which would result in echo true)
type
TestClass = ref object of RootObj
name: string
var test = TestClass(name: "mytest")
echo $(test is SomeTestConcept)
"nim c main.nim" produces:
Hint: used config file '/home/gneu/nim/nim-0.15.2/config/nim.cfg' [Conf]
Hint: system [Processing]
Hint: main [Processing]
Hint: typetraits [Processing]
(and no further output)
I think this has something todo with the typetraits module defining a proc or method "name" for types. Whatever the reason (and however stupid my sample code is), the compiler should never just stop working without giving the tiniest hint and what might be the problem.