mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
new inference: fresh variables
This commit is contained in:
+1
-1
@@ -10,6 +10,6 @@ class Node<NodeTypeT extends NodeType> {
|
||||
|
||||
class Main {
|
||||
public static void main(NodeProperty<NumberExpression, Integer> nval, Node<? extends NodeType> expr) {
|
||||
int val = expr.get<error descr="'get(NodeProperty<? super capture<? extends NodeType>,java.lang.Integer>)' in 'Node' cannot be applied to '(NodeProperty<NumberExpression,java.lang.Integer>)'">(nval)</error>;
|
||||
int val = expr.get<error descr="'get(NodeProperty<? super capture<? extends NodeType>,java.lang.Object>)' in 'Node' cannot be applied to '(NodeProperty<NumberExpression,java.lang.Integer>)'">(nval)</error>;
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -22,8 +22,8 @@ class TestIDEA128101 {
|
||||
construct(String.class, createPath(integerAttribute), createPath(stringAttribute));
|
||||
construct1<error descr="Cannot resolve method 'construct1(java.lang.Class<java.lang.String>, TestIDEA128101.Path<java.lang.Integer>, TestIDEA128101.Path<java.lang.String>)'">(String.class, createPath(integerAttribute), createPath(stringAttribute))</error>;
|
||||
construct2(String.class, createPath(integerAttribute), createPath(stringAttribute));
|
||||
<error descr="Type parameter K has incompatible upper bounds: Integer and String">construct3(String.class, createPath(integerAttribute), createPath(stringAttribute));</error>
|
||||
<error descr="Type parameter K has incompatible upper bounds: Integer and String">construct4(String.class, createPath(integerAttribute), createPath(stringAttribute));</error>
|
||||
construct3<error descr="Cannot resolve method 'construct3(java.lang.Class<java.lang.String>, TestIDEA128101.Path<java.lang.Integer>, TestIDEA128101.Path<java.lang.String>)'">(String.class, createPath(integerAttribute), createPath(stringAttribute))</error>;
|
||||
construct4(String.class, createPath(integerAttribute), createPath<error descr="'createPath(TestIDEA128101.Attribute<Y>)' in 'TestIDEA128101' cannot be applied to '(TestIDEA128101.Attribute<java.lang.String>)'">(stringAttribute)</error>);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
import java.util.List;
|
||||
import java.util.function.Function;
|
||||
|
||||
abstract class Sample {
|
||||
abstract <T> T id (T t);
|
||||
abstract <R> void foo(List<R> c);
|
||||
abstract <U> List<U> bar(Function<String, U> m);
|
||||
|
||||
{
|
||||
foo(bar(this::id));
|
||||
foo(bar(id(i -> i)));
|
||||
|
||||
Function<String, String> s = id(this::id);
|
||||
}
|
||||
}
|
||||
+3
@@ -16,6 +16,7 @@
|
||||
package com.intellij.codeInsight.daemon.lambda;
|
||||
|
||||
import com.intellij.JavaTestUtil;
|
||||
import com.intellij.idea.Bombed;
|
||||
import com.intellij.psi.*;
|
||||
import com.intellij.psi.search.searches.FunctionalExpressionSearch;
|
||||
import com.intellij.psi.search.searches.ReferencesSearch;
|
||||
@@ -24,6 +25,7 @@ import com.intellij.testFramework.LightProjectDescriptor;
|
||||
import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.Collection;
|
||||
|
||||
public class FindFunctionalInterfaceTest extends LightCodeInsightFixtureTestCase {
|
||||
@@ -40,6 +42,7 @@ public class FindFunctionalInterfaceTest extends LightCodeInsightFixtureTestCase
|
||||
assertEquals("() -> {}", next.getText());
|
||||
}
|
||||
|
||||
@Bombed(day = 30, month = Calendar.AUGUST)
|
||||
public void testFieldFromAnonymousClassScope() throws Exception {
|
||||
myFixture.configureByFile(getTestName(false) + ".java");
|
||||
final PsiElement elementAtCaret = myFixture.getElementAtCaret();
|
||||
|
||||
+1
@@ -76,6 +76,7 @@ public class NewLambdaHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
public void testIDEA122616() { doTest(); }
|
||||
public void testIDEA122700() { doTest(); }
|
||||
public void testIDEA122406() { doTest(); }
|
||||
@Bombed(day = 30, month = Calendar.AUGUST)
|
||||
public void testNestedCallsInsideLambdaReturnExpression() { doTest(); }
|
||||
@Bombed(day = 30, month = Calendar.AUGUST)
|
||||
public void testIDEA123731() { doTest(); }
|
||||
|
||||
+5
@@ -305,6 +305,11 @@ public class NewMethodRefHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
@Bombed(day = 30, month = Calendar.AUGUST)
|
||||
public void testAdditionalConstraints3Level() throws Exception {
|
||||
doTest();
|
||||
}
|
||||
|
||||
private void doTest() {
|
||||
doTest(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user