if (type.IsInterface || type.IsAbstract){
Error (
- 144, "It is not possible to create instances of interfaces " +
- "or abstract classes");
+ 30376, "It is not possible to create instances of Interfaces " +
+ "or classes marked as MustInherit");
return null;
}
void Error_IncorrectArrayInitializer ()
{
- Error (178, "Incorrectly structured array initializer");
+ Error (30567, "Incorrectly structured array initializer");
}
public bool CheckIndices (EmitContext ec, ArrayList probe, int idx, bool specified_dims)
Enum en = TypeManager.LookupEnum (decl_type);
Constant c;
- if (en != null)
+ if (en != null) {
c = Constantify (o, en.UnderlyingType);
- else
+ return new EnumConstant (c, en.UnderlyingType);
+ }
+ else {
c = Constantify (o, enum_member.Type);
+ return new EnumConstant (c, enum_member.Type);
+ }
+
- return new EnumConstant (c, decl_type);
}
Expression exp = Constantify (o, t);
if (IdenticalNameAndTypeName (ec, left_original, loc))
return member_lookup;
- if (left_is_explicit) {
+ /*if (left_is_explicit) {
error176 (loc, me.Name);
return null;
- }
+ }*/
}
//
Type expr_type = expr.Type;
if ((expr is TypeExpr) && (expr_type.IsSubclassOf (TypeManager.enum_type))){
-
Enum en = TypeManager.LookupEnum (expr_type);
if (en != null) {
object value = en.LookupEnumValue (ec, Identifier, loc);
-
+ expr_type = TypeManager.int32_type;
if (value != null){
Constant c = Constantify (value, en.UnderlyingType);
- return new EnumConstant (c, expr_type);
+ return new EnumConstant (c, en.UnderlyingType);
}
}
}
BindingFlags.NonPublic, Identifier);
if (lookup == null)
- Error (117, "'" + expr_type + "' does not contain a definition for '" + Identifier + "'");
+ Error (30456, "'" + expr_type + "' does not contain a definition for '" + Identifier + "'");
else
{
if ((expr_type != ec.ContainerType) &&
"qualifier must be of type '" + TypeManager.MonoBASIC_Name (ec.ContainerType) + "' " +
"(or derived from it)");
else
- Error (122, "'" + expr_type + "." + Identifier + "' " +
+ Error (30390, "'" + expr_type + "." + Identifier + "' " +
"is inaccessible because of its protection level");
} else
- Error (122, "'" + expr_type + "." + Identifier + "' " +
+ Error (30390, "'" + expr_type + "." + Identifier + "' " +
"is inaccessible because of its protection level");
}
return null;
AllMemberTypes, AllBindingFlags, loc);
if (member_lookup == null) {
- Error (117,
+ Error (30456,
TypeManager.MonoBASIC_Name (base_type) + " does not " +
"contain a definition for '" + member + "'");
return null;