[chuck-users] crashing VM on (<string> != null) test?

Robert Poor rdpoor at gmail.com
Wed Jun 24 15:12:47 EDT 2009

I'm so baffled that this must be easy.  What is the proper test to see  
if a string is null?  More to the point, why does the following code  
bomb out on the conditional test?

"foo.txt" => string g;
<<< g >>>;			// prints '"foo.txt" : (string)'
if (g != null) {			// evidently crashes here with "[chuck](VM)  
NullPointerException (during string op)..."
   <<< "not null" >>>;
} else {
   <<< "is null" >>>;

More information about the chuck-users mailing list