summaryrefslogtreecommitdiff
path: root/test/pending/run/macro-overload/Macros_1.scala
blob: f24c69ea7bebcf5ed75b7d6a6320c0ce49e7eaa0 (plain) (blame)
1
2
3
4
5
6
7
8
9
object Macros {
  def macro bar(x: Int): Int = Apply(Select(Select(Ident("scala"), newTermName("Predef")), newTermName("println")), List(Literal(Constant("object-Int"))))
  def macro bar(x: String): String = Apply(Select(Select(Ident("scala"), newTermName("Predef")), newTermName("println")), List(Literal(Constant("object-String"))))
}

class Macros {
  def macro bar(x: Int): Int = Apply(Select(Select(Ident("scala"), newTermName("Predef")), newTermName("println")), List(Literal(Constant("class-Int"))))
  def macro bar(x: String): String = Apply(Select(Select(Ident("scala"), newTermName("Predef")), newTermName("println")), List(Literal(Constant("class-String"))))
}