CommandHelper

CommandHelper

46.5k Downloads

NPE on incorrect proc definition with returning type

KanoAlgiz opened this issue · 3 comments

commented

in main.ms
include('test.ms')
in test.ms
void _main(){}

Stacktrace: https://pastebin.com/BEU1TNEW

But, if you write void _procname(){} directly in main.ms - no stacktrace, just two compile errors:
изображение

commented

Correct syntax for procs with type is:

void proc _main() {}

Getting a Java stacktrace for invalid syntax is a bug though.

Edit: Corrected syntax.

commented

Yes, I quckly found that I've mistyped, but it felt right to report =)

compile error with 'unknown source' looks strange too...

commented

It is odd that the term does not have a known Target (unknown source). I've fixed the Java exception from being thrown in my PR, but the CClassType with an unknown target should still get its target properly assigned.