title: Static field with generic parameter extending multiple types
body: <p><strong>What I have without any problem:</strong></p>
  
  <p>I have multiple enums which extend the same interface:</p>
  
  <pre><code>interface CommonMethods {
      // some methods
  }
  
  enum E1 implements CommonMethods {
      O1, O2;
      // interface method impls
  }
  
  enum E2 implements CommonMethods {
      O3, O4;
      // interface method impls
  }
  </code></pre>
  
  <p>I wanted to handle these by their common successors: <code>Enum</code> and <code>CommonMethods</code>.</p>
  
  <p>So far I have methods like this:</p>
  
  <pre><code>static &lt;L extends Enum&lt;?&gt; &amp; CommonMethods&gt; void m(L l) {}
  </code></pre>
  
  <p>So I can do with those enums what I want for example by calling methods from the CommonMethods interface.</p>
  
  <p><strong>Now the problem begins:</strong></p>
  
  <p>But I also want to store some of these in a static list field of a class like this:</p>
  
  <pre><code>class Test1 {
      static List&lt;Enum&lt;?&gt; &amp; CommonMethods&gt; l = new LinkedList&lt;&gt;();
  
      static {
          l.add(E1.O1);
          l.add(E2.O3);
      }
  }
  </code></pre>
  
  <p>This gives me compiler error. I have a workaround solution which to my opinion is bad:</p>
  
  <pre><code>class Test2 {
      static List&lt;Enum&lt;?&gt;&gt; l = new LinkedList&lt;&gt;();
  
      static {
          l.add(E1.O1);
          l.add(E2.O3);
      }
  
      static &lt;L extends Enum&lt;?&gt; &amp; CommonMethods&gt; void m(L l) {}
  }
  </code></pre>
  
  <p>This way I lose the constraint of the acceptable types.</p>
  
  <p><br/></p>
  
  <p><strong>What can I do to keep the constraint?</strong></p>
  
  <p><strong>Note:</strong> This is just a dummy and not the real code with which I'm currently trying to work, so please refrain from refactoring suggestions.</p>