It isn't a bug. The problem is that to resolve ~>!
on String
the compiler would have to chain two implicit conversions: from String
to Parser
and from Parser
to helper
, which isn't allowed. So you need to add a direct conversion from String
to helper
:
implicit def stringToHelper(s: String): helper[String] = new helper(literal(s))
and also from Regex
to helper
if necessary.