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

public aspect TestBug1 {
    static <T> void addToEnv(Map<String,T> env, String key, T value) {
	env.put(key, value);
    }

    public static void main(String[] argv) {
      Map<String,Integer> msi = new HashMap<String,Integer>();
      addToEnv(msi,"andy",new Integer(42));

      if (msi.get("andy")!=42) throw new RuntimeException("Failed to add");
    }
}