diff options
author | Paul Phillips <paulp@improving.org> | 2013-01-30 13:26:12 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-01-30 13:30:46 -0800 |
commit | 6f86583c83b99e3f4ff28785fe038ded02440961 (patch) | |
tree | a9ee46126ead0219bac9a2a7aa6502c95ef32468 /test/files/pos | |
parent | 7026376dcc87f531de84c99aa3e52068f5b10874 (diff) | |
download | scala-6f86583c83b99e3f4ff28785fe038ded02440961.tar.gz scala-6f86583c83b99e3f4ff28785fe038ded02440961.tar.bz2 scala-6f86583c83b99e3f4ff28785fe038ded02440961.zip |
SI-6516, macros comparing types with == instead of =:=.
I gift-wrapped this ticket four months ago:
'I think it will be enough to say "tpe =:= MacroContextClass.tpe"
rather than == .'
Indeed. Had to open my own gift. Thanks, paulp!
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/t6516.scala | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/files/pos/t6516.scala b/test/files/pos/t6516.scala new file mode 100644 index 0000000000..c004055de2 --- /dev/null +++ b/test/files/pos/t6516.scala @@ -0,0 +1,19 @@ +import scala.language.experimental.macros +import scala.reflect.macros.Context +import scala.collection.TraversableLike + +// This one compiles +object Test { + type Alias[T, CC[_]] = Context { type PrefixType = TraversableLike[T, CC[T]] } + def f() = macro f_impl + def f_impl(c: Alias[Int, List])() = ??? +} + +// This one doesn't +object Test2 { + type Ctx = scala.reflect.macros.Context + type Alias[T, CC[_]] = Ctx { type PrefixType = TraversableLike[T, CC[T]] } + + def f() = macro f_impl + def f_impl(c: Alias[Int, List])() = ??? +} |