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 {
224224 @ tu lazy val Compiletime_constValueOpt : Symbol = CompiletimePackageObject .requiredMethod(" constValueOpt" )
225225 @ tu lazy val Compiletime_code : Symbol = CompiletimePackageObject .requiredMethod(" code" )
226226 @ tu lazy val Compiletime_summonFrom : Symbol = CompiletimePackageObject .requiredMethod(" summonFrom" )
227- @ tu lazy val Compiletime_notNull : Symbol = CompiletimePackageObject .requiredMethod(" $notNull" )
228227 @ tu lazy val CompiletimeTestingPackageObject : Symbol = ctx.requiredModule(" scala.compiletime.testing.package" )
229228 @ tu lazy val CompiletimeTesting_typeChecks : Symbol = CompiletimeTestingPackageObject .requiredMethod(" typeChecks" )
230229 @ 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 {
2121 /** If tree is a constant operation, replace with result. */
2222 def apply [T <: Tree ](tree : T )(implicit ctx : Context ): T = finish(tree) {
2323 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)
3424 case Apply (Select (xt, op), yt :: Nil ) =>
3525 xt.tpe.widenTermRefExpr.normalized match
3626 case ConstantType (x) =>
Original file line number Diff line number Diff line change @@ -63,19 +63,4 @@ package object compiletime {
6363 * }
6464 */
6565 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
8166}
You can’t perform that action at this time.
0 commit comments