cincheo / jsweet

A Java to JavaScript transpiler.
http://www.jsweet.org
Other
1.46k stars 160 forks source link

ERROR: cannot find name 'long' with java long field. #106

Closed uuidcode closed 8 years ago

uuidcode commented 8 years ago

run mvn jsweet:jsweet below java code. ERROR: cannot find name 'long' is occured.

public class Project {
    private Long projectId;
    private String name;

    public String getName() {
        return this.name;
    }

    public Project setName(String name) {
        this.name = name;
        return this;
    }
    public Long getProjectId() {
        return this.projectId;
    }

    public Project setProjectId(Long projectId) {
        this.projectId = projectId;
        return this;
    }
}
renaudpawlak commented 8 years ago

Ouch. It looks like you have found the forgotten type. I have just committed mapping for Java longs to TypeScript numbers. For some reason, it was ok for all number types, except for longs. It should work with the latest snapshot now. Thanks for reporting this.

uuidcode commented 8 years ago

I checked it. OK! thanks.