Skip to content

Duplicate bytecode in line number table #15107

Closed
@adpi2

Description

@adpi2

Compiler version

3.1.2

Minimized code

package example

class A {
  def bar: Unit = {
    println("bar")
  }
}

Output

  public void bar();
    Code:
       0: getstatic     #18                 // Field scala/Predef$.MODULE$:Lscala/Predef$;
       3: ldc           #19                 // String bar
       5: invokevirtual #23                 // Method scala/Predef$.println:(Ljava/lang/Object;)V
       8: return
    LineNumberTable:
      line 4: 0
      line 5: 0
    LocalVariableTable:
      Start  Length  Slot  Name   Signature
          0       9     0  this   Lexample/A;

Expectation

The LineNumberTable should only contain line 5: 0
Or it should contain line 4: 0 and line 5: 3

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions