Author: marek
Date: 2007-04-01 09:32:06 -0400 (Sun, 01 Apr 2007)
New Revision: 75258
Modified:
trunk/mcs/mcs/ChangeLog
trunk/mcs/mcs/decl.cs
trunk/mcs/mcs/expression.cs
Log:
2007-04-01 Marek Safar <[EMAIL PROTECTED]>
* decl.cs (FindExtensionMethods): Consider all candidates with same name
at this level.
* expression.cs (MemberAccess.DoResolve): Cache resolved expression.
Modified: trunk/mcs/mcs/ChangeLog
===================================================================
--- trunk/mcs/mcs/ChangeLog 2007-04-01 13:08:46 UTC (rev 75257)
+++ trunk/mcs/mcs/ChangeLog 2007-04-01 13:32:06 UTC (rev 75258)
@@ -1,3 +1,10 @@
+2007-04-01 Marek Safar <[EMAIL PROTECTED]>
+
+ * decl.cs (FindExtensionMethods): Consider all candidates with same name
+ at this level.
+
+ * expression.cs (MemberAccess.DoResolve): Cache resolved expression.
+
2007-03-31 Marek Safar <[EMAIL PROTECTED]>
* anonymous.cs (AnonymousMethodExpression.Compatible): Handles both
Modified: trunk/mcs/mcs/decl.cs
===================================================================
--- trunk/mcs/mcs/decl.cs 2007-04-01 13:08:46 UTC (rev 75257)
+++ trunk/mcs/mcs/decl.cs 2007-04-01 13:32:06 UTC (rev 75258)
@@ -2204,11 +2204,11 @@
continue;
}
- if (ex_type == extensionType ||
TypeManager.IsGenericParameter (ex_type)) {
+ //if (implicit conversion between
ex_type and extensionType exist) {
if (candidates == null)
candidates = new
ArrayList (2);
candidates.Add (mb);
- }
+ //}
}
}
Modified: trunk/mcs/mcs/expression.cs
===================================================================
--- trunk/mcs/mcs/expression.cs 2007-04-01 13:08:46 UTC (rev 75257)
+++ trunk/mcs/mcs/expression.cs 2007-04-01 13:32:06 UTC (rev 75258)
@@ -6722,15 +6722,15 @@
//
SimpleName original = expr as SimpleName;
- Expression new_expr = expr.Resolve (ec,
+ expr = expr.Resolve (ec,
ResolveFlags.VariableOrValue |
ResolveFlags.Type |
ResolveFlags.Intermediate |
ResolveFlags.DisableStructFlowAnalysis);
- if (new_expr == null)
+ if (expr == null)
return null;
- if (new_expr is Namespace) {
- Namespace ns = (Namespace) new_expr;
+ if (expr is Namespace) {
+ Namespace ns = (Namespace) expr;
FullNamedExpression retval = ns.Lookup
(ec.DeclContainer, LookupIdentifier, loc);
#if GMCS_SOURCE
if ((retval != null) && (args != null))
@@ -6742,8 +6742,8 @@
return retval;
}
- Type expr_type = new_expr.Type;
- if (expr_type.IsPointer || expr_type ==
TypeManager.void_type || new_expr is NullLiteral){
+ Type expr_type = expr.Type;
+ if (expr_type.IsPointer || expr_type ==
TypeManager.void_type || expr is NullLiteral){
Unary.Error_OperatorCannotBeApplied (loc, ".",
expr_type);
return null;
}
@@ -6752,7 +6752,7 @@
return null;
}
- Constant c = new_expr as Constant;
+ Constant c = expr as Constant;
if (c != null && c.GetValue () == null) {
Report.Warning (1720, 1, loc, "Expression will
always cause a `{0}'",
"System.NullReferenceException");
@@ -6779,8 +6779,8 @@
TypeExpr texpr = member_lookup as TypeExpr;
if (texpr != null) {
- if (!(new_expr is TypeExpr) &&
- (original == null ||
!original.IdenticalNameAndTypeName (ec, new_expr, loc))) {
+ if (!(expr is TypeExpr) &&
+ (original == null ||
!original.IdenticalNameAndTypeName (ec, expr, loc))) {
Report.Error (572, loc, "`{0}': cannot
reference a type through an expression; try `{1}' instead",
Identifier,
member_lookup.GetSignatureForError ());
return null;
@@ -6793,7 +6793,7 @@
}
#if GMCS_SOURCE
- ConstructedType ct = new_expr as
ConstructedType;
+ ConstructedType ct = expr as ConstructedType;
if (ct != null) {
//
// When looking up a nested type in a
generic instance
@@ -6812,7 +6812,7 @@
}
MemberExpr me = (MemberExpr) member_lookup;
- member_lookup = me.ResolveMemberAccess (ec, new_expr,
loc, original);
+ member_lookup = me.ResolveMemberAccess (ec, expr, loc,
original);
if (member_lookup == null)
return null;
@@ -6827,7 +6827,7 @@
if (original != null && !TypeManager.IsValueType
(expr_type)) {
me = member_lookup as MemberExpr;
if (me != null && me.IsInstance) {
- LocalVariableReference var = new_expr
as LocalVariableReference;
+ LocalVariableReference var = expr as
LocalVariableReference;
if (var != null && !var.VerifyAssigned
(ec))
return null;
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches