title: Scala: Method overloading over generic types
body: <p>In C# I can overload methods on generic type as shown  in the example below:</p>
  
  <pre><code>// http://ideone.com/QVooD
  using System;
  using System.Collections.Generic;
  
  public class Test {
    public static void Foo(List&lt;int&gt; ints) {
      Console.WriteLine("I just print");
    }
  
    public static void Foo(List&lt;double&gt; doubles) {
      Console.WriteLine("I iterate over list and print it.");
      foreach(var x in doubles)
        Console.WriteLine(x);
    }
  
    public static void Main(string[] args) {
      Foo(new List&lt;int&gt; {1, 2});
      Foo(new List&lt;double&gt; {3.4, 1.2});
    }
  }
  </code></pre>
  
  <p>However if I try to do the same in Scala, it will raise a compile time error that <code>List[Int]</code> and <code>List[Double]</code> erase to the same type due to erasure. I heard Scala's <code>Manifest</code>s can be used to work around this, but I don't know how. I didn't find anything helpful in the docs either. </p>
  
  <p>So my question is: How do I use <code>Manifest</code>s (or whatever else that works) to overload methods over generic types that erase to same type due to erasure?</p>