InferenceSession#isOverloadCheck: take parentheses into account

This commit is contained in:
Tagir Valeev
2018-11-17 14:48:24 +07:00
parent e4b2f6056e
commit 882322a5bf
5 changed files with 57 additions and 1 deletions
@@ -0,0 +1,14 @@
// "Cast parameter to 'java.util.Map<Foo,Bar>'" "true"
import java.util.*;
class X {
void run(Foo single) {}
void run(Map<Foo, Bar> map) {}
void test(Bar bar) {
run((Map<Foo, Bar>) Collections.singletonMap(getFoo(), bar));
}
native Foo getFoo();
}
@@ -0,0 +1,14 @@
// "Cast parameter to 'java.util.Map<Foo,Bar>'" "true"
import java.util.*;
class X {
void run(Foo single) {}
void run(Map<Foo, Bar> map) {}
void test(Bar bar) {
run((Map<Foo, Bar>) Collections.singletonMap(getFoo(), bar));
}
native Foo getFoo();
}
@@ -0,0 +1,14 @@
// "Cast parameter to 'java.util.Map<Foo,Bar>'" "true"
import java.util.*;
class X {
void run(Foo single) {}
void run(Map<Foo, Bar> map) {}
void test(Bar bar) {
run(Collections.<caret>singletonMap(getFoo(), bar));
}
native Foo getFoo();
}
@@ -0,0 +1,14 @@
// "Cast parameter to 'java.util.Map<Foo,Bar>'" "true"
import java.util.*;
class X {
void run(Foo single) {}
void run(Map<Foo, Bar> map) {}
void test(Bar bar) {
run((Collections.<caret>singletonMap(getFoo(), bar)));
}
native Foo getFoo();
}