Does the guard actually work?

I tried an example directly from the language specification:

val n = 3;
val f : (x:Int){x != n} => Int
= (x:Int){x != n} => (12/(n-x));
Console.OUT.println("f(5)=" + f(5));


Then I modified it, using "f(3)" instead of "f(5)". I expected it to stop me 
right at the entrance of the function body, but instead I got the "division by 
zero" exception. I tried both Java and C++ backend.

Is it a bug or the feature not implemented yet?
------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users

Reply via email to