File tree 3 files changed +31
-1
lines changed
3 files changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -44,5 +44,12 @@ lazy val testmacros = project.in(file("testmacros"))
44
44
.settings(commonSettings)
45
45
.settings(
46
46
libraryDependencies += scalaOrganization.value % " scala-compiler" % scalaVersion.value,
47
- publish / skip := true
47
+ publish / skip := true ,
48
+ Compile / unmanagedSourceDirectories += {
49
+ val major = CrossVersion .partialVersion(scalaVersion.value) match {
50
+ case Some ((0 | 3 , _)) => " 3"
51
+ case _ => " 2"
52
+ }
53
+ baseDirectory.value / " src" / " main" / s " scala- $major"
54
+ },
48
55
)
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Scala (https://www.scala-lang.org)
3
+ *
4
+ * Copyright EPFL and Lightbend, Inc.
5
+ *
6
+ * Licensed under Apache License 2.0
7
+ * (http://www.apache.org/licenses/LICENSE-2.0).
8
+ *
9
+ * See the NOTICE file distributed with this work for
10
+ * additional information regarding copyright ownership.
11
+ */
12
+
13
+ package testutil
14
+
15
+ import scala .compiletime .testing ._
16
+
17
+ /**
18
+ * Ensures that a code snippet does not typecheck.
19
+ */
20
+ object ShouldNotTypecheck {
21
+ inline def apply (code : String ): Unit = assert(! typeChecks(code))
22
+ inline def apply (code : String , expected : String ): Unit = apply(code)
23
+ }
You can’t perform that action at this time.
0 commit comments