Skip to content

Commit efc72ff

Browse files
Rid of compiletime.testing package object
1 parent a9bdf22 commit efc72ff

File tree

1 file changed

+28
-30
lines changed

1 file changed

+28
-30
lines changed
Lines changed: 28 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,31 @@
11
package scala.compiletime
2+
package testing
23

3-
package object testing {
4+
/** Whether the code type checks in the current context?
5+
*
6+
* @param code The code to be type checked
7+
*
8+
* @return false if the code has syntax error or type error in the current context, otherwise returns true.
9+
*
10+
* The code should be a sequence of expressions or statements that may appear in a block.
11+
*/
12+
inline def typeChecks(inline code: String): Boolean =
13+
// implemented in package dotty.tools.dotc.typer.Inliner.Intrinsics
14+
error("Compiler bug: `typeChecks` was not checked by the compiler")
415

5-
/** Whether the code type checks in the current context?
6-
*
7-
* @param code The code to be type checked
8-
*
9-
* @return false if the code has syntax error or type error in the current context, otherwise returns true.
10-
*
11-
* The code should be a sequence of expressions or statements that may appear in a block.
12-
*/
13-
inline def typeChecks(inline code: String): Boolean =
14-
// implemented in package dotty.tools.dotc.typer.Inliner.Intrinsics
15-
error("Compiler bug: `typeChecks` was not checked by the compiler")
16-
17-
/** Whether the code type checks in the current context? If not,
18-
* returns a list of errors encountered on compilation.
19-
* IMPORTANT: No stability guarantees are provided on the format of these
20-
* errors. This means the format and the API may change from
21-
* version to version. This API is to be used for testing purposes
22-
* only.
23-
*
24-
* @param code The code to be type checked
25-
*
26-
* @return a list of errors encountered during parsing and typechecking.
27-
*
28-
* The code should be a sequence of expressions or statements that may appear in a block.
29-
*/
30-
inline def typeCheckErrors(inline code: String): List[Error] =
31-
// implemented in package dotty.tools.dotc.typer.Inliner.Intrinsics
32-
error("Compiler bug: `typeCheckErrors` was not checked by the compiler")
33-
}
16+
/** Whether the code type checks in the current context? If not,
17+
* returns a list of errors encountered on compilation.
18+
* IMPORTANT: No stability guarantees are provided on the format of these
19+
* errors. This means the format and the API may change from
20+
* version to version. This API is to be used for testing purposes
21+
* only.
22+
*
23+
* @param code The code to be type checked
24+
*
25+
* @return a list of errors encountered during parsing and typechecking.
26+
*
27+
* The code should be a sequence of expressions or statements that may appear in a block.
28+
*/
29+
inline def typeCheckErrors(inline code: String): List[Error] =
30+
// implemented in package dotty.tools.dotc.typer.Inliner.Intrinsics
31+
error("Compiler bug: `typeCheckErrors` was not checked by the compiler")

0 commit comments

Comments
 (0)