Skip to content

Commit 43af511

Browse files
Close #17132 as neg test
For some reason, the derivesFrom issue was only observable in the minimization. The original test case diverges similarly to the previous description, but only when attempting normalizing during CodeGen...
1 parent 5975a06 commit 43af511

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

compiler/src/dotty/tools/backend/jvm/CodeGen.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ class CodeGen(val int: DottyBackendInterface, val primitives: DottyPrimitives)(
8585
case ex: InterruptedException => throw ex
8686
case ex: CompilationUnit.SuspendException => throw ex
8787
case ex: Throwable =>
88-
ex.printStackTrace()
89-
report.error(s"Error while emitting ${unit.source}\n${ex.getMessage}", NoSourcePosition)
88+
report.error(s"Error while emitting ${unit.source}\n${ex.getMessage}", cd.sourcePos)
9089

9190

9291
def genTastyAndSetAttributes(claszSymbol: Symbol, store: ClassNode): Unit =

tests/neg/i17132.scala

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
sealed trait Transformation[T]
3+
4+
case object Count extends Transformation[Int]
5+
case class MultiTransformation[T1 <: Transformation[?], T2 <: Transformation[?]](t1: T1, t2: T2) // error cyclic
6+
extends Transformation[MultiTransformationResult[T1, T2]]
7+
8+
type MultiTransformationResult[T1 <: Transformation[?], T2 <: Transformation[?]] <: Tuple = (T1, T2) match {
9+
case (Transformation[t], MultiTransformation[t1, t2]) => t *: MultiTransformationResult[t1, t2]
10+
case (Transformation[t1], Transformation[t2]) => (t1, t2)
11+
}

0 commit comments

Comments
 (0)