GNOME Bugzilla – Bug 471512
Support static methods in generic types
Last modified: 2009-06-03 07:28:27 UTC
Please describe the problem: I receive the following trace:
+ Trace 158820
when I try to compile the following code: class Baz<G> { public static G bar(G i) { return i; } } class Bar { public static void main(string[] args) { var a = new Bar(); Baz<Bar>.bar(a); } } I don't know if the code is wrong - this is the first time I've used generics in my entire life. :-) Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
The code seems to be valid, the compiler doesn't support invoking static methods of generic types yet.
Created attachment 95441 [details] Test case for the bug that must print "B471512 resolved" :)
commit 9460d48c8ae8e53b0189b06ec021db0a3b493578 Author: Jürg Billeter <j@bitron.ch> Date: Wed Jun 3 09:21:36 2009 +0200 Add initial support for static methods in generic types Fixes bug 471512.