Skip to content

Commit

Permalink
Revert
Browse files Browse the repository at this point in the history
svn path=/branches/mono-1-2-3/mcs/; revision=72798
  • Loading branch information
migueldeicaza committed Feb 13, 2007
1 parent 2d2f7cb commit 6b75245
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 42 deletions.
5 changes: 0 additions & 5 deletions mcs/mcs/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
2007-02-13 Marek Safar <marek.safar@gmail.com>

Another fix for bug #80749
* pending.cs: Abstract class has priority over interfaces.

2007-02-12 Marek Safar <marek.safar@gmail.com>

A fix for bug #80749
Expand Down
73 changes: 36 additions & 37 deletions mcs/mcs/pending.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,43 +148,7 @@ static ArrayList GetAbstractMethods (Type t)
pending_implementations = new TypeAndMethods [total];

int i = 0;
if (abstract_methods != null) {
int count = abstract_methods.Count;
pending_implementations [i].methods = new MethodInfo [count];
pending_implementations [i].need_proxy = new MethodInfo [count];

abstract_methods.CopyTo (pending_implementations [i].methods, 0);
pending_implementations [i].found = new bool [count];
pending_implementations [i].args = new Type [count][];
pending_implementations [i].mods = new Parameter.Modifier [count][];
pending_implementations [i].type = type_builder;

string indexer_name = TypeManager.IndexerPropertyName (type_builder);
pending_implementations [i].set_indexer_name = "set_" + indexer_name;
pending_implementations [i].get_indexer_name = "get_" + indexer_name;

int j = 0;
foreach (MemberInfo m in abstract_methods) {
MethodInfo mi = (MethodInfo) m;

ParameterData pd = TypeManager.GetParameterData (mi);
Type [] types = pd.Types;

pending_implementations [i].args [j] = types;
pending_implementations [i].mods [j] = null;
if (pd.Count > 0) {
Parameter.Modifier [] pm = new Parameter.Modifier [pd.Count];
for (int k = 0; k < pd.Count; k++)
pm [k] = pd.ParameterModifier (k);
pending_implementations [i].mods [j] = pm;
}

j++;
}
++i;
}

foreach (MissingInterfacesInfo missing in missing_ifaces) {
foreach (MissingInterfacesInfo missing in missing_ifaces){
MethodInfo [] mi;
Type t = missing.Type;

Expand Down Expand Up @@ -236,6 +200,41 @@ static ArrayList GetAbstractMethods (Type t)
}
i++;
}

if (abstract_methods != null){
int count = abstract_methods.Count;
pending_implementations [i].methods = new MethodInfo [count];
pending_implementations [i].need_proxy = new MethodInfo [count];

abstract_methods.CopyTo (pending_implementations [i].methods, 0);
pending_implementations [i].found = new bool [count];
pending_implementations [i].args = new Type [count][];
pending_implementations [i].mods = new Parameter.Modifier [count][];
pending_implementations [i].type = type_builder;

string indexer_name = TypeManager.IndexerPropertyName (type_builder);
pending_implementations [i].set_indexer_name = "set_" + indexer_name;
pending_implementations [i].get_indexer_name = "get_" + indexer_name;

int j = 0;
foreach (MemberInfo m in abstract_methods){
MethodInfo mi = (MethodInfo) m;

ParameterData pd = TypeManager.GetParameterData (mi);
Type [] types = pd.Types;

pending_implementations [i].args [j] = types;
pending_implementations [i].mods [j] = null;
if (pd.Count > 0){
Parameter.Modifier [] pm = new Parameter.Modifier [pd.Count];
for (int k = 0; k < pd.Count; k++)
pm [k] = pd.ParameterModifier (k);
pending_implementations [i].mods [j] = pm;
}

j++;
}
}
}

struct MissingInterfacesInfo {
Expand Down

0 comments on commit 6b75245

Please sign in to comment.