Switch default JVM target to 1.8
#KT-29405 Fixed
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
// !WITH_NEW_INFERENCE
|
||||
// FULL_JDK
|
||||
|
||||
import java.util.stream.Collectors
|
||||
import java.util.stream.IntStream
|
||||
|
||||
fun main() {
|
||||
val xs = IntStream.range(0, 10).mapToObj { it.toString() }
|
||||
.collect(Collectors.toList())
|
||||
xs[0]
|
||||
}
|
||||
+2
-2
@@ -1,11 +1,11 @@
|
||||
// !WITH_NEW_INFERENCE
|
||||
// FIR_IDENTICAL
|
||||
// FULL_JDK
|
||||
|
||||
import java.util.stream.Collectors
|
||||
import java.util.stream.IntStream
|
||||
|
||||
fun main() {
|
||||
val xs = IntStream.<!INTERFACE_STATIC_METHOD_CALL_FROM_JAVA6_TARGET_ERROR!>range<!>(0, 10).mapToObj { it.toString() }
|
||||
val xs = IntStream.range(0, 10).mapToObj { it.toString() }
|
||||
.collect(Collectors.toList())
|
||||
xs[0]
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// !JVM_TARGET: 1.6
|
||||
// FILE: JavaInterface.java
|
||||
|
||||
public interface JavaInterface {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// !JVM_TARGET: 1.6
|
||||
// FILE: JavaInterface.java
|
||||
|
||||
public interface JavaInterface {
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// !JVM_TARGET: 1.6
|
||||
// FILE: JavaInterfaceBase.java
|
||||
|
||||
public interface JavaInterfaceBase {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// !JVM_TARGET: 1.6
|
||||
// FILE: JavaInterfaceBase.java
|
||||
|
||||
public interface JavaInterfaceBase {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
//!LANGUAGE: -DefaultMethodsCallFromJava6TargetError
|
||||
// !LANGUAGE: -DefaultMethodsCallFromJava6TargetError
|
||||
// !JVM_TARGET: 1.6
|
||||
// FILE: JavaInterface.java
|
||||
|
||||
public interface JavaInterface {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
//!LANGUAGE: -DefaultMethodsCallFromJava6TargetError
|
||||
// !LANGUAGE: -DefaultMethodsCallFromJava6TargetError
|
||||
// !JVM_TARGET: 1.6
|
||||
// FILE: JavaInterface.java
|
||||
|
||||
public interface JavaInterface {
|
||||
|
||||
-32
@@ -1,32 +0,0 @@
|
||||
// FILE: I.java
|
||||
|
||||
public interface I {
|
||||
int a = 1;
|
||||
static void foo() {}
|
||||
}
|
||||
|
||||
// FILE: C.java
|
||||
|
||||
public class C implements I {
|
||||
static int b = 1;
|
||||
static void bar() {}
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
|
||||
class K : C()
|
||||
|
||||
fun main() {
|
||||
I.a
|
||||
I.foo()
|
||||
|
||||
C.a
|
||||
C.b
|
||||
C.<!UNRESOLVED_REFERENCE!>foo<!>()
|
||||
C.bar()
|
||||
|
||||
K.<!UNRESOLVED_REFERENCE!>a<!>
|
||||
K.<!UNRESOLVED_REFERENCE!>b<!>
|
||||
K.<!UNRESOLVED_REFERENCE!>foo<!>()
|
||||
K.<!UNRESOLVED_REFERENCE!>bar<!>()
|
||||
}
|
||||
+2
-1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// FILE: I.java
|
||||
|
||||
public interface I {
|
||||
@@ -18,7 +19,7 @@ class K : C()
|
||||
|
||||
fun main() {
|
||||
I.a
|
||||
I.<!INTERFACE_STATIC_METHOD_CALL_FROM_JAVA6_TARGET_ERROR!>foo<!>()
|
||||
I.foo()
|
||||
|
||||
C.a
|
||||
C.b
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// !JVM_TARGET: 1.6
|
||||
// FILE: Test.java
|
||||
public interface Test {
|
||||
default String test() {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// !JVM_TARGET: 1.6
|
||||
// FILE: Test.java
|
||||
public interface Test {
|
||||
default String test() {
|
||||
|
||||
Vendored
-32
@@ -1,32 +0,0 @@
|
||||
// FULL_JDK
|
||||
// FILE: test.kt
|
||||
|
||||
@file:Suppress("UNUSED_PARAMETER")
|
||||
|
||||
import java.util.Comparator
|
||||
|
||||
abstract class DataView {
|
||||
abstract val presentationName: String
|
||||
}
|
||||
|
||||
fun <A> comboBox(
|
||||
model: SortedComboBoxModel<A>,
|
||||
graphProperty: GraphProperty<A>,
|
||||
) {}
|
||||
|
||||
class GraphProperty<B>
|
||||
|
||||
fun test() {
|
||||
val presentationName: (DataView) -> String = { it.presentationName }
|
||||
val parentComboBoxModel/*: SortedComboBoxModel<DataView>*/ = SortedComboBoxModel(Comparator.comparing(presentationName))
|
||||
comboBox(parentComboBoxModel, GraphProperty<DataView>())
|
||||
}
|
||||
|
||||
// FILE: SortedComboBoxModel.java
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
public class SortedComboBoxModel<C> {
|
||||
public SortedComboBoxModel(Comparator<? super C> comparator) {
|
||||
}
|
||||
}
|
||||
Vendored
+3
-2
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// FULL_JDK
|
||||
// FILE: test.kt
|
||||
|
||||
@@ -18,7 +19,7 @@ class GraphProperty<B>
|
||||
|
||||
fun test() {
|
||||
val presentationName: (DataView) -> String = { it.presentationName }
|
||||
val parentComboBoxModel/*: SortedComboBoxModel<DataView>*/ = SortedComboBoxModel(Comparator.<!INTERFACE_STATIC_METHOD_CALL_FROM_JAVA6_TARGET_ERROR!>comparing<!>(presentationName))
|
||||
val parentComboBoxModel/*: SortedComboBoxModel<DataView>*/ = SortedComboBoxModel(Comparator.comparing(presentationName))
|
||||
comboBox(parentComboBoxModel, GraphProperty<DataView>())
|
||||
}
|
||||
|
||||
@@ -29,4 +30,4 @@ import java.util.Comparator;
|
||||
public class SortedComboBoxModel<C> {
|
||||
public SortedComboBoxModel(Comparator<? super C> comparator) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
// !WITH_NEW_INFERENCE
|
||||
// FULL_JDK
|
||||
|
||||
import java.util.stream.*
|
||||
|
||||
interface A : Collection<String> {
|
||||
override fun stream(): Stream<String> = Stream.of()
|
||||
}
|
||||
|
||||
fun foo(x: List<String>, y: A) {
|
||||
x.stream().filter { it.length > 0 }.collect(Collectors.toList())
|
||||
y.stream().filter { it.length > 0 }
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
// !WITH_NEW_INFERENCE
|
||||
// FIR_IDENTICAL
|
||||
// FULL_JDK
|
||||
|
||||
import java.util.stream.*
|
||||
|
||||
interface A : Collection<String> {
|
||||
override fun stream(): Stream<String> = Stream.<!INTERFACE_STATIC_METHOD_CALL_FROM_JAVA6_TARGET_ERROR!>of<!>()
|
||||
override fun stream(): Stream<String> = Stream.of()
|
||||
}
|
||||
|
||||
fun foo(x: List<String>, y: A) {
|
||||
|
||||
Reference in New Issue
Block a user