[generator] Fix AmbiguousMatchException when looking for methods

This commit is contained in:
Alex Soto 2016-09-14 14:32:34 -05:00
Родитель 6a5e8b87c5
Коммит 74469876d7
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -7137,7 +7137,9 @@ public partial class Generator : IMemberGatherer {
Type currentType = type;
do
{
MethodInfo method = currentType.GetMethod (mi.Name);
// avoid AmbiguousMatchException when GetMethod is used.
var parameters = mi.GetParameters ().Select ((arg) => arg.ParameterType).ToArray ();
MethodInfo method = currentType.GetMethod (mi.Name, parameters);
if (method != null) {
string wrap;
ExportAttribute export = Generator.GetExportAttribute (method, out wrap);