Open Atry opened 2 years ago
Thanks for reporting! It looks like with opaque type the object classfile is different than when the object is a companion to a non opaque topelevel type.
mypackage/MyOpaqueType$package$MyOpaqueType$.class
instead of mypackage/MyOpaqueType$.class
If we put the type into another class/object then the resulting classfiles are as we would expect them. We could special case this scenario or see if it actually needs to be fixed in the compiler
Describe the bug
Reproduction steps:
src/main/scala/mypackage/MyOpaqueType.scala
in the editorThen the error message is shown in a new tab
Expected behavior
Show decompiled in a new tab
Operating system
macOS
Editor/Extension
VS Code
Version of Metals
0.11.2
Extra context or search terms
Note that there is a class file compiled from the companion object at
mypackage/MyOpaqueType$package$MyOpaqueType$.class
, notmypackage/MyOpaqueType$.class
.