Skip to content

Instantly share code, notes, and snippets.

@cogumbreiro
Created June 6, 2013 22:28
Show Gist options
  • Save cogumbreiro/5725520 to your computer and use it in GitHub Desktop.
Save cogumbreiro/5725520 to your computer and use it in GitHub Desktop.
This code breaks the compiler for X10 2.3.1
public abstract class AbstractSettable[T] implements Settable[T] {
public operator this()=(value:T) {
set(value);
}
}
public interface Settable[T] {
operator this()=(value:T):void;
def set(value:T):void;
}
public class SettableImpl[T] extends AbstractSettable[T] {
private var data:T;
public def this(value:T) {
this.data = value;
}
public def set(value:T) {
data = value;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment