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
Requesting an implicit parameter using a type projection does not work in an implicit macro. The following macro cannot be resolved implicitly at the call site:
Replacing "macro AutoMappedJdbcType.applyMacroImpl[ E ]" with "???", thus turning it into a regular implicit method, makes the call site compile.
-Xshow-implicits gives the following details:
[info] /Users/szeiger/code/slick/slick-testkit/src/main/scala/com/typesafe/slick/testkit/tests/MapperTest.scala:344: materializing requested scala.reflect.type.ClassTag[ID] using `package`.this.materializeClassTag[ID]()
[info] defid= column[ID]("id", O.PrimaryKey)
[info] ^
[info] /Users/szeiger/code/slick/slick-testkit/src/main/scala/com/typesafe/slick/testkit/tests/MapperTest.scala:344: jdbc.this.AutoMappedJdbcType.jdbcType is not a valid implicit value for scala.slick.ast.TypedType[ID] because:
[info] exception during macro expansion:
[info] java.lang.IllegalArgumentException: wrong number of arguments
[info] defid= column[ID]("id", O.PrimaryKey)
[info] ^
[error] /Users/szeiger/code/slick/slick-testkit/src/main/scala/com/typesafe/slick/testkit/tests/MapperTest.scala:344: could not find implicit value for parameter tm: scala.slick.ast.TypedType[ID]
[error] defid= column[ID]("id", O.PrimaryKey)
[error] ^
[error] one error found
Trying to pass the type projection as a separate type argument to the macro, fails as well:
In this case, the error shown by -Xshow-implicits is:
[info] /Users/szeiger/code/slick/slick-testkit/src/main/scala/com/typesafe/slick/testkit/tests/MapperTest.scala:319: materializing requested scala.reflect.type.ClassTag[ID] using `package`.this.materializeClassTag[ID]()
[info] defid= column[ID]("id", O.PrimaryKey)
[info] ^
[info] /Users/szeiger/code/slick/slick-testkit/src/main/scala/com/typesafe/slick/testkit/tests/MapperTest.scala:319: jdbc.this.AutoMappedJdbcType.jdbcType is not a valid implicit value for scala.slick.ast.TypedType[ID] because:
[info] hasMatchingSymbol reported error: typemismatch;
[info] found : AutoMappedJdbcTypeBase.this.Underlying
[info] required: Int
[info] defid= column[ID]("id", O.PrimaryKey)
[info] ^
[error] /Users/szeiger/code/slick/slick-testkit/src/main/scala/com/typesafe/slick/testkit/tests/MapperTest.scala:319: could not find implicit value for parameter tm: scala.slick.ast.TypedType[ID]
[error] defid= column[ID]("id", O.PrimaryKey)
[error] ^
[error] one error found
The text was updated successfully, but these errors were encountered:
Requesting an implicit parameter using a type projection does not work in an implicit macro. The following macro cannot be resolved implicitly at the call site:
Replacing "macro AutoMappedJdbcType.applyMacroImpl[ E ]" with "???", thus turning it into a regular implicit method, makes the call site compile.
-Xshow-implicits gives the following details:
Trying to pass the type projection as a separate type argument to the macro, fails as well:
In this case, the error shown by -Xshow-implicits is:
The text was updated successfully, but these errors were encountered: