Skip to content

Quote pattern fails desugaring Function #6998

Closed
@nicolasstucki

Description

@nicolasstucki

minimized code

val '{ $f : Int => Double } = ???
Stack trace
assertion failed: Function(List(ValDef($f,Ident(Int),EmptyTree)),Block(List(),Ident(Double)))
dotty.DottyPredef$.assertFail(DottyPredef.scala:16)
dotty.tools.dotc.ast.Trees$Instance$TreeAccumulator.foldMoreCases(Trees.scala:1470)
dotty.tools.dotc.ast.Trees$Instance$TreeAccumulator.foldOver(Trees.scala:1465)
dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.traverseChildren(Trees.scala:1482)
dotty.tools.dotc.ast.desugar$$anon$5.traverse(Desugar.scala:1703)
dotty.tools.dotc.ast.desugar$.dotty$tools$dotc$ast$desugar$$$_$collect$1(Desugar.scala:1705)
dotty.tools.dotc.ast.desugar$.getVariables(Desugar.scala:1708)
dotty.tools.dotc.ast.desugar$.makePatDef(Desugar.scala:1032)
dotty.tools.dotc.ast.desugar$.patDef$$anonfun$2(Desugar.scala:972)
scala.collection.immutable.List.map(List.scala:286)
dotty.tools.dotc.ast.desugar$.patDef(Desugar.scala:972)
dotty.tools.dotc.ast.desugar$.defTree(Desugar.scala:1111)
dotty.tools.dotc.typer.Namer.expand(Namer.scala:440)
dotty.tools.dotc.typer.Namer.index$$anonfun$1(Namer.scala:721)
dotty.runtime.function.JProcedure1.apply(JProcedure1.java:15)
dotty.runtime.function.JProcedure1.apply(JProcedure1.java:10)
scala.collection.immutable.List.foreach(List.scala:392)
dotty.tools.dotc.typer.Namer.index(Namer.scala:721)
dotty.tools.dotc.typer.Typer.typedBlockStats(Typer.scala:705)
dotty.tools.dotc.typer.Typer.typedBlock(Typer.scala:708)
dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2013)
dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2061)
dotty.tools.dotc.typer.Typer.typed(Typer.scala:2099)
dotty.tools.dotc.typer.Typer.typed(Typer.scala:2111)
dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:2189)
dotty.tools.dotc.typer.Typer.typedBlock(Typer.scala:709)
dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2013)
dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2061)
dotty.tools.dotc.typer.Typer.typed(Typer.scala:2099)
dotty.tools.dotc.typer.Typer.typed(Typer.scala:2111)
dotty.tools.dotc.typer.Namer.typedAheadExpr$$anonfun$1(Namer.scala:1200)
dotty.tools.dotc.typer.Namer.typedAhead(Namer.scala:1190)
dotty.tools.dotc.typer.Namer.typedAheadExpr(Namer.scala:1200)
dotty.tools.dotc.typer.Namer.valOrDefDefSig(Namer.scala:1373)
dotty.tools.dotc.typer.Namer.defDefSig(Namer.scala:1436)
dotty.tools.dotc.typer.Namer$Completer.typeSig(Namer.scala:759)
dotty.tools.dotc.typer.Namer$Completer.completeInCreationContext(Namer.scala:878)
dotty.tools.dotc.typer.Namer$Completer.complete(Namer.scala:785)
dotty.tools.dotc.core.SymDenotations$SymDenotation.completeFrom(SymDenotations.scala:251)
dotty.tools.dotc.core.Denotations$Denotation.completeInfo$1(Denotations.scala:180)
dotty.tools.dotc.core.Denotations$Denotation.info(Denotations.scala:182)
dotty.tools.dotc.core.SymDenotations$SymDenotation.ensureCompleted(SymDenotations.scala:391)
dotty.tools.dotc.typer.Typer.retrieveSym(Typer.scala:1958)
dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:1983)
dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2060)
dotty.tools.dotc.typer.Typer.typed(Typer.scala:2099)
dotty.tools.dotc.typer.Typer.typed(Typer.scala:2111)
dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:2130)
dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:2176)
dotty.tools.dotc.typer.Typer.typedBlockStats(Typer.scala:705)
dotty.tools.dotc.typer.Typer.typedBlock(Typer.scala:708)
dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2013)
dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2061)
dotty.tools.dotc.typer.Typer.typed(Typer.scala:2099)
dotty.tools.dotc.typer.Typer.typed(Typer.scala:2111)
dotty.tools.dotc.typer.Typer.typedFunctionValue(Typer.scala:981)
dotty.tools.dotc.typer.Typer.typedFunction(Typer.scala:803)
dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2015)
dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2061)
dotty.tools.dotc.typer.Typer.typed(Typer.scala:2099)
dotty.tools.dotc.typer.Typer.typed(Typer.scala:2111)
dotty.tools.dotc.typer.Typer.makeContextualFunction(Typer.scala:2087)
dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2058)
dotty.tools.dotc.typer.ProtoTypes$FunProto.$anonfun$3(ProtoTypes.scala:328)
dotty.tools.dotc.typer.ProtoTypes$FunProto.cacheTypedArg(ProtoTypes.scala:291)
dotty.tools.dotc.typer.ProtoTypes$FunProto.typedArg(ProtoTypes.scala:328)
dotty.tools.dotc.typer.Applications$ApplyToUntyped.typedArg(Applications.scala:789)
dotty.tools.dotc.typer.Applications$ApplyToUntyped.typedArg(Applications.scala:789)
dotty.tools.dotc.typer.Applications$Application.addTyped$1(Applications.scala:531)
dotty.tools.dotc.typer.Applications$Application.matchArgs(Applications.scala:598)
dotty.tools.dotc.typer.Applications$Application.init(Applications.scala:352)
dotty.tools.dotc.typer.Applications$TypedApply.<init>(Applications.scala:690)
dotty.tools.dotc.typer.Applications$ApplyToUntyped.<init>(Applications.scala:788)
dotty.tools.dotc.typer.Applications.simpleApply$1(Applications.scala:861)
dotty.tools.dotc.typer.Applications.realApply$4$$anonfun$3(Applications.scala:890)
dotty.tools.dotc.typer.Typer.tryEither(Typer.scala:2197)
dotty.tools.dotc.typer.Applications.realApply$1(Applications.scala:901)
dotty.tools.dotc.typer.Applications.typedApply(Applications.scala:936)
dotty.tools.dotc.typer.Typer.typedApply(Typer.scala:83)
dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2006)
dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2061)
dotty.tools.dotc.typer.Typer.typed(Typer.scala:2099)
dotty.tools.dotc.typer.Typer.typed(Typer.scala:2111)
dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:2189)
dotty.tools.dotc.typer.Typer.typedDefDef(Typer.scala:1544)
dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:1993)
dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2060)
dotty.tools.dotc.typer.Typer.typed(Typer.scala:2099)
dotty.tools.dotc.typer.Typer.typed(Typer.scala:2111)
dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:2130)
dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:2176)
dotty.tools.dotc.typer.Typer.typedClassDef(Typer.scala:1673)
dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:1996)
dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2060)
dotty.tools.dotc.typer.Typer.typed(Typer.scala:2099)
dotty.tools.dotc.typer.Typer.typed(Typer.scala:2111)
dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:2130)
dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:2176)
dotty.tools.dotc.typer.Typer.typedPackageDef(Typer.scala:1797)
dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2036)
dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2061)
dotty.tools.dotc.typer.Typer.typed(Typer.scala:2099)
dotty.tools.dotc.typer.Typer.typed(Typer.scala:2111)
dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:2189)
dotty.tools.dotc.typer.FrontEnd.typeCheck$$anonfun$1(FrontEnd.scala:75)
dotty.runtime.function.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
dotty.tools.dotc.typer.FrontEnd.monitor(FrontEnd.scala:41)
dotty.tools.dotc.typer.FrontEnd.typeCheck(FrontEnd.scala:79)
dotty.tools.dotc.typer.FrontEnd.runOn$$anonfun$3(FrontEnd.scala:109)
dotty.runtime.function.JProcedure1.apply(JProcedure1.java:15)
dotty.runtime.function.JProcedure1.apply(JProcedure1.java:10)
scala.collection.immutable.List.foreach(List.scala:392)
dotty.tools.dotc.typer.FrontEnd.runOn(FrontEnd.scala:109)
dotty.tools.dotc.Run.runPhases$4$$anonfun$4(Run.scala:158)
dotty.runtime.function.JProcedure1.apply(JProcedure1.java:15)
dotty.runtime.function.JProcedure1.apply(JProcedure1.java:10)
scala.collection.IndexedSeqOptimized.foreach(IndexedSeqOptimized.scala:36)
scala.collection.IndexedSeqOptimized.foreach$(IndexedSeqOptimized.scala:33)
scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:198)
dotty.tools.dotc.Run.runPhases$5(Run.scala:170)
dotty.tools.dotc.Run.compileUnits$$anonfun$1(Run.scala:178)
dotty.runtime.function.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
dotty.tools.dotc.util.Stats$.maybeMonitored(Stats.scala:65)
dotty.tools.dotc.Run.compileUnits(Run.scala:185)
dotty.tools.dotc.Run.compileSources(Run.scala:120)
dotty.tools.dotc.Run.compile(Run.scala:104)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions