错误:类型推断无法确定类型。在升级Scala版本时出现错误

时间:2019-11-11 15:11:06

标签: scala gatling scala-gatling

logger.info("Error Response:[" + extraInfo.session("username").asOption[String]
                + "], Code:[" + statusCode + "], Response Body:[" + extraInfo.response.body.string
                + "], Token:[" + extraInfo.session("cspAuthToken").asOption[String]
                + "], Org id:[" + extraInfo.session("defaultOrgId").asOption[String]
                + "], Started At: [" + startedAt + "], Current time:[" + System.nanoTime()
                + "], Total Seconds:[" + totalSecondsPassed + "]")

这是用scala 2.12.3版本编写的代码,后来在将scala版本升级到2.13.1版本时出现此错误,

Sorry, type inference was unable to figure out the type. You need to provide it explicitly.
              logger.info("Error Response:[" + extraInfo.session("username").asOption[String]

1 个答案:

答案 0 :(得分:1)

加特林不支持Scala 2.13(请参阅https://gatling.io/docs/current/installation) (自Gatling 3.3起)

相关问题