Update of /cvsroot/nice/Nice/testsuite/compiler/typing
In directory
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23666/F:/nice/testsuite/compiler/typing
Modified Files:
inference.testsuite
Log Message:
Java methods/fields with parametric types get type parameters with UnknownType
instead of being ignored.
Index: inference.testsuite
===================================================================
RCS file: /cvsroot/nice/Nice/testsuite/compiler/typing/inference.testsuite,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** inference.testsuite 12 Aug 2004 23:21:40 -0000 1.9
--- inference.testsuite 22 Nov 2004 23:21:06 -0000 1.10
***************
*** 6,9 ****
--- 6,13 ----
class B<BAR> extends A<BAR> {}
+ // workaround to avoid field/method ambiguity
+ <K, V> Set<Map.Entry<K, V>> mapEntries(Map<K, V> m) = m.entrySet();
+ <K, K0, V | K <: K0> Set<K0> mapKeys(Map<K, V> m) = m.keySet();
+
/// PASS
let x = new A();
***************
*** 104,108 ****
String key;
! for (each : table1.entrySet) {
key = each.getKey;
}
--- 108,112 ----
String key;
! for (each : table1.mapEntries) {
key = each.getKey;
}
***************
*** 130,134 ****
/// PASS
let testmap = new HashMap();
! for(s : testmap.keySet())
{
String x = s + " => " + testmap[s];
--- 134,138 ----
/// PASS
let testmap = new HashMap();
! for(s : testmap.mapKeys())
{
String x = s + " => " + testmap[s];
***************
*** 139,143 ****
for(s : ["1", "2", "3"])
testmap[s] = Integer.parseInt(s);
! for(s : testmap.keySet())
println(s + " => " + testmap[s]);
--- 143,147 ----
for(s : ["1", "2", "3"])
testmap[s] = Integer.parseInt(s);
! for(s : testmap.mapKeys())
println(s + " => " + testmap[s]);
***************
*** 146,150 ****
for(s : ["1", "2", "3"])
testmap[s] = Integer.parseInt(s);
! for(String s : testmap.keySet())
println(s + " => " + testmap[s]);
--- 150,154 ----
for(s : ["1", "2", "3"])
testmap[s] = Integer.parseInt(s);
! for(String s : testmap.mapKeys())
println(s + " => " + testmap[s]);
***************
*** 197,201 ****
for(i : 1..10)
testmap[i] = i.toString();
! for(i : testmap.keySet())
println(i + " => " + testmap[i]);
--- 201,205 ----
for(i : 1..10)
testmap[i] = i.toString();
! for(i : testmap.mapKeys())
println(i + " => " + testmap[i]);
***************
*** 215,219 ****
while (n-- > 0)
! for (each : table1.entrySet) {
key = each.getKey;
v1 = each.getValue.value;
--- 219,223 ----
while (n-- > 0)
! for (each : table1.mapEntries) {
key = each.getKey;
v1 = each.getValue.value;
***************
*** 235,239 ****
?Cell c2;
! for (each : table1.entrySet)
{
let key = each.getKey;
--- 239,243 ----
?Cell c2;
! for (each : table1.mapEntries)
{
let key = each.getKey;
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
|