Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs/gmcs
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2006-03-13 22:25:48 +0300
committerMarek Safar <marek.safar@gmail.com>2006-03-13 22:25:48 +0300
commit1380cd3dc0fa08bb417bf1689255cd21ada3c192 (patch)
treec64af7e4b94132d9f38ebb407398a97c538df60a /mcs/gmcs
parentbc0ec0ccda33233deb0087e434fd9fe95e977d8d (diff)
manually synchronized with 56802
svn path=/trunk/mcs/; revision=57897
Diffstat (limited to 'mcs/gmcs')
-rw-r--r--mcs/gmcs/assign.cs5
-rw-r--r--mcs/gmcs/ecore.cs19
-rw-r--r--mcs/gmcs/expression.cs8
-rw-r--r--mcs/gmcs/parameter.cs2
-rw-r--r--mcs/gmcs/statement.cs2
5 files changed, 16 insertions, 20 deletions
diff --git a/mcs/gmcs/assign.cs b/mcs/gmcs/assign.cs
index 53050bc1535..fec92573287 100644
--- a/mcs/gmcs/assign.cs
+++ b/mcs/gmcs/assign.cs
@@ -318,7 +318,6 @@ namespace Mono.CSharp {
source = embedded = ((Assign) source).GetEmbeddedAssign (loc);
real_source = source = source.Resolve (ec);
-
if (source == null) {
// Ensure that we don't propagate the error as spurious "uninitialized variable" errors.
target = target.ResolveLValue (ec, EmptyExpression.Null, Location);
@@ -408,7 +407,7 @@ namespace Mono.CSharp {
}
if ((source.eclass == ExprClass.Type) && (source is TypeExpr)) {
- source.Error_UnexpectedKind (ec, "variable or value", loc);
+ source.Error_UnexpectedKind (ec.DeclContainer, "variable or value", loc);
return null;
} else if ((RootContext.Version == LanguageVersion.ISO_1) &&
(source is MethodGroupExpr)){
@@ -432,7 +431,7 @@ namespace Mono.CSharp {
}
//
- // If this assignemnt/operator was part of a compound binary
+ // If this assignment/operator was part of a compound binary
// operator, then we allow an explicit conversion, as detailed
// in the spec.
//
diff --git a/mcs/gmcs/ecore.cs b/mcs/gmcs/ecore.cs
index fb5c07e27fe..581a3e30a16 100644
--- a/mcs/gmcs/ecore.cs
+++ b/mcs/gmcs/ecore.cs
@@ -659,9 +659,8 @@ namespace Mono.CSharp {
public static Expression MemberLookup (Type container_type, Type qualifier_type,
Type queried_type, string name, Location loc)
{
- return MemberLookup (container_type, qualifier_type,
- queried_type, name, AllMemberTypes,
- AllBindingFlags, loc);
+ return MemberLookup (container_type, qualifier_type, queried_type,
+ name, AllMemberTypes, AllBindingFlags, loc);
}
public static Expression MethodLookup (EmitContext ec, Type queried_type,
@@ -887,16 +886,16 @@ namespace Mono.CSharp {
/// <summary>
/// Reports that we were expecting `expr' to be of class `expected'
/// </summary>
- public void Error_UnexpectedKind (EmitContext ec, string expected, Location loc)
+ public void Error_UnexpectedKind (DeclSpace ds, string expected, Location loc)
{
- Error_UnexpectedKind (ec, expected, ExprClassName, loc);
+ Error_UnexpectedKind (ds, expected, ExprClassName, loc);
}
- public void Error_UnexpectedKind (EmitContext ec, string expected, string was, Location loc)
+ public void Error_UnexpectedKind (DeclSpace ds, string expected, string was, Location loc)
{
string name = GetSignatureForError ();
- if (ec != null)
- name = ec.DeclContainer.GetSignatureForError () + '.' + name;
+ if (ds != null)
+ name = ds.GetSignatureForError () + '.' + name;
Report.Error (118, loc, "`{0}' is a `{1}' but a `{2}' was expected",
name, was, expected);
@@ -2000,7 +1999,7 @@ namespace Mono.CSharp {
MemberCore mc = ec.DeclContainer.GetDefinition (Name);
if (mc != null) {
- Error_UnexpectedKind (ec, "type", GetMemberType (mc), loc);
+ Error_UnexpectedKind (ec.DeclContainer, "type", GetMemberType (mc), loc);
} else {
NamespaceEntry.Error_NamespaceNotFound (loc, Name);
}
@@ -2433,7 +2432,7 @@ namespace Mono.CSharp {
}
if (!(resolved is TypeExpr)) {
- resolved.Error_UnexpectedKind (ec, "type", loc);
+ resolved.Error_UnexpectedKind (ec.DeclContainer, "type", loc);
return null;
}
diff --git a/mcs/gmcs/expression.cs b/mcs/gmcs/expression.cs
index 375788c126f..fc32bfb5e02 100644
--- a/mcs/gmcs/expression.cs
+++ b/mcs/gmcs/expression.cs
@@ -883,7 +883,7 @@ namespace Mono.CSharp {
if (expr == null)
return null;
} else {
- expr.Error_UnexpectedKind (ec, "variable, indexer or property access", loc);
+ expr.Error_UnexpectedKind (ec.DeclContainer, "variable, indexer or property access", loc);
return null;
}
@@ -5955,7 +5955,7 @@ namespace Mono.CSharp {
MethodGroupExpr mg = ml as MethodGroupExpr;
if (mg == null) {
- ml.Error_UnexpectedKind (ec, "method group", loc);
+ ml.Error_UnexpectedKind (ec.DeclContainer, "method group", loc);
return null;
}
@@ -6433,7 +6433,7 @@ namespace Mono.CSharp {
AllBindingFlags, loc);
if (!(ml is MethodGroupExpr)) {
- ml.Error_UnexpectedKind (ec, "method group", loc);
+ ml.Error_UnexpectedKind (ec.DeclContainer, "method group", loc);
return null;
}
@@ -7505,7 +7505,7 @@ namespace Mono.CSharp {
}
if (!(member_lookup is TypeExpr)) {
- new_expr.Error_UnexpectedKind (ec, "type", loc);
+ new_expr.Error_UnexpectedKind (ec.DeclContainer, "type", loc);
return null;
}
diff --git a/mcs/gmcs/parameter.cs b/mcs/gmcs/parameter.cs
index ded255137ee..6570a4f4da8 100644
--- a/mcs/gmcs/parameter.cs
+++ b/mcs/gmcs/parameter.cs
@@ -212,7 +212,6 @@ namespace Mono.CSharp {
protected Type parameter_type;
public readonly Location Location;
- EmitContext ec; // because ApplyAtrribute doesn't have ec
IResolveContext resolve_context;
public Parameter (Expression type, string name, Modifier mod, Attributes attrs, Location loc)
@@ -273,7 +272,6 @@ namespace Mono.CSharp {
if (parameter_type != null)
return true;
- this.ec = ec;
this.resolve_context = ec;
TypeExpr texpr = TypeName.ResolveAsTypeTerminal (ec, false);
diff --git a/mcs/gmcs/statement.cs b/mcs/gmcs/statement.cs
index 2941a87b72d..27e4d61d75a 100644
--- a/mcs/gmcs/statement.cs
+++ b/mcs/gmcs/statement.cs
@@ -844,7 +844,7 @@ namespace Mono.CSharp {
if (!(eclass == ExprClass.Variable || eclass == ExprClass.PropertyAccess ||
eclass == ExprClass.Value || eclass == ExprClass.IndexerAccess)) {
- expr.Error_UnexpectedKind (ec, "value, variable, property or indexer access ", loc);
+ expr.Error_UnexpectedKind (ec.DeclContainer, "value, variable, property or indexer access ", loc);
return false;
}