Skip to content

Commit

Permalink
Add support for -language:strictEquality
Browse files Browse the repository at this point in the history
  • Loading branch information
adpi2 committed Jul 14, 2023
1 parent 1ce4f65 commit df9ef74
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,7 @@ class InsertExpression(using exprCtx: ExpressionContext) extends Phase:
| case e: InvocationTargetException => throw e.getCause.nn
|
| extension [T] (x: T | Null)
| private def nn: T =
| assert(x != null)
| x.asInstanceOf[T]
| private def nn: T = x.asInstanceOf[T]
|""".stripMargin

override def run(using Context): Unit =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2442,7 +2442,7 @@ abstract class Scala3EvaluationTests(scalaVersion: ScalaVersion) extends ScalaEv
)
}

test("support for -language:strictEquality".only) {
test("support for -language:strictEquality") {
val source =
"""|package example
|
Expand All @@ -2456,7 +2456,7 @@ abstract class Scala3EvaluationTests(scalaVersion: ScalaVersion) extends ScalaEv
Breakpoint(5),
DebugStepAssert.inParallel(
Evaluation.success("msg == \"\"", false),
Evaluation.failed("msg == 5", "not a member of ClassLoader | Null")
Evaluation.failed("msg == 5", "cannot be compared")
)
)
}
Expand Down

0 comments on commit df9ef74

Please sign in to comment.