Skip to content

Infinite loop when type indirectly bound by itself #193

Closed
@smarter

Description

@smarter

The following (devious) code results in an infinite loop:

class A {
  type T <: x.type
  val x: T = 42
}

This could probably be fixed by improving the checks for cycles, but it might be simpler and saner to just disallow having types bound by x.type, just like scalac, what do you think?
CC @odersky @namin .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions