[Test] Add ability to specify applicability of diagnostic to module or file
This commit is contained in:
committed by
TeamCityServer
parent
28cff22cd0
commit
6a7cd0c811
@@ -1,4 +1,5 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// FILE: IBase.java
|
||||
|
||||
interface IBase {
|
||||
@@ -8,7 +9,6 @@ interface IBase {
|
||||
}
|
||||
|
||||
// FILE: Kotlin.kt
|
||||
// JVM_TARGET: 1.8
|
||||
open class Base {
|
||||
fun foo() = "OK"
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,5 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// FILE: Simple.java
|
||||
|
||||
public interface Simple {
|
||||
@@ -12,7 +13,6 @@ public interface Simple {
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
// JVM_TARGET: 1.8
|
||||
interface KInterface : Simple {
|
||||
fun bar(): String {
|
||||
return test("O") + Simple.testStatic("O")
|
||||
|
||||
+1
-1
@@ -1,4 +1,5 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// FILE: Simple.java
|
||||
|
||||
interface Simple {
|
||||
@@ -12,7 +13,6 @@ interface Simple {
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
// JVM_TARGET: 1.8
|
||||
class Test : Simple {}
|
||||
|
||||
fun box(): String {
|
||||
|
||||
+1
-1
@@ -1,4 +1,5 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// FILE: Simple.java
|
||||
|
||||
public interface Simple {
|
||||
@@ -12,7 +13,6 @@ public interface Simple {
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
// JVM_TARGET: 1.8
|
||||
interface TestInterface : Simple {}
|
||||
class Test : TestInterface {}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// FILE: Simple.java
|
||||
|
||||
public interface Simple {
|
||||
@@ -8,7 +9,6 @@ public interface Simple {
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
// JVM_TARGET: 1.8
|
||||
|
||||
interface KInterface: Simple {
|
||||
override fun test(s: String): String {
|
||||
|
||||
+1
-1
@@ -1,4 +1,5 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// FILE: Test.java
|
||||
|
||||
interface Test<T> {
|
||||
@@ -11,7 +12,6 @@ interface Test<T> {
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
// JVM_TARGET: 1.8
|
||||
|
||||
class Child : Test<String> {
|
||||
override fun call() : String {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// FILE: Simple.java
|
||||
|
||||
interface Simple extends KInterface {
|
||||
@@ -8,7 +9,6 @@ interface Simple extends KInterface {
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
// JVM_TARGET: 1.8
|
||||
interface KInterface {
|
||||
fun test(): String {
|
||||
return "base";
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// SKIP_JDK6
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// FILE: Test.java
|
||||
|
||||
public interface Test {
|
||||
@@ -9,7 +10,6 @@ public interface Test {
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
// JVM_TARGET: 1.8
|
||||
interface KInterface : Test {
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// !JVM_DEFAULT_MODE: disable
|
||||
// JVM_TARGET: 1.8
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_RUNTIME
|
||||
// FILE: JBase.java
|
||||
|
||||
public interface JBase extends Base {
|
||||
@@ -10,7 +11,6 @@ public interface JBase extends Base {
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
// WITH_RUNTIME
|
||||
|
||||
interface Base {
|
||||
fun test(): String = "Base"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// !JVM_DEFAULT_MODE: disable
|
||||
// JVM_TARGET: 1.8
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_RUNTIME
|
||||
// FILE: Base.java
|
||||
|
||||
public interface Base {
|
||||
@@ -11,7 +12,6 @@ public interface Base {
|
||||
|
||||
|
||||
// FILE: main.kt
|
||||
// WITH_RUNTIME
|
||||
|
||||
interface LeftBase : Base
|
||||
interface Right : Base {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// !JVM_DEFAULT_MODE: disable
|
||||
// JVM_TARGET: 1.8
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_RUNTIME
|
||||
// FILE: Base.java
|
||||
|
||||
public interface Base {
|
||||
@@ -15,7 +16,6 @@ public interface Left extends Base {
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
// WITH_RUNTIME
|
||||
|
||||
interface Right : Base {
|
||||
override fun test(): String = "OK"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// !JVM_DEFAULT_MODE: disable
|
||||
// JVM_TARGET: 1.8
|
||||
// TARGET_BACKEND: JVM
|
||||
// FILE: main.kt
|
||||
// WITH_RUNTIME
|
||||
// FULL_JDK
|
||||
// FILE: main.kt
|
||||
var result = ""
|
||||
|
||||
interface A<K, V> : MutableMap<K, V>
|
||||
@@ -72,4 +72,4 @@ fun box(): String {
|
||||
val value = map.getOrDefault("O", "OK")
|
||||
if (result != "O=fail;O;O;") return "fail 3: $result"
|
||||
return value
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,5 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// FILE: Base.java
|
||||
|
||||
public interface Base {
|
||||
@@ -8,7 +9,6 @@ public interface Base {
|
||||
}
|
||||
|
||||
// FILE: derived.kt
|
||||
// JVM_TARGET: 1.8
|
||||
interface K1 : Base
|
||||
|
||||
interface K2 : K1
|
||||
|
||||
+1
-1
@@ -1,4 +1,5 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// FILE: JavaCall.java
|
||||
|
||||
class JavaCall {
|
||||
@@ -23,7 +24,6 @@ interface Test {
|
||||
}
|
||||
|
||||
// FILE: sam.kt
|
||||
// JVM_TARGET: 1.8
|
||||
|
||||
fun box(): String {
|
||||
val lambda = { "X" }
|
||||
|
||||
Reference in New Issue
Block a user