Skip to content

Commit

Permalink
Relax type equality constraint to subtype
Browse files Browse the repository at this point in the history
  • Loading branch information
travisbrown committed Jan 30, 2016
1 parent ae1e204 commit 1b248a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/scala/simulacrum/typeclass.scala
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ class TypeClassMacros(val c: Context) {
if (arg equalsStructure Ident(simpleArg)) {
(withRewrittenFirst, true)
} else {
val typeEqualityType = tq"_root_.scala.Predef.=:=[${liftedTypeArg.name}, $arg]"
val typeEqualityType = tq"_root_.scala.Predef.<:<[${liftedTypeArg.name}, $arg]"
val equalityEvidence = ValDef(Modifiers(Flag.IMPLICIT), TermName(c.freshName("ev")), typeEqualityType, EmptyTree)
val updatedParamss = {
if (withRewrittenFirst.nonEmpty && withRewrittenFirst.last.head.mods.hasFlag(Flag.IMPLICIT))
Expand Down

0 comments on commit 1b248a4

Please sign in to comment.