summaryrefslogtreecommitdiffstats
path: root/tests/java5/generics/bugs/pr91267/TestBug2.aj
blob: 840f769ee930df693b0c70c1db279b8de230b7b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import java.util.*;

public aspect TestBug2 {
    static <T> T lookupEnv(Map<String,T> env, String key) {
	return env.get(key);
    }

    public static void main(String[] argv) {
      Map<String,Integer> msi = new HashMap<String,Integer>();
      msi.put("andy",42);
      if (lookupEnv(msi,"andy")!=42) throw new RuntimeException("Failed to lookup");
    }
}