Skip to content

Commit a9ba7a8

Browse files
committed
Streamline isConcrete a bit more
1 parent ef74d39 commit a9ba7a8

File tree

2 files changed

+3
-16
lines changed

2 files changed

+3
-16
lines changed

compiler/src/dotty/tools/dotc/core/MatchTypes.scala

+2-16
Original file line numberDiff line numberDiff line change
@@ -34,24 +34,10 @@ object MatchTypes:
3434
true
3535
case tp1: TermRef =>
3636
!tp1.symbol.is(Param) && isConcrete(tp1.underlying)
37-
case tp1: TermParamRef =>
37+
case _: (ParamRef | MatchType) =>
3838
false
39-
case tp1: SingletonType =>
39+
case tp1: TypeProxy =>
4040
isConcrete(tp1.underlying)
41-
case tp1: ExprType =>
42-
isConcrete(tp1.underlying)
43-
case tp1: AnnotatedType =>
44-
isConcrete(tp1.parent)
45-
case tp1: RefinedOrRecType =>
46-
isConcrete(tp1.underlying)
47-
case tp1: AndOrType =>
48-
isConcrete(tp1.tp1) && isConcrete(tp1.tp2)
49-
case tp1: TypeVar =>
50-
isConcrete(tp1.underlying)
51-
case tp1: LazyRef =>
52-
isConcrete(tp1.ref)
53-
case tp1: FlexibleType =>
54-
isConcrete(tp1.hi)
5541
case _ =>
5642
false
5743
end isConcrete

compiler/src/dotty/tools/dotc/core/Types.scala

+1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ object Types extends TypeUtils {
7676
* | +- HKTypeLambda
7777
* | +- MatchType
7878
* | +- FlexibleType
79+
* | +- LazyRef
7980
* |
8081
* +- GroundType -+- AndType
8182
* +- OrType

0 commit comments

Comments
 (0)