Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: X10 2.3.2
-
Component/s: X10 Compiler: Front-end Typechecking
-
Labels:None
-
Number of attachments :
Description
The following code ought to compile. All it does is offer Ints around.
class Offery {
public def off() throws Exception offers Int {
offer 1;
offer 2;
offer 3;
}
val f : () offers Int => Int =
() => {this.off(); 1};
public static def main(argv:Rail[String]!) {
}
}
However, no:
/Users/bard/x10/tmp/colfin/Offery.x10:9: Code that can offer values of given type is invoked in a context which does not expect offers.
Offer type: x10.lang.Int