Please do not reply to this email- if you want to comment on the bug, go to the URL shown below and enter your comments there.
Changed by [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=82625 --- shadow/82625 2007-08-29 13:28:09.000000000 -0400 +++ shadow/82625.tmp.3430 2007-08-29 13:46:48.000000000 -0400 @@ -166,6 +166,29 @@ foreach (object o in _tb.GetFields ()) Console.WriteLine (o); } } >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + +------- Additional Comments From [EMAIL PROTECTED] 2007-08-29 13:46 ------- +Yes, unfortunately this is not feasible in a complex compilation +contexts, where you need to fetch available fields for the purpose of +emitting IL with references to them. This the case especially when you +need to create references to instantiated versions of current type, +like e.g. + +class A<T> { + T x; + void foo () { + A<int> y = new A<int> (); + y.x = 2; + } +} + +This code requires you to call MakeGenericType on TypeBuilder (before +calling CreateType) and then using GetFields to find appropriate +FieldInfo relating to A<int>.x +I'm not sure how it is done in gmcs, but once upon a time we worked +hard to make this run on both Mono and MS.NET. It would be really +great to bring back the old functionality. + _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
