Fixes bugs

This commit is contained in:
konsoletyper 2014-04-07 13:01:19 +04:00
parent 15478da9ed
commit ad3fa3b531
3 changed files with 29 additions and 25 deletions

View File

@ -508,6 +508,9 @@ public class TString extends TObject implements TSerializable, TComparable<TStri
if (this == other) { if (this == other) {
return true; return true;
} }
if (other == null) {
return false;
}
if (length() != other.length()) { if (length() != other.length()) {
return false; return false;
} }

View File

@ -56,10 +56,9 @@ public final class TSystem extends TObject {
return null; return null;
} }
public static TString getProperty(@SuppressWarnings("unused") TString key, public static TString getProperty(TString key, TString def) {
@SuppressWarnings("unused") TString def) { TString value = getProperty(key);
// TODO: make implementation return value != null ? value : def;
return null;
} }
@GeneratedBy(SystemNativeGenerator.class) @GeneratedBy(SystemNativeGenerator.class)

View File

@ -244,7 +244,7 @@ public class Renderer implements ExprVisitor, StatementVisitor, RenderingContext
writer.ws().append("});").newLine().outdent(); writer.ws().append("});").newLine().outdent();
List<MethodNode> nonInitMethods = new ArrayList<>(); List<MethodNode> nonInitMethods = new ArrayList<>();
List<MethodNode> virtualMethods = new ArrayList<>(); List<MethodNode> virtualMethods = new ArrayList<>();
if (!cls.getModifiers().contains(NodeModifier.INTERFACE)) {
writer.append("function ").appendClass(cls.getName()).append("_$clinit()").ws() writer.append("function ").appendClass(cls.getName()).append("_$clinit()").ws()
.append("{").softNewLine().indent(); .append("{").softNewLine().indent();
writer.appendClass(cls.getName()).append("_$clinit").ws().append("=").ws() writer.appendClass(cls.getName()).append("_$clinit").ws().append("=").ws()
@ -266,6 +266,7 @@ public class Renderer implements ExprVisitor, StatementVisitor, RenderingContext
.append("();").softNewLine(); .append("();").softNewLine();
} }
writer.outdent().append("}").newLine(); writer.outdent().append("}").newLine();
if (!cls.getModifiers().contains(NodeModifier.INTERFACE)) {
for (MethodNode method : cls.getMethods()) { for (MethodNode method : cls.getMethods()) {
cls.getMethods(); cls.getMethods();
if (!method.getModifiers().contains(NodeModifier.STATIC)) { if (!method.getModifiers().contains(NodeModifier.STATIC)) {
@ -286,6 +287,7 @@ public class Renderer implements ExprVisitor, StatementVisitor, RenderingContext
writer.append("]);").newLine(); writer.append("]);").newLine();
} }
} }
for (MethodNode method : nonInitMethods) { for (MethodNode method : nonInitMethods) {
renderBody(method, false); renderBody(method, false);
} }