mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
enable signature inference by default
(cherry picked from commit c2b76b82eb45e24bbe040ffcd7e63b3ff997b22e) GitOrigin-RevId: ca13b919db8969555c29a248aa7e7580adcfdf5a
This commit is contained in:
committed by
intellij-monorepo-bot
parent
159f18a6fe
commit
eb3c2fa1dc
@@ -306,7 +306,7 @@
|
||||
description="Whether to skip substitutor computation if return type doesn't depend on it"/>
|
||||
<registryKey key="groovy.assert.element.kind.in.resolve" defaultValue="true"
|
||||
description="Whether to throw error if the element is unexpected in resolve processor"/>
|
||||
<registryKey key="groovy.collect.method.calls.for.inference" defaultValue="false"
|
||||
<registryKey key="groovy.collect.method.calls.for.inference" defaultValue="true"
|
||||
description="Allows to collect method usages for more precise type inference"/>
|
||||
|
||||
|
||||
|
||||
+2
-2
@@ -33,8 +33,8 @@ B <warning>b</warning> = {print 2}
|
||||
interface SAM1 { def foo(String s)}
|
||||
interface SAM2 { def bar(Integer i)}
|
||||
|
||||
def method(x, SAM1 s1){s1.foo<weak_warning>(x)</weak_warning>}
|
||||
def method(x, SAM2 s2){s2.bar<weak_warning>(x)</weak_warning>}
|
||||
def method(x, SAM1 s1){s1.foo(x)}
|
||||
def method(x, SAM2 s2){s2.bar(x)}
|
||||
|
||||
method <warning>(1)</warning> {it} // fails because SAM1 and SAM2 are seen as equal
|
||||
method <warning>("1")</warning> {it} // fails because SAM1 and SAM2 are seen as equal
|
||||
|
||||
+1
-1
@@ -189,7 +189,7 @@ def foo1(Object a) { }
|
||||
def bar1(def b) { foo1(b) }
|
||||
|
||||
def foo2(String a) { }
|
||||
def bar2(def b) { foo2<weak_warning descr="Cannot infer argument types">(b)</weak_warning> }
|
||||
def bar2(def b) { foo2(b) }
|
||||
''')
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ return null;
|
||||
}
|
||||
|
||||
public synchronized void out(groovy.lang.GString message) {
|
||||
invokeMethod("println", new java.lang.Object[]{message});
|
||||
println(message);
|
||||
}
|
||||
|
||||
public concurency(groovy.lang.Binding binding) {
|
||||
|
||||
Reference in New Issue
Block a user