File tree 1 file changed +1
-10
lines changed
compiler/src/dotty/tools/dotc/core
1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -4248,15 +4248,6 @@ object Types {
4248
4248
case _ => None
4249
4249
}
4250
4250
4251
- val opsSet = Set (
4252
- defn.CompiletimeOpsAnyModuleClass ,
4253
- defn.CompiletimeOpsIntModuleClass ,
4254
- defn.CompiletimeOpsLongModuleClass ,
4255
- defn.CompiletimeOpsFloatModuleClass ,
4256
- defn.CompiletimeOpsBooleanModuleClass ,
4257
- defn.CompiletimeOpsStringModuleClass
4258
- )
4259
-
4260
4251
// Returns Some(true) if the type is a constant.
4261
4252
// Returns Some(false) if the type is not a constant.
4262
4253
// Returns None if there is not enough information to determine if the type is a constant.
@@ -4272,7 +4263,7 @@ object Types {
4272
4263
// constant if the term is constant
4273
4264
case t : TermRef => isConst(t.underlying)
4274
4265
// an operation type => recursively check all argument compositions
4275
- case applied : AppliedType if opsSet.contains (applied.typeSymbol.owner ) =>
4266
+ case applied : AppliedType if defn.isCompiletimeAppliedType (applied.typeSymbol) =>
4276
4267
val argsConst = applied.args.map(isConst)
4277
4268
if (argsConst.exists(_.isEmpty)) None
4278
4269
else Some (argsConst.forall(_.get))
You can’t perform that action at this time.
0 commit comments