Skip to content

Missing occurrence for structural type member #16912

@tgodzik

Description

@tgodzik

Compiler version

3.2.2

Minimized code

import reflect.Selectable.reflectiveSelectable

object StructuralTypes:
  val V: Object {
    def scalameta: String
  } = new:
    def scalameta = "4.0"
  V.scalameta
end StructuralTypes

Output

import reflect.Selectable/*scala.reflect.Selectable.*/.reflectiveSelectable/*scala.reflect.Selectable.reflectiveSelectable().*/

object StructuralTypes/*example.StructuralTypes.*/:
  val V/*example.StructuralTypes.V.*/: Object/*java.lang.Object#*/ {
    def scalameta/*local2*/: String/*scala.Predef.String#*/
  } = /*local4*/new:
    def scalameta/*local3*/ = "4.0"
  V/*example.StructuralTypes.V.*/.scalameta
end StructuralTypes/*example.StructuralTypes.*/

Expectation

import reflect.Selectable/*scala.reflect.Selectable.*/.reflectiveSelectable/*scala.reflect.Selectable.reflectiveSelectable().*/

object StructuralTypes/*example.StructuralTypes.*/:
  val V/*example.StructuralTypes.V.*/: Object/*java.lang.Object#*/ {
    def scalameta/*local2*/: String/*scala.Predef.String#*/
  } = /*local4*/new:
    def scalameta/*local3*/ = "4.0"
  V/*example.StructuralTypes.V.*/.scalameta/*local2*/
end StructuralTypes/*example.StructuralTypes.*/

We have scalameta (local2) as ocurrence in the document.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions