ScalaTest v3:为什么需要实现convertToLegacyEqualizer [英] ScalaTest v3: why require to implement convertToLegacyEqualizer

查看:82
本文介绍了ScalaTest v3:为什么需要实现convertToLegacyEqualizer的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 ScalaTest 3.0.0 环境:Scala 2.11.8,sbt 0.13.5,IntelliJ 14.1.4

Using ScalaTest 3.0.0 Environment: Scala 2.11.8, sbt 0.13.5, IntelliJ 14.1.4

build.sbt只有

build.sbt has only

// NOTE: not using org.scalactic
libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.0" % "test"

下面的测试通过了.但是,IntelliJ在MyMiniTest下方用警告消息标记一条红线:

The test below passed. However, IntelliJ marks a squiggly red line below MyMiniTest with the warning message:

'MyMiniTest'类必须声明为抽象或实现 抽象成员'convertToLegacyEqualizer [T](左:T): 中的TripleEqualsSupport.this.LegacyEqualizer [T]' 'org.scalactic.TripleEqualsSupport'

Class 'MyMiniTest ' must either be declared abstract or implement abstract member 'convertToLegacyEqualizer[T](left: T): TripleEqualsSupport.this.LegacyEqualizer[T]' in 'org.scalactic.TripleEqualsSupport'

import org.scalatest.FeatureSpec

class MyMiniTest extends FeatureSpec {
  scenario("A simple test") {
    val a = 12
    assert(a * 3 == 36)
  }
}

此警告的原因是什么,建议的解决方案是什么?

What is the reason of this warning and what is the recommended solution to fix it?

推荐答案

我在IntelliJ上遇到了同样的问题,只需遵循

I had the same problem on IntelliJ just follow this steps to invalidate cache/restart. This will solve the problem.

这篇关于ScalaTest v3:为什么需要实现convertToLegacyEqualizer的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆