Hi, Mohsen didn't forget the type bound (I can see his code). Generic bounds such as "{T <: Reducible[S]}" do not work properly in the compiler (there is already a JIRA opened for it, so no need to open another one).
As a work around, I tried: abstract class Adder[S] { public abstract def getT() : Reducible[S]; ... } but now I have a NPE: Exception in thread "main" java.lang.NullPointerException at x10.types.X10TypeEnv_c.typeEquals(X10TypeEnv_c.java:984) I'm working to see if I can fix it quickly... Thanks, Yoav On Tue, Jul 20, 2010 at 11:06 AM, Igor Peshansky <ig...@us.ibm.com> wrote: > Mohsen Vakilian <reprogram...@gmail.com> wrote on 07/19/2010 06:41:20 PM: > > > I built the x10 compiler from trunk today (7/19) and used it to compile > the > > attached piece of code. The code implements a class that is > parameterized by > > a type that implements the Reducible interface. But, there are problems > when > > using the reducer in the finish statement. I've attached the error > messages > > that I get from the compiler. Could any one help me in fixing my > program? > > Mohsen, > > You seem to be missing an attachment (Reducer.x10). The error indicates > that > you may have forgotten the type bound ({T <: Reducible[T]}) on a generic, > but > I would have to see the code to know for sure. > Igor > P.S. x10.lang.* is auto-imported, you don't need to import it explicitly. > You do need to import x10.util.*. > > > [attachment "compile-error.txt" deleted by Igor Peshansky/Watson/IBM] > -- > Igor Peshansky (note the spelling change!) > IBM T.J. Watson Research Center > X10: Parallel Productivity and Performance (http://x10-lang.org/) > XJ: No More Pain for XML's Gain (http://www.research.ibm.com/xj/) > "I hear and I forget. I see and I remember. I do and I understand" -- > Confucius > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > X10-users mailing list > X10-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/x10-users > ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ X10-users mailing list X10-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/x10-users