Skip to content

scala.MatchError on 0.25.0-bin-20200608-fa84627-NIGHTLY #9150

Closed
@letalvoj

Description

@letalvoj

Mimimized example

import scala.compiletime.erasedValue

inline def fooErased[T] = inline erasedValue[T] match { case _ => }
val f = fooErased[EmptyTuple]

Output

Exception in thread "main" scala.MatchError: TypeRef(TermRef(ThisType(TypeRef(NoPrefix,module class scala)),module Tuple$package),type EmptyTuple) (of class dotty.tools.dotc.core.Types$CachedTypeRef)
        at dotty.tools.dotc.ast.tpd$.singleton(tpd.scala:429)
        at dotty.tools.dotc.typer.Inliner.$anonfun$3(Inliner.scala:682)
        at dotty.tools.dotc.ast.TreeTypeMap.transform(TreeTypeMap.scala:79)
        at dotty.tools.dotc.ast.TreeTypeMap.transform(TreeTypeMap.scala:116)
        at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform$$anonfun$2(Trees.scala:1358)
        at scala.collection.immutable.List.mapConserve(List.scala:472)
        at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1358)
        at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transformSub(Trees.scala:1362)
        at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1279)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions