Skip to content

StackOverflowError in scalac (reg. NoArgsTypeRef.typeParams) #12741

Open
@noresttherein

Description

@noresttherein

Reproduction steps

Scala version: 2.13.10

	trait Base[L, R] {
		type U
		val swap :Base[R, L] { type U = Base.this.U }
	}
	trait Sub[L, R] extends Base[L, R] {
		type U
		override val swap :Sub[R, L] { type U = Sub.this. U }
	}

Problem

	at scala.reflect.internal.Types$NoArgsTypeRef.typeParams(Types.scala:2160)
	at scala.reflect.internal.Symbols$Symbol.typeParams(Symbols.scala:1809)
	at scala.reflect.internal.Types$NoArgsTypeRef.typeParams(Types.scala:2160)
	at scala.reflect.internal.Symbols$Symbol.typeParams(Symbols.scala:1809)
	at scala.reflect.internal.Types$NoArgsTypeRef.typeParams(Types.scala:2160)
	at scala.reflect.internal.Symbols$Symbol.typeParams(Symbols.scala:1809)
        ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    compiler crashfixed 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