File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -431,13 +431,9 @@ trait Deriving { this: Typer =>
431
431
/** Synthesized instance for `Generic[<clsType>]` */
432
432
def genericInstance (clsType : Type ): tpd.Tree = {
433
433
val shape = shapeOfType(clsType)
434
- if (shape.exists) {
435
- val genericType = RefinedType (defn.GenericType .appliedTo(clsType), tpnme.Shape , TypeAlias (shape))
436
- val finalizer = new Finalizer
437
- finalizer.genericRHS(genericType, finalizer.genericClassRHS)
438
- }
439
- else errorTree(tpd.EmptyTree .withPos(codePos),
440
- i " cannot take shape of type $clsType" , codePos)
434
+ val genericType = RefinedType (defn.GenericType .appliedTo(clsType), tpnme.Shape , TypeAlias (shape))
435
+ val finalizer = new Finalizer
436
+ finalizer.genericRHS(genericType, finalizer.genericClassRHS)
441
437
}
442
438
}
443
439
}
You can’t perform that action at this time.
0 commit comments