Rename object's $id field to $id$

To avoid clash with user-defined fields
This commit is contained in:
Alexey Andreev 2017-06-07 12:46:43 +03:00
parent 91a7f69bee
commit 27bb8fe9ed
4 changed files with 4 additions and 12 deletions

View File

@ -34,10 +34,6 @@ import org.teavm.runtime.RuntimeClass;
import org.teavm.runtime.RuntimeJavaObject; import org.teavm.runtime.RuntimeJavaObject;
import org.teavm.runtime.RuntimeObject; import org.teavm.runtime.RuntimeObject;
/**
*
* @author Alexey Andreev
*/
@Superclass("") @Superclass("")
public class TObject { public class TObject {
Monitor monitor; Monitor monitor;

View File

@ -323,7 +323,7 @@ public class Renderer implements RenderingManager {
} }
if (cls.getName().equals("java.lang.Object")) { if (cls.getName().equals("java.lang.Object")) {
writer.append("this.$id").ws().append('=').ws().append("0;").softNewLine(); writer.append("this.$id$").ws().append('=').ws().append("0;").softNewLine();
} }
writer.outdent().append("}").newLine(); writer.outdent().append("}").newLine();

View File

@ -124,7 +124,7 @@ function $rt_arraycls(cls) {
if (result === null) { if (result === null) {
var arraycls = function(data) { var arraycls = function(data) {
this.data = data; this.data = data;
this.$id = 0; this.$id$ = 0;
}; };
arraycls.prototype = new ($rt_objcls())(); arraycls.prototype = new ($rt_objcls())();
arraycls.prototype.constructor = arraycls; arraycls.prototype.constructor = arraycls;

View File

@ -18,17 +18,13 @@ package org.teavm.platform;
import org.teavm.jso.JSObject; import org.teavm.jso.JSObject;
import org.teavm.jso.JSProperty; import org.teavm.jso.JSProperty;
/**
*
* @author Alexey Andreev
*/
public interface PlatformObject extends JSObject { public interface PlatformObject extends JSObject {
@JSProperty("constructor") @JSProperty("constructor")
PlatformClass getPlatformClass(); PlatformClass getPlatformClass();
@JSProperty("$id") @JSProperty("$id$")
int getId(); int getId();
@JSProperty("$id") @JSProperty("$id$")
void setId(int id); void setId(int id);
} }