Skip to content

Can't wildcard import from Enumeration #11925

Closed as not planned
Closed as not planned
@som-snytt

Description

@som-snytt

reproduction steps

import User.UserStatus._
object User {
  object UserStatus extends Enumeration {
    val Active = Value("1")
    val Disabled = Value("2")
   }
 }  // the enclosing object is not germane

problem

test/files/neg/cyclics-import.scala:1: error: encountered unrecoverable cycle resolving import.
Note: this is often due in part to a class depending on a definition nested within its companion.
If applicable, you may wish to try moving some members into another object.
import User.UserStatus._
            ^
one error found

expectation

I expect not to go wut.

Oh, I see I wutted once before: #10336 (comment)

This is a reduction of the neg test, which was added as part of message enhancement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixed in Scala 3This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions