Skip to content

Spurious 'type is not a member' #15177

Closed
@OlegYch

Description

@OlegYch

Compiler version

3.0.0 - 3.2.0-RC1-bin-20220511-7c446ce-NIGHTLY

Minimized code

trait DomainIdProvider[T] {
  type Id = List[T]
}
object Country extends DomainIdProvider[Country]
case class Country(
    id: Country.Id,
) 

Output

type Id is not a member of object Country

Explanation

This always compiles fine on 2.13 and sometimes on 3. I couldn't find the exact rule when it compiles and when it doesn't.
In the example above it would compile fine if i move case class definition before object, but in other cases this doesn't help.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions