Author: martin
Date: 2005-05-12 17:48:19 -0400 (Thu, 12 May 2005)
New Revision: 44473
Modified:
trunk/mcs/gmcs/ChangeLog
trunk/mcs/gmcs/class.cs
trunk/mcs/gmcs/statement.cs
Log:
2005-05-13 Martin Baulig <[EMAIL PROTECTED]>
* statement.cs (Block.Resolve): Make the `bool unresolved' flag an
instance variable, not a local. Fix #74873.
(Block.ResolveUnreachable): Set it to true here.
Modified: trunk/mcs/gmcs/ChangeLog
===================================================================
--- trunk/mcs/gmcs/ChangeLog 2005-05-12 21:45:53 UTC (rev 44472)
+++ trunk/mcs/gmcs/ChangeLog 2005-05-12 21:48:19 UTC (rev 44473)
@@ -1,3 +1,9 @@
+2005-05-13 Martin Baulig <[EMAIL PROTECTED]>
+
+ * statement.cs (Block.Resolve): Make the `bool unresolved' flag an
+ instance variable, not a local. Fix #74873.
+ (Block.ResolveUnreachable): Set it to true here.
+
2005-05-12 Martin Baulig <[EMAIL PROTECTED]>
* cs-parser.jay (property_declaration): Pass the `current_class',
Modified: trunk/mcs/gmcs/class.cs
===================================================================
--- trunk/mcs/gmcs/class.cs 2005-05-12 21:45:53 UTC (rev 44472)
+++ trunk/mcs/gmcs/class.cs 2005-05-12 21:48:19 UTC (rev 44473)
@@ -3393,7 +3393,7 @@
return false;
if ((ModFlags & Modifiers.NEW) == 0) {
- if (MemberType !=
TypeManager.TypeToCoreType (base_ret_type)) {
+ if (!TypeManager.IsEqual (MemberType,
TypeManager.TypeToCoreType (base_ret_type))) {
Report.SymbolRelatedToPreviousError (base_method);
if (this is PropertyBase) {
Report.Error (1715,
Location, "'{0}': type must be '{1}' to match overridden member '{2}'",
@@ -4541,10 +4541,14 @@
bool ok = true;
int count = c.ParameterInfo.Count;
+ Report.Debug (64, "OVERLOADED CTOR", c,
c.ParameterInfo,
+ c.ParameterTypes, Arguments,
count);
+
if ((count > 0) &&
c.ParameterInfo.ParameterModifier (count -
1) == Parameter.Modifier.PARAMS) {
for (int i = 0; i < count-1; i++)
- if (c.ParameterTypes [i] !=
((Argument)Arguments [i]).Type) {
+ if ((i >= Arguments.Count) ||
+ (c.ParameterTypes [i] !=
((Argument)Arguments [i]).Type)) {
ok = false;
break;
}
Modified: trunk/mcs/gmcs/statement.cs
===================================================================
--- trunk/mcs/gmcs/statement.cs 2005-05-12 21:45:53 UTC (rev 44472)
+++ trunk/mcs/gmcs/statement.cs 2005-05-12 21:48:19 UTC (rev 44473)
@@ -1917,6 +1917,7 @@
}
bool unreachable_shown;
+ bool unreachable;
public override bool Resolve (EmitContext ec)
{
@@ -1936,12 +1937,10 @@
// from the beginning of the function. The outer
Resolve() that detected the unreachability is
// responsible for handling the situation.
//
- bool unreachable = false;
-
int statement_count = statements.Count;
for (int ix = 0; ix < statement_count; ix++){
Statement s = (Statement) statements [ix];
-
+
if (unreachable && !(s is LabeledStatement)) {
if (s == EmptyStatement.Value)
s.loc = EndLocation;
@@ -2021,6 +2020,8 @@
if (Implicit)
return Resolve (ec);
+ unreachable = true;
+
ec.StartFlowBranching
(FlowBranching.BranchingType.Block, loc);
bool ok = Resolve (ec);
ec.KillFlowBranching ();
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches