blob: 0fe10f8b3bbbcf90266a26192721f8d614037deb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
package scala.scalajs.compiler.test
import scala.scalajs.compiler.test.util._
import org.junit.Test
class DiverseErrorsTest extends DirectTest with TestHelpers {
override def preamble =
"""import scala.scalajs.js
"""
@Test
def noIsInstanceOnJSRaw = {
"""
trait JSRaw extends js.Object
class A {
val a: AnyRef = "asdf"
def x = a.isInstanceOf[JSRaw]
}
""" hasErrors
"""
|newSource1.scala:7: error: isInstanceOf[JSRaw] not supported because it is a raw JS trait
| def x = a.isInstanceOf[JSRaw]
| ^
"""
}
}
|