Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: X10 SVN HEAD
-
Fix Version/s: X10 SVN HEAD
-
Component/s: X10 Compiler: Front-end Typechecking
-
Labels:None
-
Number of attachments :
Description
The generation of method guard runtime checks causes compilation errors:
public class XTENLANG_2451 { public static def main(argv:Array[String]) { Console.OUT.println(argv(0)); async { Console.OUT.println(argv(0)); } val a : Array[Int] = [0]; at (here.next()) { a(0) = 1; } } }
results in
./XTENLANG_2451.x10:4: Cannot return from an async. ./XTENLANG_2451.x10:7: Cannot return value from void method or closure. ./XTENLANG_2451.x10:7: Cannot return a value from at in ./XTENLANG_2451.x10:6,5-8,5. 3 errors.
And even something as simple as
public class XTENLANG_2451 { public static def main(argv:Array[String]) { Console.OUT.println(argv(0)); } }
produces post-compilation errors:
x10c: ----------
1. ERROR in ./XTENLANG_2451.java (at line 17)
main_0_$_x10$lang$String_$(
final x10.
array.
Array<java.lang.String> argv){
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This method must return a result of type Object
----------
1 problem (1 error)
and, even more cryptic:
x10c++: No main method found
Activity
Igor Peshansky
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Resolution | Fixed [ 1 ] |
David Grove
made changes -
| Status | Resolved [ 5 ] | Closed [ 6 ] |