You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using an int conversion from IntImplicits, for instance 2.days in the context of a specs2 test, the implicit conversion from Int to DateTime conflicts with the one from specs2's TimeConversion, giving the following compilation error:
error: type mismatch;
found : Int(2)
required: ?{val days: ?}
Note that implicit conversions are not applicable because they are ambiguous:
both method RichInt in trait IntImplicits of type (n: Int)org.scala_tools.time.RichInt
and method intToRichLong in trait TimeConversions of type (v: Int)MongoMetaSiteDaoTest.this.RichLong
are possible conversion functions from Int(2) to ?{val days: ?}
Error occurred in an application involving default arguments.
val site1 = MetaSite(originTemplateId = new ObjectId().toString, ownerUserId = user, name = "site1", dateUpdated = DateTime.now + 2.days)
Not that I have an idea how to solve this but it's a bug nonetheless :)
The text was updated successfully, but these errors were encountered:
As far as I have read it cannot be solved because the overlapping implicit is defined by Specification. The only workaround I can figure out is to write some redundant functions to mark the target implementation like jday, joda_day or jodaDay
When using an int conversion from IntImplicits, for instance 2.days in the context of a specs2 test, the implicit conversion from Int to DateTime conflicts with the one from specs2's TimeConversion, giving the following compilation error:
error: type mismatch;
found : Int(2)
required: ?{val days: ?}
Note that implicit conversions are not applicable because they are ambiguous:
both method RichInt in trait IntImplicits of type (n: Int)org.scala_tools.time.RichInt
and method intToRichLong in trait TimeConversions of type (v: Int)MongoMetaSiteDaoTest.this.RichLong
are possible conversion functions from Int(2) to ?{val days: ?}
Error occurred in an application involving default arguments.
val site1 = MetaSite(originTemplateId = new ObjectId().toString, ownerUserId = user, name = "site1", dateUpdated = DateTime.now + 2.days)
Not that I have an idea how to solve this but it's a bug nonetheless :)
The text was updated successfully, but these errors were encountered: