using System.Reflection;
using System.Runtime.CompilerServices;
-[assembly: AssemblyVersion("1.1.2")]
+[assembly: AssemblyVersion("1.1.3")]
[assembly: AssemblyTitle ("Mono C# Compiler")]
[assembly: AssemblyDescription ("Mono C# Compiler with Generics")]
[assembly: AssemblyCopyright ("2001, 2002, 2003 Ximian, Inc.")]
+2004-12-08 Martin Baulig <martin@ximian.com>
+
+ * decl.cs (MemberName.ToString): Make this work again.
+
+2004-12-08 Marek Safar <marek.safar@seznam.cz>
+
+ * attribute.cs (Resolve): Add error 591 detection.
+
+ * class.cs (FieldMember.Define): Add error 1547 detection.
+ (Indexer.Define): Add error 620 detection.
+ (Operator.Define): Add error 590 detection.
+
+ * ecore.cs: Missing argument for error 79.
+
+ * expression.cs (ComposedCast.DoResolveAsTypeStep): Add error 611
+ detection.
+
+2004-12-07 Marek Safar <marek.safar@seznam.cz>
+
+ Fix #70106
+ * assign.cs.cs (Assign.DoResolve): Reports error 1648 for value types
+ only.
+
2004-12-07 Atsushi Enomoto <atsushi@ximian.com>
* cs-parser.jay : handle doc comments on implicit/explicit operators.
}
FieldExpr field_exp = target as FieldExpr;
- if (field_exp != null && !ec.IsConstructor && !ec.IsFieldInitializer) {
+ if (field_exp != null && field_exp.DeclaringType.IsValueType && !ec.IsConstructor && !ec.IsFieldInitializer) {
field_exp = field_exp.InstanceExpression as FieldExpr;
if (field_exp != null && field_exp.FieldInfo.IsInitOnly) {
if (field_exp.IsStatic) {
if (DoCompares){
if (usage_attr) {
+ if ((int)val == 0) {
+ Report.Error (591, Location, "Invalid value for argument to 'System.AttributeUsage' attribute");
+ return null;
+ }
usage_attribute = new AttributeUsageAttribute ((AttributeTargets)val);
} else if (MethodImplAttr) {
this.ImplOptions = (MethodImplOptions) val;
MemberType = texpr.Type;
+ if (MemberType == TypeManager.void_type) {
+ Report.Error (1547, Location, "Keyword 'void' cannot be used in this context");
+ return false;
+ }
+
+ ec.InUnsafe = old_unsafe;
+
if (!CheckBase ())
return false;
if (!base.Define ())
return false;
+ if (MemberType == TypeManager.void_type) {
+ Report.Error (620, Location, "Indexers cannot have void type");
+ return false;
+ }
+
if (OptAttributes != null) {
Attribute indexer_attr = OptAttributes.Search (TypeManager.indexer_name_type, ec);
if (indexer_attr != null) {
if (!DoDefine (ds))
return false;
+ if (MemberType == TypeManager.void_type) {
+ Report.Error (590, Location, "User-defined operators cannot return void");
+ return false;
+ }
+
OperatorMethod = new Method (
Parent, null, Type, ModFlags, false, MemberName,
Parameters, OptAttributes, Location);
using System.Text;
using System.Globalization;
using System.Xml;
- using System.Diagnostics;
public enum Target {
Library, Exe, Module, WinExe
static bool timestamps = false;
static bool pause = false;
static bool show_counters = false;
- public static bool parser_verbose = false;
//
// Whether to load the initial config file (what CSC.RSP has by default)
public override void Emit (EmitContext ec)
{
if (instance_expr is This)
- Report.Error (79, loc, "The event `{0}' can only appear on the left hand side of += or -=, try calling the actual delegate");
+ Report.Error (79, loc, "The event `{0}' can only appear on the left hand side of += or -=, try calling the actual delegate", Name);
else
Report.Error (70, loc, "The event `{0}' can only appear on the left hand side of += or -= "+
"(except on the defining type)", Name);
UnsafeError (loc);
return null;
}
+
+ if (type.IsArray && (type.GetElementType () == TypeManager.arg_iterator_type ||
+ type.GetElementType () == TypeManager.typed_reference_type)) {
+ Report.Error (611, loc, "Array elements cannot be of type '{0}'", TypeManager.CSharpName (type.GetElementType ()));
+ return null;
+ }
eclass = ExprClass.Type;
return this;
}
if (parameter_type == TypeManager.void_type){
- Report.Error (1536, l, "`void' parameter is not permitted");
+ Report.Error (1536, l, "Invalid parameter type 'void'");
return false;
}