Is there a reason why this code snippet doesn't make the compiler raise any warning or error?
type
Employee = ref object of RootObj
name: string not nil
surname: string not nil
proc newEmployee(): Employee =
new(result)
proc mainProc() =
var e = newEmployee()
echo "Name:" & e.name
echo "Surname:" & e.surname
if isMainModule:
mainProc()