1
votes

I'm trying the example from the Anorm docs verbatim:

import anorm._ 

DB.withConnection { implicit c =>
  val result: Boolean = SQL("Select 1").execute()    
} 

I'm getting this error:

[error] /Users/Greg/git/slurpee/src/test/scala/ReaderTests.scala:115: type mismatch;
[error]  found   : anorm.SqlQuery
[error]  required: ?{def execute: ?}
[error] Note that implicit conversions are not applicable because they are ambiguous:
[error]  both method sqlToSimple in package anorm of type (sql: anorm.SqlQuery)anorm.SimpleSql[anorm.Row]
[error]  and method sqlToBatch in package anorm of type (sql: anorm.SqlQuery)anorm.BatchSql
[error]  are possible conversion functions from anorm.SqlQuery to ?{def execute: ?}
[error]                 SQL("select 1;").execute()

Is this something specific to 2.4?

1
You should try with 2.4-M1 or stable 2.3.4 - cchantep
That was it. v2.3.5 was fine as advertised. - Greg

1 Answers

0
votes

applicius' comment was correct--stable version worked verbatim. Must've been some issue with the SNAPSHOT release. It happens.