Skip to content

Commit

Permalink
Rename AddBasesForPart to SetBaseTypes
Browse files Browse the repository at this point in the history
  • Loading branch information
marek-safar committed May 9, 2013
1 parent 32cc8a5 commit 7bc0d12
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions mcs/mcs/class.cs
Expand Up @@ -1066,9 +1066,9 @@ public virtual CompilationSourceFile GetCompilationSourceFile ()
}
}

public virtual void AddBasesForPart (List<FullNamedExpression> bases)
public virtual void SetBaseTypes (List<FullNamedExpression> baseTypes)
{
type_bases = bases;
type_bases = baseTypes;
}

/// <summary>
Expand Down Expand Up @@ -2577,14 +2577,14 @@ public override void Accept (StructuralVisitor visitor)
visitor.Visit (this);
}

public override void AddBasesForPart (List<FullNamedExpression> bases)
public override void SetBaseTypes (List<FullNamedExpression> baseTypes)
{
var pmn = MemberName;
if (pmn.Name == "Object" && !pmn.IsGeneric && Parent.MemberName.Name == "System" && Parent.MemberName.Left == null)
Report.Error (537, Location,
"The class System.Object cannot have a base class or implement an interface.");

base.AddBasesForPart (bases);
base.SetBaseTypes (baseTypes);
}

public override void ApplyAttributeBuilder (Attribute a, MethodSpec ctor, byte[] cdata, PredefinedAttributes pa)
Expand Down
4 changes: 2 additions & 2 deletions mcs/mcs/cs-parser.jay
Expand Up @@ -4779,13 +4779,13 @@ opt_class_base
: /* empty */
| COLON type_list
{
current_type.AddBasesForPart ((List<FullNamedExpression>) $2);
current_type.SetBaseTypes ((List<FullNamedExpression>) $2);
}
| COLON type_list error
{
Error_SyntaxError (yyToken);

current_type.AddBasesForPart ((List<FullNamedExpression>) $2);
current_type.SetBaseTypes ((List<FullNamedExpression>) $2);
}
;

Expand Down
2 changes: 1 addition & 1 deletion mcs/mcs/eval.cs
Expand Up @@ -655,7 +655,7 @@ CompiledMethod CompileBlock (Class host, Undo undo, Report Report)
new TypeExpression (base_class_imported, host.Location)
};

host.AddBasesForPart (baseclass_list);
host.SetBaseTypes (baseclass_list);

host.CreateContainer ();
host.DefineContainer ();
Expand Down

0 comments on commit 7bc0d12

Please sign in to comment.