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
We get the following error:
/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar:x10/util/ArrayList.x10:223: Method or static constructor not found for cmp(T, T)
/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar:x10/util/ArrayList.x10:224: Method or static constructor not found for cmp(T, T)
From the library file ArrayList.x10:
private def qsort(a: GrowableRail[T]!, lo: int, hi: int, cmp: (T,T)=>Int) { if (hi <= lo) return; var l: int = lo - 1; var h: int = hi; while (true) { while (cmp(a(++l), a(hi))<0); while (cmp(a(hi), a(--h))<0 && h>lo); if (l >= h) break; exch(a, l, h); } exch(a, l, hi); qsort(a, lo, l-1, cmp); qsort(a, l+1, hi, cmp); }
When trying to compile the test case examples/Constructs/Closures/ClosureConstraint1.x10.
(Actually, we get a whole pile of errors; that's just the first one. The rest are:
"/System/Library/Frameworks/JavaVM.framework/Home/bin/java" -Xmx512m -classpath "/Users/bard/x10/x10-trunk/x10.dist/lib/x10c.jar:/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar:/Users/bard/x10/x10-trunk/x10.dist/lib/polyglot3.jar:/Users/bard/x10/x10-trunk/x10.dist/lib/polyglot-bytecode.jar:/Users/bard/x10/x10-trunk/x10.dist/lib/asm.jar:/Users/bard/x10/x10-trunk/x10.dist/lib/lpg.jar:Constructs/Closures" polyglot.main.Main -post 'java -jar "/Users/bard/x10/x10-trunk/x10.dist/lib/ecj.jar" -1.5 -nowarn' -extclass x10.ExtensionInfo -noserial -sourcepath "/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar" '-sourcepath' './x10lib' '-sourcepath' 'Constructs/Closures' '-d' 'Constructs/Closures' 'Constructs/Closures/./ClosureConstraint1.x10'
/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar:x10/util/ArrayList.x10:223: Method or static constructor not found for cmp(T, T)
/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar:x10/util/ArrayList.x10:224: Method or static constructor not found for cmp(T, T)
/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar:x10/util/ArrayList.x10:223: Method or static constructor not found for cmp(T, T)
/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar:x10/util/ArrayList.x10:224: Method or static constructor not found for cmp(T, T)
/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar:x10/util/AbstractCollection.x10:15: Method or static constructor not found for p(T{})
/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar:x10/array/BaseRegion.x10:161: Method or static constructor not found for err(x10.lang.PointUnknown macro: {pt.rank==x10.array.BaseRegion#this.rank})
/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar:x10/array/BaseRegion.x10:161: Method or static constructor not found for err(x10.lang.Point)
/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar:x10/array/RectRegion.x10:184: Method or static constructor not found for err(x10.lang.Point{})
/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar:x10/array/RectRegion.x10:184: Method or static constructor not found for err(x10.lang.Point{})
/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar:x10/array/PolyMat.x10:38: Method or static constructor not found for init(x10.lang.Int{}, x10.lang.Int{})
/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar:x10/array/PolyMat.x10:38: Method or static constructor not found for init(x10.lang.Int{}, x10.lang.Int{})
/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar:x10/array/PolyMat.x10:38: Constructor this(x10.lang.ValRail[x10.lang.Int], x10.lang.Int)
cannot be invoked with arguments
(x10.lang.Int{}, (x10.lang.Int){}=> x10.lang.Void).
/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar:x10/array/PolyMat.x10:38: Method or static constructor not found for init(x10.lang.Int{}, x10.lang.Int{})
/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar:x10/array/PolyMat.x10:38: Constructor this(x10.lang.ValRail[x10.lang.Int], x10.lang.Int)
cannot be invoked with arguments
(x10.lang.Int{}, (x10.lang.Int){}=> x10.lang.Void).
/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar:x10/array/PolyMat.x10:38: Method make[T](x10.lang.Int, (x10.lang.Int)Unknown macro: {x==1}=> T) in x10.lang.ValRail cannot be called with arguments [x10.array.PolyRow](x10.lang.Int{}, (x10.lang.Int){}=> x10.lang.Void); Call invalid; actual parameter of type |(x10.lang.Int){}=> x10.lang.Void|
cannot be assigned to formal parameter type |(x10.lang.Int)=> x10.array.PolyRow|.
/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar:x10/array/BaseArray.x10:204: Method or static constructor not found for op(T)
/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar:x10/array/BaseArray.x10:204: Method or static constructor not found for op(T)
/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar:x10/array/BaseArray.x10:204: Method make[T](x10.lang.Region, (x10.lang.Point{})Unknown macro: {x==1}=> T) in x10.lang.Array cannot be called with arguments [T](x10.lang.Dist
Unknown macro: {x10.array.BaseArray#this.home==x10.lang.Place.FIRST_PLACE}, (x10.lang.Point){}=> x10.lang.Void); Call invalid; actual parameter of type |x10.lang.Dist
|
cannot be assigned to formal parameter type |x10.lang.Region|.
/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar:x10/array/FastArray.x10:127: Method or static constructor not found for op(T, T)
/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar:x10/util/MapIterator.x10:13: Method or static constructor not found for f(S)
/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar:x10/array/MatBuilder.x10:41: Method or static constructor not found for v(x10.lang.Int)
/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar:x10/array/MatBuilder.x10:41: Method or static constructor not found for v(x10.lang.Int)
/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar:x10/array/XformMat.x10:15: Method or static constructor not found for init(x10.lang.Int{}, x10.lang.Int{})
/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar:x10/array/XformMat.x10:15: Method or static constructor not found for init(x10.lang.Int{}, x10.lang.Int{})
/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar:x10/array/XformMat.x10:15: Constructor this(x10.lang.Int, (x10.lang.Int)=> x10.lang.Int)
cannot be invoked with arguments
(x10.lang.Int{}, (x10.lang.Int){}=> x10.lang.Void).
/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar:x10/array/XformMat.x10:15: Method or static constructor not found for init(x10.lang.Int{}, x10.lang.Int{})
/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar:x10/array/XformMat.x10:15: Constructor this(x10.lang.Int, (x10.lang.Int)Unknown macro: {x==1}=> x10.lang.Int)
cannot be invoked with arguments
(x10.lang.Int{}, (x10.lang.Int){}=> x10.lang.Void).
/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar:x10/array/XformMat.x10:15: Constructor this(x10.lang.Int, x10.lang.Int, (x10.lang.Int)=> x10.array.ValRow)
cannot be invoked with arguments
(x10.lang.Int{}, x10.lang.Int{}, (x10.lang.Int){}=> x10.lang.Void).
/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar:x10/array/VarMat.x10:15: Method or static constructor not found for init(x10.lang.Int{}, x10.lang.Int{})
/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar:x10/array/VarMat.x10:15: Method or static constructor not found for init(x10.lang.Int{}, x10.lang.Int{})
/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar:x10/array/VarMat.x10:15: Constructor this(x10.lang.Int, (x10.lang.Int)Unknown macro: {x==1}=> x10.lang.Int)
cannot be invoked with arguments
(x10.lang.Int{}, (x10.lang.Int){}=> x10.lang.Void).
/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar:x10/array/VarMat.x10:15: Method or static constructor not found for init(x10.lang.Int{}, x10.lang.Int{})
/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar:x10/array/VarMat.x10:15: Constructor this(x10.lang.Int, (x10.lang.Int)=> x10.lang.Int)
cannot be invoked with arguments
(x10.lang.Int{}, (x10.lang.Int){}=> x10.lang.Void).
/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar:x10/array/VarMat.x10:15: Constructor this(x10.lang.Int, x10.lang.Int, (x10.lang.Int)Unknown macro: {x==1}=> x10.array.VarRow)
cannot be invoked with arguments
(x10.lang.Int{}, x10.lang.Int{}, (x10.lang.Int){}=> x10.lang.Void).
/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar:x10/array/MatBuilder.x10:47: Method or static constructor not found for v(x10.lang.Int)
/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar:x10/array/LocalArray.x10:102: Method or static constructor not found for op(T, T)
/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar:x10/array/DistArray.x10:101: Method or static constructor not found for init(x10.lang.PointUnknown macro: {pt.rank==region.rank})
/Users/bard/x10/x10-trunk/x10.dist/lib/x10.jar:x10/array/DistArray.x10:101: Method or static constructor not found for init(x10.lang.Point)
38 errors.real 1m6.068s
user 1m2.047s
sys 0m2.279s
Constructs.Closures ClosureConstraint1 did not meet expectation: expected=Success actual=FailCompile.
This bug seems to hit the library too. I now get a pile of errors like: