Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8307814

In the case of two methods with Record Patterns, the second one contains a line number from the first method

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 21
    • 20, 21
    • tools
    • b24
    • generic
    • generic

      Using

      openjdk version "21-ea" 2023-09-19
      OpenJDK Runtime Environment (build 21-ea+21-1778)
      OpenJDK 64-Bit Server VM (build 21-ea+21-1778, mixed mode, sharing)

      execution of

      javac --enable-preview --release 21 Example.java
      javap -v -p Example.class

      shows that method "m2" contains a line number from the method "m1".

        1. Example.java
          0.2 kB
        2. javap.txt
          10 kB

            jlahoda Jan Lahoda
            godin Evgeny Mandrikov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: