File tree Expand file tree Collapse file tree 3 files changed +0
-26
lines changed
compiler/src/dotty/tools/dotc
library/src/scala/compiletime Expand file tree Collapse file tree 3 files changed +0
-26
lines changed Original file line number Diff line number Diff line change @@ -224,7 +224,6 @@ class Definitions {
224
224
@ tu lazy val Compiletime_constValueOpt : Symbol = CompiletimePackageObject .requiredMethod(" constValueOpt" )
225
225
@ tu lazy val Compiletime_code : Symbol = CompiletimePackageObject .requiredMethod(" code" )
226
226
@ tu lazy val Compiletime_summonFrom : Symbol = CompiletimePackageObject .requiredMethod(" summonFrom" )
227
- @ tu lazy val Compiletime_notNull : Symbol = CompiletimePackageObject .requiredMethod(" $notNull" )
228
227
@ tu lazy val CompiletimeTestingPackageObject : Symbol = ctx.requiredModule(" scala.compiletime.testing.package" )
229
228
@ tu lazy val CompiletimeTesting_typeChecks : Symbol = CompiletimeTestingPackageObject .requiredMethod(" typeChecks" )
230
229
@ tu lazy val CompiletimeTesting_typeCheckErrors : Symbol = CompiletimeTestingPackageObject .requiredMethod(" typeCheckErrors" )
Original file line number Diff line number Diff line change @@ -21,16 +21,6 @@ object ConstFold {
21
21
/** If tree is a constant operation, replace with result. */
22
22
def apply [T <: Tree ](tree : T )(implicit ctx : Context ): T = finish(tree) {
23
23
tree match {
24
- // TODO: fix it later
25
- // case CompareNull(operand, testEqual)
26
- // if ctx.explicitNulls && !operand.typeOpt.isNullableUnion =>
27
- // println(tree.show)
28
- // Constant(!testEqual)
29
- // case CompareNull(TrackedRef(ref), testEqual)
30
- // if ctx.settings.YexplicitNulls.value && ctx.notNullInfos.impliesNotNull(ref) =>
31
- // //throw new NullPointerException()
32
- // // TODO maybe drop once we have general Nullability?
33
- // Constant(!testEqual)
34
24
case Apply (Select (xt, op), yt :: Nil ) =>
35
25
xt.tpe.widenTermRefExpr.normalized match
36
26
case ConstantType (x) =>
Original file line number Diff line number Diff line change @@ -63,19 +63,4 @@ package object compiletime {
63
63
* }
64
64
*/
65
65
type S [N <: Int ] <: Int
66
-
67
- /** Strip the Null type from `x`
68
- *
69
- * ```
70
- * val x: String|Null = ???
71
- * val _: String = $notNull[String, x.type & String](x)
72
- *
73
- * var y: String|Null = ???
74
- * val _: String = $notNull[String, String](x)
75
- * ```
76
- *
77
- * Since `$notNull` is erased later, if `x.type` is a stable path,
78
- * the type of `$notNull(x)` is also a stable path.
79
- */
80
- inline def $notNull [A , B ](x : => A | Null ): B = x.asInstanceOf
81
66
}
You can’t perform that action at this time.
0 commit comments