// Holds the events
ArrayList events;
- // Holds AddHandlers stements for events
+ // Holds AddHandlers statements for events
ArrayList handlers;
// The emit context for toplevel objects.
if (value != null && (!(value is Method)))
return AdditionResult.NameExists;
- if (basename == Basename)
- return AdditionResult.EnclosingClash;
-
if (methods == null)
methods = new ArrayList ();
(base_class_type == TypeManager.attribute_type ||
base_class_type.IsSubclassOf (TypeManager.attribute_type))) {
RootContext.RegisterAttribute (this);
- } else
- RootContext.RegisterOrder (this);
+ }
+ else
+ {
+ if ( this is Interface)
+ RootContext.RegisterOrder ((Interface) this);
+ else
+ RootContext.RegisterOrder (this);
+ }
if (Interfaces != null) {
foreach (Interface iface in Interfaces)
foreach (Field f in fields) {
if ((f.ModFlags & Modifiers.PUBLIC) != 0)
continue;
+
+ if (f.Name.StartsWith(@"$STATIC$"))
+ continue;
if (f.status == 0){
Report.Warning (
TypeManager.ExpandAllInterfaces (tbases, ref bases);
foreach (Type tbase in bases) {
+ /*
string bname = tbase.Name;
if (bname.LastIndexOf(".") != -1)
bname = bname.Substring(bname.LastIndexOf("."));
+ */
- if (bname == iname) {
+ //if (bname == iname) {
+ if (tbase == InterfaceType) {
iface_found = true;
break;
}
"' causes a cycle in the structure layout");
return false;
}
- FieldBuilder = parent.TypeBuilder.DefineField (
- Name, t, Modifiers.FieldAttr (ModFlags));
+
+ //Local Static Variable
+ if (Name.StartsWith(@"$STATIC$"))
+ FieldBuilder = parent.TypeBuilder.DefineField (
+ Name, t, Modifiers.FieldAttr (ModFlags) | FieldAttributes.SpecialName);
+ else
+ FieldBuilder = parent.TypeBuilder.DefineField (
+ Name, t, Modifiers.FieldAttr (ModFlags));
TypeManager.RegisterFieldBase (FieldBuilder, this);
return true;
if (mi != null && mi.Count > 0)
parent_member = (PropertyInfo) mi [0];
-
if (parent_member is PropertyInfo) {
PropertyInfo parent_property = (PropertyInfo)parent_member;
/*if ((ModFlags & Modifiers.NEW) != 0)
WarningNotHiding (container);
*/
- if ((ModFlags & Modifiers.OVERRIDE) != 0) {
-
- /*
- if (this is Indexer)
- Report.Error (115, Location,
- container.MakeName (Name) +
- " no suitable indexers found to override");
- else
- */
- Report.Error (115, Location,
- container.MakeName (Name) +
- " no suitable properties found to override");
- return false;
- }
if ((ModFlags & ( Modifiers.NEW | Modifiers.SHADOWS | Modifiers.OVERRIDE )) == 0) {
if ((ModFlags & Modifiers.NONVIRTUAL) != 0) {
Modifiers.WRITEONLY |
Modifiers.SHADOWS;
- string set_parameter_name;
- Parameters get_params;
- Parameters set_params;
+ //string set_parameter_name;
+ //Parameters get_params;
+ //Parameters set_params;
public Property (Expression type, string name, int mod_flags,
Accessor get_block, Accessor set_block,
"'Property' inside a 'Structure' can not be declared as " +
"'Protected' or 'Protected Friend'");
+ if (((ModFlags & Modifiers.DEFAULT) != 0) && (Parameters == null || Parameters.CountStandardParams () == 0)) {
+ Report.Error (31048, Location, "Properties with no required " +
+ "parameters cannot be declared 'Default'");
+ return false;
+ }
+
if (!DoDefine (parent))
return false;