Supporting Unit.VALUE, to replace #()

#KT-2358 In Progress
This commit is contained in:
Andrey Breslav
2012-09-18 12:20:23 +04:00
parent 83bc835343
commit dee5152f9b
16 changed files with 206 additions and 47 deletions
+1 -1
View File
@@ -58,7 +58,7 @@ public class StringTemplate {
@Override
public Tuple0 invoke(Object o) {
builder.append(o);
return Tuple0.INSTANCE;
return Tuple0.VALUE;
}
});
return builder.toString();
+3 -3
View File
@@ -23,19 +23,19 @@ import org.jetbrains.jet.rt.annotation.AssertInvisibleInResolver;
*/
@AssertInvisibleInResolver
public class Tuple0 extends Tuple {
public static final Tuple0 INSTANCE = new Tuple0();
public static final Tuple0 VALUE = new Tuple0();
private Tuple0() {
}
@Override
public String toString() {
return "()";
return "Unit.VALUE";
}
@Override
public boolean equals(Object o) {
return o == INSTANCE;
return o == VALUE;
}
@Override