Skip to content

Cross entry references failing in repl translation #472

Description

@tjpalmer

This shouldn't fail to find A:

$ class A {}
interactive#0: A__0
$ class B { public a: A = new A() }
interactive#1: B__0
$ translate(1, "java")
1: class B { public a: A = new A() }
                       
[interactive#1:1+20-21]: interactive#0 does not export symbol A__0
Translated java for interactive#1
  interactive/
    src/
      main/
        java/
          interactive/
            i0001/
              B.java: text/x-java-source
                package interactive.i0001;
                final class B {
                    public final A a;
                    public B() {
                        A t_15 = new A();
                        this.a = t_15;
                    }
                    public A getA() {
                        return this.a;
                    }
                }
              I0001Main.java: text/x-java-source
                package interactive.i0001;
                import temper.core.Core;
                import static interactive.i0001.I0001Global.export;
                public final class I0001Main {
                    private I0001Main() {
                    }
                    public static void main(String[] args) {
                        Core.initSimpleLogging();
                        Core.doNothing(export);
                        Core.waitUntilTasksComplete();
                    }
                }
              I0001Global.java: text/x-java-source
                package interactive.i0001;
                public final class I0001Global {
                    private I0001Global() {
                    }
                    public static Class export;
                    static {
                        export = return__13;
                    }
                }
              I0001Main.java.map: application/json
                { "version": 3, "file": "java/interactiv⋯,SAAiC,CAAA,AAAjC,MAAiC;AAAA;AAAA;AAAA" }
              I0001Global.java.map: application/json
                { "version": 3, "file": "java/interactiv⋯BAAA;AAAjC;AAAiC,iBAAAA,UAAA;AAAA;AAAA" }
              B.java.map: application/json
                { "version": 3, "file": "java/interactiv⋯,WAAAF,CAAA;AAAA,oBAAAC,CAAA;AAAA;AAAA" }
interactive#2: void

We should fix that. And then I was also planning to look into masking if there were different A definitions in the history. See this discussion on that. It would be good to test that at the same time as looking into the issue above.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions