We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc0a51a commit 77e3e42Copy full SHA for 77e3e42
library/src-bootstrapped/scala/test/package.scala
library/src-bootstrapped/scala/test/typeChecks.scala
@@ -0,0 +1,12 @@
1
+package scala.test
2
+
3
+import scala.quoted._
4
+import scala.tasty.Reflection
5
6
+inline def typeChecks(inline code: String): Boolean = ${ typeChecksImpl(code) }
7
8
+private def typeChecksImpl(code: String)(implicit reflect: Reflection): Expr[Boolean] = {
9
+ import reflect._
10
+ typing.typeChecks(code).toExpr
11
+}
12
0 commit comments