Skip to content

Commit fabc9f1

Browse files
committed
Merge pull request scala#3589 from xeno-by/topic/whitebox-typecheck-expecting-unit
test case that verifies SI-8352
2 parents 2c91778 + fef3c33 commit fabc9f1

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

test/files/pos/t8352.check

Whitespace-only changes.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import scala.reflect.macros.whitebox._
2+
import scala.language.experimental.macros
3+
4+
object Macros {
5+
def impl(c: Context)(x: c.Expr[Boolean]): c.Expr[Boolean] = x
6+
def foo(x: Boolean): Boolean = macro impl
7+
}

test/files/pos/t8352/Test_2.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
object Test extends App {
2+
def expectUnit() {
3+
Macros.foo(true)
4+
}
5+
}

0 commit comments

Comments
 (0)