Skip to content

Commit 6e5dcab

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

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

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

+2-14
Original file line numberDiff line numberDiff line change
@@ -34,24 +34,12 @@ 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 =>
40-
isConcrete(tp1.underlying)
41-
case tp1: ExprType =>
42-
isConcrete(tp1.underlying)
43-
case tp1: AnnotatedType =>
44-
isConcrete(tp1.parent)
45-
case tp1: RefinedOrRecType =>
39+
case tp1: TypeProxy =>
4640
isConcrete(tp1.underlying)
4741
case tp1: AndOrType =>
4842
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)
5543
case _ =>
5644
false
5745
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)