rsc icon indicating copy to clipboard operation
rsc copied to clipboard

Scalasig not recursing into package type for prefix

Open wiwa opened this issue 6 years ago • 1 comments

Rsc misses out on including the package type as a prefix.

package foo

object O {
  class D
}

class C extends O.D
       tag: CLASSINFOtpe
       sym: foo.#C#
       parents {
         tag: TYPEREFtpe
         pre {
-          tag: SINGLEtpe
-          pre {
-            tag: THIStpe
-            sym: foo.#
-          }
-          sym: foo.#O.
+          tag: THIStpe
+          sym: foo.#O.#
         }
         sym: foo.#O.#D#
       }
     }
   }

wiwa avatar Jul 25 '19 22:07 wiwa

Intriguingly, naively recursing into the prefixes for emitting causes return type information to be wrong:

   info {
     tag: METHODtpe
     ret {
       tag: TYPEREFtpe
       pre {
-        tag: THIStpe
-        sym: foo.#O.#
+        tag: SINGLEtpe
+        pre {
+          tag: THIStpe
+          sym: foo.#
+        }
+        sym: foo.#O.
       }
       sym: foo.#O.#D#
     }
   }
 }

wiwa avatar Sep 12 '19 04:09 wiwa