milessabin / macro-compat

macro-compat is a small library which allows you to compile macros with Scala 2.10.x which are written to the Scala 2.11/2 macro API.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

abstract type pattern is unchecked since it is eliminated by erasure

julien-truffaut opened this issue · comments

I got the following error in scala 2.10 once I upgraded from 1.1.0 to 1.1.1

https://travis-ci.org/julien-truffaut/Monocle/jobs/169164862

Can you point me at the corresponding source?

Thanks @milessabin, you're fixed worked :)

For the record the fix (I think it is a fix rather than a workaround) is to use patterns of the form,

case n: TermName => ...
case n: TypeName => ...

rather than,

case n@TermName(_) => ...
case n@TypeName(_) => ...

@milessabin Can you explain why the latter doesn't work in 2.10?

It seems that the extractors are being viewed as non-stable.

Personally I would qualify that as an issue with macro-compat that requires a workaround in user-land.

I wonder what project required support for them in macro-compat in the first place: 83ceac1