Hi,

One of my benchmarks could pass the type checker and then the linker
failed. It is a large benchmark but I worked to localise the problem.
Here I present them abstractly in two small examples.
Both of the problems seem to be with structs (There is no problem if
we change struct to class.)

========================================
Example 1:
struct A {
}

struct B {
    val array: Array[A] = Array.makeVal[A](1..10, ((p:Point(1)) => new A()));
}

public class Test {     
        public static def main(args: Rail[String]): Void {
            val b = new B();
        }
}

Error Message:
x10c++: In file included from ./Test.h:16,
     from Test.cc:1:
     ./B.struct_h:29: error: ‘A’ was not declared in this scope
     ./B.struct_h:29: error: template argument 1 is invalid
     ./B.struct_h:29: error: template argument 1 is invalid
x10c++: Non-zero return code: 1
2 errors.

========================================
Example 1:
class A {
    public def this(val i: Int) {
        f(i);
    }

    public proto def f(val i: Int) {
    }
}

public class Test {     
        public static def main(args: Rail[String]): Void {
            val a = new A(1);
        }
}

Error Message:
x10c++: A.cc: In static member function ‘static void
A_methods::_constructor(A*, x10_int)’:
     A.cc:73: error: no matching function for call to
‘A_methods::f(A*&, x10_int&)’
     ./A.h:30: note: candidates are: static void A_methods::f(A, x10_int)
x10c++: Non-zero return code: 1
2 errors.
========================================

We would be grateful if you fix these quickly as our translation needs them.

Best regards,
Mohsen

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users

Reply via email to