Skip to content

Move all macro tests to macro test folders #17990

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/neg/i14772.check → tests/neg-macros/i14772.check
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- [E044] Cyclic Error: tests/neg/i14772.scala:7:7 ---------------------------------------------------------------------
-- [E044] Cyclic Error: tests/neg-macros/i14772.scala:7:7 --------------------------------------------------------------
7 | foo(a) // error
| ^
| Overloaded or recursive method impl needs return type
Expand Down
File renamed without changes.
12 changes: 6 additions & 6 deletions tests/neg/i15009a.check → tests/neg-macros/i15009a.check
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
-- Error: tests/neg/i15009a.scala:4:9 ----------------------------------------------------------------------------------
-- Error: tests/neg-macros/i15009a.scala:4:9 ---------------------------------------------------------------------------
4 | '[List[${Type.of[Int]}]] // error
| ^^^^^^^^^^^^^^^
| Type splicing with `$` in quotes not supported anymore
|
| Hint: To use a given Type[T] in a quote just write T directly
-- Error: tests/neg/i15009a.scala:7:16 ---------------------------------------------------------------------------------
-- Error: tests/neg-macros/i15009a.scala:7:16 --------------------------------------------------------------------------
7 | case '[List[$a]] => // error
| ^^
| Type splicing with `$` in quotes not supported anymore
|
| Hint: Use lower cased variable name without the `$` instead
-- Error: tests/neg/i15009a.scala:10:16 --------------------------------------------------------------------------------
-- Error: tests/neg-macros/i15009a.scala:10:16 -------------------------------------------------------------------------
10 | '{ List.empty[$int] } // error
| ^^^^
| Type splicing with `$` in quotes not supported anymore
|
| Hint: To use a given Type[T] in a quote just write T directly
-- Error: tests/neg/i15009a.scala:11:9 ---------------------------------------------------------------------------------
-- Error: tests/neg-macros/i15009a.scala:11:9 --------------------------------------------------------------------------
11 | val t: ${int} = ??? // error
| ^^^^^^
| Type splicing with `$` in quotes not supported anymore
|
| Hint: To use a given Type[T] in a quote just write T directly
-- Error: tests/neg/i15009a.scala:3:2 ----------------------------------------------------------------------------------
-- Error: tests/neg-macros/i15009a.scala:3:2 ---------------------------------------------------------------------------
3 | '[Int] // error
| ^^^^^^
| Quoted types `'[..]` can only be used in patterns.
|
| Hint: To get a scala.quoted.Type[T] use scala.quoted.Type.of[T] instead.
-- [E006] Not Found Error: tests/neg/i15009a.scala:12:2 ----------------------------------------------------------------
-- [E006] Not Found Error: tests/neg-macros/i15009a.scala:12:2 ---------------------------------------------------------
12 | $int // error: Not found: $int
| ^^^^
| Not found: $int
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
-- [E032] Syntax Error: tests/neg/splice-pat.scala:12:16 ---------------------------------------------------------------
-- [E032] Syntax Error: tests/neg-macros/splice-pat.scala:12:16 --------------------------------------------------------
12 | case '{ foo(${ // error: pattern expected
| ^
| pattern expected
|
| longer explanation available when compiling with `-explain`
-- [E040] Syntax Error: tests/neg/splice-pat.scala:15:5 ----------------------------------------------------------------
-- [E040] Syntax Error: tests/neg-macros/splice-pat.scala:15:5 ---------------------------------------------------------
15 | })} => ??? // error
| ^
| '=>' expected, but ')' found
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 0 additions & 2 deletions tests/pos/i10107c.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import scala.quoted._

inline def isTrue: Boolean = true

inline def oneOf(): String = {
Expand Down
2 changes: 0 additions & 2 deletions tests/pos/i11184a.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import scala.quoted._

inline def isTrue: Boolean = true
inline def oneOf: String = inline if isTrue then "foo" else "bar"
def test1 = oneOf
2 changes: 0 additions & 2 deletions tests/pos/i11184b.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import scala.quoted._

inline def isTrue(): Boolean = true
inline def oneOf: String = inline if isTrue() then "foo" else "bar"
def test1 = oneOf
2 changes: 0 additions & 2 deletions tests/pos/i11184c.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import scala.quoted._

object Foo:
inline def isTrue: Boolean = true
inline def oneOf: String = inline if Foo.isTrue then "foo" else "bar"
Expand Down
2 changes: 0 additions & 2 deletions tests/pos/i11184d.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import scala.quoted._

inline def isTrue: Boolean = true
transparent inline def oneOf: Any = inline if isTrue then isTrue else "bar"
def test1 = oneOf
2 changes: 0 additions & 2 deletions tests/pos/i12958.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import scala.quoted.*

package mylib:
object Export:
transparent inline def exported: Any = 1
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion tests/run/i12052/MirrorType.scala
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import scala.quoted._
import scala.deriving._
import scala.compiletime.{erasedValue, constValue, summonFrom, summonInline}

Expand Down
2 changes: 0 additions & 2 deletions tests/run/i8577a.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import scala.quoted._

object Macro:
opaque type StrCtx = StringContext
def apply(ctx: StringContext): StrCtx = ctx
Expand Down
2 changes: 0 additions & 2 deletions tests/run/i8577b.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import scala.quoted._

object Macro:
opaque type StrCtx = StringContext
def apply(ctx: StringContext): StrCtx = ctx
Expand Down
2 changes: 0 additions & 2 deletions tests/run/i8577c.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import scala.quoted._

object Macro:
opaque type StrCtx = StringContext
def apply(ctx: StringContext): StrCtx = ctx
Expand Down
2 changes: 0 additions & 2 deletions tests/run/i8577d.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import scala.quoted._

object Macro:
opaque type StrCtx = StringContext
def apply(ctx: StringContext): StrCtx = ctx
Expand Down
2 changes: 0 additions & 2 deletions tests/run/i8577e.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import scala.quoted._

object Macro:
opaque type StrCtx = StringContext
def apply(ctx: StringContext): StrCtx = ctx
Expand Down
2 changes: 0 additions & 2 deletions tests/run/i8577f.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import scala.quoted._

object Macro:
opaque type StrCtx = StringContext
def apply(ctx: StringContext): StrCtx = ctx
Expand Down
2 changes: 0 additions & 2 deletions tests/run/i8577g.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import scala.quoted._

object Macro:
opaque type StrCtx = StringContext
def apply(ctx: StringContext): StrCtx = ctx
Expand Down
2 changes: 0 additions & 2 deletions tests/run/i8577h.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import scala.quoted._

object Macro:
opaque type StrCtx = StringContext
def apply(ctx: StringContext): StrCtx = ctx
Expand Down
2 changes: 0 additions & 2 deletions tests/run/i8577i.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import scala.quoted._

object Macro:
opaque type StrCtx = StringContext
def apply(ctx: StringContext): StrCtx = ctx
Expand Down
2 changes: 0 additions & 2 deletions tests/run/whitebox-inline.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import scala.quoted._

object Test {
def main(args: Array[String]): Unit = {
val a: Int = blackbox
Expand Down