Skip to content

Problems with autoboxing #12

@amelentev

Description

@amelentev
class Boxing {
        static class Vec {
                double d[];
                Vec(double... d) { this.d = d; }
                double get(int i) { return d[i]; }
                double set(int i, double a) { return d[i] = a; }
        }
        public static void main(String[] args) {
                Vec v = new Vec(1.,2.,3.);
                Double d1 = Double.valueOf(4.);
                Double d2 = (v[2] = d1);
        }
}

javac result:

Boxing.java:8: error: Internal error: stack sim error on public static void main(String[] args) {

eclipse:

java.lang.VerifyError: Bad type on operand stack ...

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions