GNOME Bugzilla – Bug 767092
compiler ignores type parameter arities in nested generic types
Last modified: 2016-06-25 13:57:26 UTC
Created attachment 328853 [details] [review] patch Hey, Here's an example: class Foo<T> {} void main(string[] args) { Foo<Foo<string, string> > foo = null; } Clearly this should fail to compile since Foo only takes one type parameter but is instantiated as Foo<string, string>. The attached patch fixes the issue.
commit 3850736455f02ed3ecc5fb3e10dba171f78be1f5 Author: Matthias Berndt <matthias_berndt@gmx.de> Date: Mon May 16 12:21:06 2016 +0200 Check type arguments recursively This fixes error checking for code like this: class Foo<T> {} void main(string[] args) { Foo<Foo<string, string>> foo = null; } Fixes bug 767092.