Skip to content

Commit 5917e12

Browse files
jchybtgodzik
authored andcommitted
Move previously-failing-now-compiling tests to pos tests
They were previously fixed from crashing to erroring state, now compiling. The cause of the previous crashes looks the same as the one fixes in this PR, where the stale synthetic top level package object would be brought forward, causing other stale symbols to be used. [Cherry-picked 08b8340]
1 parent c29fa28 commit 5917e12

File tree

7 files changed

+8
-15
lines changed

7 files changed

+8
-15
lines changed

tests/neg/i19351.check

Lines changed: 0 additions & 4 deletions
This file was deleted.

tests/neg/i19351/A.scala

Lines changed: 0 additions & 5 deletions
This file was deleted.

tests/neg/i19351a.check

Lines changed: 0 additions & 4 deletions
This file was deleted.

tests/pos-macros/i19351/A.scala

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// object A:
2+
val x: Int = 1
3+
inline def myMacro(): x.type = ${myMacroExpr}
4+
def test = myMacro()
5+
6+
@main def main() = ()
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import scala.quoted.*
2-
//import A.*
2+
// import A.*
33
def myMacroExpr(using Quotes): Expr[x.type] = '{???}
File renamed without changes.

tests/neg/i19351a/Test.scala renamed to tests/pos-macros/i19351a/Test.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ type Bool = [R] => (R, R) => R
55
val True: Bool = [R] => (t: R, _: R) => t
66
val False: Bool = [R] => (_: R, f: R) => f
77

8-
inline def not(b: Bool): Bool = ${notMacro('b)} // error
8+
inline def not(b: Bool): Bool = ${notMacro('b)}
99
inline def show(b: Bool): String = ${showMacro('b)}
1010
//inline def not(b: Bool): Bool = ${foldMacro('b, 'False, 'True)}
1111
//inline def show(b: Bool): String = ${foldMacro('b, '{"TRUE"}, '{"FALSE"})}

0 commit comments

Comments
 (0)