Skip to content

Commit e3388ca

Browse files
committed
Re-enable singleton type assertion in erasure
1 parent d9d5670 commit e3388ca

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

compiler/src/dotty/tools/dotc/transform/Erasure.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,7 @@ object Erasure extends TypeTestsCasts{
234234
* in ExtensionMethods#transform.
235235
*/
236236
def cast(tree: Tree, pt: Type)(implicit ctx: Context): Tree = {
237-
// TODO: The commented out assertion fails for tailcall/t6574.scala
238-
// Fix the problem and enable the assertion.
239-
// assert(!pt.isInstanceOf[SingletonType], pt)
237+
assert(!pt.isInstanceOf[SingletonType], pt)
240238
if (pt isRef defn.UnitClass) unbox(tree, pt)
241239
else (tree.tpe, pt) match {
242240
case (JavaArrayType(treeElem), JavaArrayType(ptElem))

0 commit comments

Comments
 (0)