It's the issue of where the name comes from. Normally, for constructors created in the parser, name is set to nf.Id(pos(3), "this"). However, there are more places where constructors are created – namely, ClassDecl_c.createDefaultConstructor() and LocalClassRemover.addConstructor(). Both of these happen in Polyglot, and are never overridden. Both use the class name as the constructor name.
I've fixed the first one in SVN. However, I can't fix the second without duplicating large chunks of code from Polyglot. The right solution is to create a method constructorName() in LocalClassRemover, and make that overridable. That way, X10LocalClassRemover can control what the constructor's name is.
A better solution would be to remove the name node from constructors altogether, or, at least, make it part of the protected functionality (i.e., let subclasses override it, but do not expose the name to outside clients).
Polyglot only gives me the ClassName() ("Foo()") label back, even if it's defined as this().
Asking Nate.