Index: tests/.expect/poly-selection.txt
===================================================================
--- tests/.expect/poly-selection.txt	(revision 978e5eb2a935600a493cda570c9293584824c675)
+++ tests/.expect/poly-selection.txt	(revision fcd0b9d7282c8c187cc0111baf35ab6d4fb846a2)
@@ -1,2 +1,5 @@
 friending generically
 friending specifically
+-
+f-generic
+f-specific
Index: tests/avltree/avl.h
===================================================================
--- tests/avltree/avl.h	(revision 978e5eb2a935600a493cda570c9293584824c675)
+++ tests/avltree/avl.h	(revision fcd0b9d7282c8c187cc0111baf35ab6d4fb846a2)
@@ -57,5 +57,5 @@
 void ?{}(tree(K, V) &t, K key, V value);
 
-forall(otype K, otype V)
+forall(otype K | Comparable(K), otype V)
 void ^?{}(tree(K, V) & t);
 
Index: tests/avltree/avl1.cfa
===================================================================
--- tests/avltree/avl1.cfa	(revision 978e5eb2a935600a493cda570c9293584824c675)
+++ tests/avltree/avl1.cfa	(revision fcd0b9d7282c8c187cc0111baf35ab6d4fb846a2)
@@ -13,5 +13,5 @@
 }
 
-forall(otype K, otype V)
+forall(otype K| Comparable(K), otype V)
 void ^?{}(tree(K, V) & t){
   delete(t.left);
Index: tests/poly-selection.cfa
===================================================================
--- tests/poly-selection.cfa	(revision 978e5eb2a935600a493cda570c9293584824c675)
+++ tests/poly-selection.cfa	(revision fcd0b9d7282c8c187cc0111baf35ab6d4fb846a2)
@@ -35,6 +35,28 @@
 }
 
+void testSpecializationFromGenericAccessibleWithExtraTyvars() {
+
+    forall( dtype T, dtype U )
+    struct map {};
+
+    forall( dtype T )
+    void f( T & ) {
+        printf("f-generic\n");
+    }
+
+    forall( dtype T )
+    void f( map(T, T) & ) {
+        printf("f-specific\n");
+    }
+
+    float one;
+    map(float, float) two;
+    f(one);
+    f(two);
+}
 
 int main() {
     testSpecializationFromGenericOverBareTyvar();
+    printf("-\n");
+    testSpecializationFromGenericAccessibleWithExtraTyvars();
 }
