New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Quill compatible with Scala 2.12.2 #770
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,11 +4,11 @@ import scala.math.BigDecimal.double2bigDecimal | |
import scala.math.BigDecimal.int2bigDecimal | ||
import scala.math.BigDecimal.javaBigDecimal2bigDecimal | ||
import scala.math.BigDecimal.long2bigDecimal | ||
|
||
import io.getquill.Spec | ||
import io.getquill.ast.{ Query => _, _ } | ||
import io.getquill.testContext._ | ||
import io.getquill.context.ValueClass | ||
import io.getquill.util.Messages | ||
|
||
case class CustomAnyValue(i: Int) extends AnyVal | ||
case class EmbeddedValue(s: String, i: Int) extends Embedded | ||
|
@@ -726,6 +726,7 @@ class QuotationSpec extends Spec { | |
quote(unquote(q)).ast match { | ||
case Function(params, Tuple(values)) => | ||
values mustEqual params | ||
case _ => Messages.fail("Should not happen") | ||
} | ||
} | ||
"java to scala" in { | ||
|
@@ -739,6 +740,7 @@ class QuotationSpec extends Spec { | |
quote(unquote(q)).ast match { | ||
case Function(params, Tuple(values)) => | ||
values mustEqual params | ||
case _ => Messages.fail("Should not happen") | ||
} | ||
} | ||
} | ||
|
@@ -847,17 +849,18 @@ class QuotationSpec extends Spec { | |
l.encoder mustEqual intEncoder | ||
} | ||
"property" in { | ||
case class Test(a: String) | ||
val t = Test("a") | ||
case class TestEntity(a: String) | ||
val t = TestEntity("a") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I forgot detailed error however it is connected with suspicious shadowing of generated class name or something like that |
||
val q = quote(lift(t.a)) | ||
|
||
val l = q.liftings.`t.a` | ||
l.value mustEqual t.a | ||
l.encoder mustEqual stringEncoder | ||
} | ||
"abritrary" in { | ||
val q = quote(lift(String.valueOf(1))) | ||
q.liftings.`java.this.lang.String.valueOf(1)`.value mustEqual String.valueOf(1) | ||
class A { def x = 1 } | ||
val q = quote(lift(new A().x)) | ||
q.liftings.`new A().x`.value mustEqual new A().x | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @fwbrasil I hope this works for such test case, since using static calls as before is prohibit fr cross compilation |
||
} | ||
"duplicate" in { | ||
val i = 1 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now it should be more convenient