Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Cannot Reproduce
-
Affects Version/s: X10 1.7 - JVM hosted
-
Fix Version/s: X10 1.7.3
-
Component/s: X10 Compiler: Front-end
-
Labels:None
-
Number of attachments :
Description
class R(rank:nat) {}
class C[T] {
incomplete static def make[T](): C[T];
}
class Bug(foo:nat) {
//var a: Rail[R{rank==foo}] = Rail.makeVar[R{rank==foo}](10);
var a: C[R{rank==foo}] = C.make[R{rank==foo}]();
}
C:\lucas\x10\1.7\x10.exp\bugs\Bug.x10:10: The type of the variable initializer
"C[R{}]" does not match that of the declaration
"C[R
]".
Changed example to the following to fix type errors:
class R(rank:nat) { def this() { property(0); } } class C[T] { incomplete static def make[T](): C[T]; } class Bug(foo:nat) { def this() { property(0); } //var a: Rail[R{rank==foo}] = Rail.makeVar[R{rank==foo}](10); var a: C[R{rank==foo}] = C.make[R{rank==foo}](); }