File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -912,7 +912,8 @@ trait SymbolOps { self: TypeOps =>
912
912
case adt : ADTType =>
913
913
val sort = adt.getSort
914
914
val cons = sort.constructors.sortBy(_.fields.size).head
915
- if (sort.hasInvariant) None
915
+ if (seen(adt)) None
916
+ else if (sort.hasInvariant) None
916
917
else if (! sort.definition.isWellFormed) Some (false )
917
918
else if (sort.constructors.sortBy(_.fields.size).exists(cons =>
918
919
cons.fields.forall(vd => hasInstance(vd.tpe, seen + adt) contains true )))
@@ -945,8 +946,9 @@ trait SymbolOps { self: TypeOps =>
945
946
val sort = adt.getSort
946
947
if (! sort.definition.isWellFormed) throw NoSimpleValue (adt)
947
948
948
- if (seen(adt) && inLambda) {
949
- Choose (ValDef .fresh(" res" , adt), BooleanLiteral (true ))
949
+ if (seen(adt)) {
950
+ if (inLambda) Choose (ValDef .fresh(" res" , adt), BooleanLiteral (true ))
951
+ else throw NoSimpleValue (adt)
950
952
} else if (sort.hasInvariant) {
951
953
if (! allowSolver) throw NoSimpleValue (adt)
952
954
You can’t perform that action at this time.
0 commit comments