It seems that I can't create types that have members which are also custom types, when I am compiling with the nools executable. For example, the following code compiles correctly in Javascript with nools.compile(__dirname + "/test.nools"). However, when I run nools compile test.nools I get the error "ReferenceError: Message is not defined".
define Message {
text: String,
constructor : function(text) { this.text = text }
}
define Greeting {
msg: Message,
constructor : function(msg) { this.msg = msg }
}
It seems that I can't create types that have members which are also custom types, when I am compiling with the
noolsexecutable. For example, the following code compiles correctly in Javascript withnools.compile(__dirname + "/test.nools"). However, when I runnools compile test.noolsI get the error "ReferenceError: Message is not defined".