A list of commits follows
---------------------------
Commit: 983f0c3402c4ce45e843ea6907de1abc62ebe5b4
Author: Marek Safar <marek...@gmail.com>
Date: 08/03/2010 05:29:17
URL: http://github.com/mono/mono/commit/983f0c3402c4ce45e843ea6907de1abc62ebe5b4
Log Message:
------------
Updated known issues
------------
My Changed paths:
M mcs/errors/known-issues-dmcs
M mcs/tests/known-issues-dmcs
Modified: mcs/errors/known-issues-dmcs
===================================================================
--- a/mcs/errors/known-issues-dmcs
+++ b/mcs/errors/known-issues-dmcs
@@ -20,6 +20,5 @@ cs0457-2.cs
cs0457.cs
cs1540-6.cs
-cs1540-9.cs
dcs0165.cs NO ERROR # Bug 593369
Modified: mcs/tests/known-issues-dmcs
===================================================================
--- a/mcs/tests/known-issues-dmcs
+++ b/mcs/tests/known-issues-dmcs
@@ -7,7 +7,6 @@
test-xml-027.cs
gtest-230.cs
-gtest-316.cs verifier
gtest-437.cs
test-416.cs bug #504085
@@ -19,4 +18,4 @@ test-715.cs bug #504085
test-759.cs IGNORE bug #604218
test-xml-030.cs
-
+test-xml-035.cs
Commit: b9ba213889ae5f13a4abfb74eec24b0b70443e80
Author: Marek Safar <marek...@gmail.com>
Date: 08/03/2010 07:49:45
URL: http://github.com/mono/mono/commit/b9ba213889ae5f13a4abfb74eec24b0b70443e80
Log Message:
------------
Fixed equality match between object and dynamic for ref/out parameters.
------------
My Changed paths:
M mcs/mcs/argument.cs
M mcs/mcs/ecore.cs
Added paths:
A mcs/tests/dtest-016.cs
Modified: mcs/mcs/argument.cs
===================================================================
--- a/mcs/mcs/argument.cs
+++ b/mcs/mcs/argument.cs
@@ -393,7 +393,7 @@ namespace Mono.CSharp
public bool HasDynamic {
get {
foreach (Argument a in args) {
- if (a.Type == InternalType.Dynamic)
+ if (a.Type == InternalType.Dynamic && !a.IsByRef)
return true;
}
@@ -442,7 +442,8 @@ namespace Mono.CSharp
dynamic = false;
foreach (Argument a in args) {
a.Resolve (ec);
- dynamic |= a.Type == InternalType.Dynamic;
+ if (a.Type == InternalType.Dynamic && !a.IsByRef)
+ dynamic = true;
}
}
Modified: mcs/mcs/ecore.cs
===================================================================
--- a/mcs/mcs/ecore.cs
+++ b/mcs/mcs/ecore.cs
@@ -3698,7 +3698,8 @@ namespace Mono.CSharp {
//
if ((arg_mod | param_mod) != 0) {
if (argument.Type != parameter) {
- if (argument.Type == InternalType.Dynamic)
+ if ((argument.Type == InternalType.Dynamic && parameter == TypeManager.object_type) ||
+ (parameter == InternalType.Dynamic && argument.Type == TypeManager.object_type))
return 0;
return 2;
@@ -4120,10 +4121,14 @@ namespace Mono.CSharp {
if ((p_mod & ~Parameter.Modifier.PARAMS) != a.Modifier)
break;
- if (!TypeManager.IsEqual (a.Expr.Type, pt))
- break;
+ if (a.Expr.Type == pt)
+ continue;
- continue;
+ if (((a.Expr.Type == InternalType.Dynamic && pt == TypeManager.object_type) ||
+ (pt == InternalType.Dynamic && a.Expr.Type == TypeManager.object_type)))
+ continue;
+
+ break;
}
NamedArgument na = a as NamedArgument;
Added: mcs/tests/dtest-016.cs
===================================================================
--- /dev/null
+++ b/mcs/tests/dtest-016.cs
@@ -0,0 +1,41 @@
+using System;
+
+class Foo
+{
+ public virtual void Dyn (out dynamic o)
+ {
+ o = null;
+ }
+}
+
+class Bar : Foo
+{
+ public override void Dyn (out dynamic o)
+ {
+ base.Dyn (out o);
+ }
+}
+
+class Program
+{
+ static void DynOut (out dynamic d)
+ {
+ d = null;
+ }
+
+ static void DynRef (ref object d)
+ {
+ d = null;
+ }
+
+ static int Main ()
+ {
+ object o;
+ DynOut (out o);
+
+ dynamic d = null;
+ DynRef (ref d);
+ return 0;
+ }
+}
+
Commit: 6f576427996037cccae9bffd9dae79212e6c892d
Author: Marek Habersack <gre...@twistedcode.net>
Date: 08/03/2010 09:28:51
URL: http://github.com/mono/mono/commit/6f576427996037cccae9bffd9dae79212e6c892d
Log Message:
------------
Removed 1.1 code and NET_2_0 ifdefs
------------
My Changed paths:
M mcs/class/System.Web/System.Web.UI.WebControls/ListControl.cs
M mcs/class/System.Web/System.Web.UI.WebControls/RadioButtonList.cs
M mcs/class/System.Web/System.Web.UI.WebControls/RepeatInfo.cs
Modified: mcs/class/System.Web/System.Web.UI.WebControls/ListControl.cs
===================================================================
--- a/mcs/class/System.Web/System.Web.UI.WebControls/ListControl.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/ListControl.cs
@@ -38,41 +38,23 @@ namespace System.Web.UI.WebControls {
[DataBindingHandler("System.Web.UI.Design.WebControls.ListControlDataBindingHandler, " + Consts.AssemblySystem_Design)]
[DefaultEventAttribute ("SelectedIndexChanged")]
-#if !NET_2_0
- [DefaultPropertyAttribute ("DataSource")]
-#endif
[Designer("System.Web.UI.Design.WebControls.ListControlDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
[ParseChildrenAttribute (true, "Items")]
-#if NET_2_0
[ControlValueProperty ("SelectedValue", null)]
-#endif
- public abstract class ListControl :
-#if NET_2_0
- DataBoundControl, IEditableTextControl, ITextControl
-#else
- WebControl
-#endif
+ public abstract class ListControl : DataBoundControl, IEditableTextControl, ITextControl
{
static readonly object SelectedIndexChangedEvent = new object ();
-#if NET_2_0
static readonly object TextChangedEvent = new object ();
-#endif
ListItemCollection items;
-#if NET_2_0
int _selectedIndex = -2;
string _selectedValue;
-#else
- int saved_selected_index = -2;
- string saved_selected_value;
-#endif
public ListControl () : base (HtmlTextWriterTag.Select)
{
}
-#if NET_2_0
[DefaultValue (false)]
[Themeable (false)]
[WebSysDescription ("")]
@@ -88,11 +70,8 @@ namespace System.Web.UI.WebControls {
RequiresDataBinding = true;
}
}
-#endif
-#if NET_2_0
[Themeable (false)]
-#endif
[DefaultValue(false)]
[WebSysDescription ("")]
[WebCategory ("Behavior")]
@@ -101,37 +80,7 @@ namespace System.Web.UI.WebControls {
set { ViewState ["AutoPostBack"] = value; }
}
-#if ONLY_1_1
- [DefaultValue("")]
- [WebSysDescription ("")]
- [WebCategory ("Data")]
- public virtual string DataMember {
- get { return ViewState.GetString ("DataMember", String.Empty); }
- set { ViewState ["DataMember"] = value; }
- }
-
- object data_source;
-
- [Bindable(true)]
- [DefaultValue(null)]
- [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
- [WebSysDescription ("")]
- [WebCategory ("Data")]
- public virtual object DataSource {
- get { return data_source; }
- set {
- if(value == null || value is IListSource || value is IEnumerable) {
- data_source = value;
- return;
- }
- throw new ArgumentException("Invalid DataSource Type");
- }
- }
-#endif
-
-#if NET_2_0
[Themeable (false)]
-#endif
[DefaultValue("")]
[WebSysDescription ("")]
[WebCategory ("Data")]
@@ -139,16 +88,12 @@ namespace System.Web.UI.WebControls {
get { return ViewState.GetString ("DataTextField", String.Empty); }
set {
ViewState ["DataTextField"] = value;
-#if NET_2_0
if (Initialized)
RequiresDataBinding = true;
-#endif
}
}
-#if NET_2_0
[Themeable (false)]
-#endif
[DefaultValue("")]
[WebSysDescription ("")]
[WebCategory ("Data")]
@@ -156,16 +101,12 @@ namespace System.Web.UI.WebControls {
get { return ViewState.GetString ("DataTextFormatString", String.Empty); }
set {
ViewState ["DataTextFormatString"] = value;
-#if NET_2_0
if (Initialized)
RequiresDataBinding = true;
-#endif
}
}
-#if NET_2_0
[Themeable (false)]
-#endif
[DefaultValue("")]
[WebSysDescription ("")]
[WebCategory ("Data")]
@@ -173,16 +114,12 @@ namespace System.Web.UI.WebControls {
get { return ViewState.GetString ("DataValueField", String.Empty); }
set {
ViewState ["DataValueField"] = value;
-#if NET_2_0
if (Initialized)
RequiresDataBinding = true;
-#endif
}
}
-#if NET_2_0
[Editor ("System.Web.UI.Design.WebControls.ListItemsCollectionEditor," + Consts.AssemblySystem_Design, "System.Drawing.Design.UITypeEditor, " + Consts.AssemblySystem_Drawing)]
-#endif
[DefaultValue(null)]
[MergableProperty(false)]
[PersistenceMode(PersistenceMode.InnerDefaultProperty)]
@@ -205,9 +142,7 @@ namespace System.Web.UI.WebControls {
[Browsable(false)]
[DefaultValue(0)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
-#if NET_2_0
[Themeable (false)]
-#endif
[WebSysDescription ("")]
[WebCategory ("Misc")]
public virtual int SelectedIndex {
@@ -221,7 +156,6 @@ namespace System.Web.UI.WebControls {
return -1;
}
set {
-#if NET_2_0
_selectedIndex = value;
if (value < -1)
@@ -238,26 +172,6 @@ namespace System.Web.UI.WebControls {
/* you'd think this would be called, but noooo */
//OnSelectedIndexChanged (EventArgs.Empty);
-#else
- if (items == null || items.Count == 0) {
- // This will happen when assigning this property
- // before DataBind () is called on the control.
- saved_selected_index = value;
- return;
- }
-
- if (value < -1 || value >= Items.Count)
- throw new ArgumentOutOfRangeException ("value");
-
- ClearSelection ();
- if (value == -1)
- return;
-
- items [value].Selected = true;
-
- /* you'd think this would be called, but noooo */
- //OnSelectedIndexChanged (EventArgs.Empty);
-#endif
}
}
@@ -275,12 +189,8 @@ namespace System.Web.UI.WebControls {
}
}
-#if NET_2_0
[Bindable(true, BindingDirection.TwoWay)]
[Themeable (false)]
-#else
- [Bindable(true)]
-#endif
[Browsable(false)]
[DefaultValue("")]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
@@ -294,37 +204,11 @@ namespace System.Web.UI.WebControls {
return Items [si].Value;
}
set {
-#if NET_2_0
_selectedValue = value;
SetSelectedValue (value);
-#else
- ClearSelection ();
- if (items == null || items.Count == 0) {
- // This will happen when assigning this property
- // before DataBind () is called on the control.
- saved_selected_value = value;
- return;
- }
-
- int count = Items.Count;
- ListItemCollection coll = Items;
- bool thr = true;
- for (int i = 0; i < count; i++) {
- if (coll [i].Value == value) {
- coll [i].Selected = true;
- thr = false;
- }
- }
-
- if (thr) {
- string msg = String.Format ("Argument value is out of range: {0}", value);
- throw new ArgumentOutOfRangeException (msg);
- }
-#endif
}
}
-#if NET_2_0
bool SetSelectedValue (string value)
{
if (items != null && items.Count > 0) {
@@ -374,8 +258,6 @@ namespace System.Web.UI.WebControls {
{
base.AddAttributesToRender (w);
}
-
-#endif
public virtual void ClearSelection ()
{
@@ -390,53 +272,30 @@ namespace System.Web.UI.WebControls {
protected override void OnDataBinding (EventArgs e)
{
base.OnDataBinding (e);
-#if !NET_2_0
- IEnumerable list = DataSourceResolver.ResolveDataSource (DataSource, DataMember);
- PerformDataBinding (list);
-#else
IEnumerable list = GetData ().ExecuteSelect (DataSourceSelectArguments.Empty);
InternalPerformDataBinding (list);
-#endif
}
-#if NET_2_0
- protected internal
-#else
- protected
-#endif
- override void OnPreRender (EventArgs e)
+ protected internal override void OnPreRender (EventArgs e)
{
base.OnPreRender (e);
-#if NET_2_0
Page page = Page;
if (page != null && IsEnabled)
page.RegisterEnabledControl (this);
-#endif
}
-#if NET_2_0
protected virtual void OnTextChanged (EventArgs e)
{
EventHandler handler = (EventHandler) Events [TextChangedEvent];
if (handler != null)
handler (this, e);
}
-#endif
-#if NET_2_0
- protected internal override
-#endif
- void PerformDataBinding (IEnumerable dataSource)
+ protected internal override void PerformDataBinding (IEnumerable dataSource)
{
if (dataSource == null)
-#if NET_2_0
goto setselected;
-#else
- return;
-#endif
-#if NET_2_0
if (!AppendDataBoundItems)
-#endif
Items.Clear ();
string format = DataTextFormatString;
@@ -475,7 +334,6 @@ namespace System.Web.UI.WebControls {
coll.Add (new ListItem (text, val));
}
-#if NET_2_0
setselected:
if (!String.IsNullOrEmpty (_selectedValue)) {
if (!SetSelectedValue (_selectedValue))
@@ -486,20 +344,8 @@ namespace System.Web.UI.WebControls {
else if (_selectedIndex >= 0) {
SelectedIndex = _selectedIndex;
}
-#else
- if (saved_selected_value != null) {
- SelectedValue = saved_selected_value;
- if (saved_selected_index != -2 && saved_selected_index != SelectedIndex)
- throw new ArgumentException ("SelectedIndex and SelectedValue are mutually exclusive.");
- }
- else if (saved_selected_index != -2) {
- SelectedIndex = saved_selected_index;
- // No need to check saved_selected_value here, as it's done before.
- }
-#endif
}
-#if NET_2_0
[MonoTODO ("why override?")]
protected override void PerformSelect ()
{
@@ -537,8 +383,6 @@ namespace System.Web.UI.WebControls {
}
}
-#endif
-
internal ArrayList GetSelectedIndicesInternal ()
{
ArrayList selected = null;
@@ -568,10 +412,6 @@ namespace System.Web.UI.WebControls {
// .NET 2.0+ never returns null. It returns a Triplet with the Third member
// set to an instance of ArrayList. Since we don't have a use (at least atm)
// for this, we will just return a pair with both members null.
-#if !NET_2_0
- if (baseState == null && itemsState == null)
- return null;
-#endif
return new Pair (baseState, itemsState);
}
@@ -593,13 +433,12 @@ namespace System.Web.UI.WebControls {
manager.LoadViewState (itemsState);
}
}
-#if NET_2_0
+
[MonoTODO ("Not implemented")]
protected void SetPostDataSelection (int selectedIndex)
{
throw new NotImplementedException ();
}
-#endif
protected override void TrackViewState ()
{
@@ -616,7 +455,6 @@ namespace System.Web.UI.WebControls {
handler (this, e);
}
-#if NET_2_0
protected internal virtual void VerifyMultiSelect ()
{
if (!MultiSelectOk ())
@@ -627,7 +465,6 @@ namespace System.Web.UI.WebControls {
{
return false;
}
-#endif
[WebSysDescription ("")]
[WebCategory ("Action")]
@@ -636,7 +473,6 @@ namespace System.Web.UI.WebControls {
remove { Events.RemoveHandler (SelectedIndexChangedEvent, value); }
}
-#if NET_2_0
/* sealed in the docs */
public event EventHandler TextChanged {
add {
@@ -674,9 +510,6 @@ namespace System.Web.UI.WebControls {
ViewState ["ValidationGroup"] = value;
}
}
-
-
-#endif
}
}
Modified: mcs/class/System.Web/System.Web.UI.WebControls/RadioButtonList.cs
===================================================================
--- a/mcs/class/System.Web/System.Web.UI.WebControls/RadioButtonList.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/RadioButtonList.cs
@@ -41,14 +41,9 @@ namespace System.Web.UI.WebControls {
[AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
// attributes
[ValidationProperty ("SelectedItem")]
-#if NET_2_0
[SupportsEventValidation]
-#endif
- public class RadioButtonList : ListControl, IRepeatInfoUser,
- INamingContainer, IPostBackDataHandler {
-#if !NET_2_0
- bool need_raise;
-#endif
+ public class RadioButtonList : ListControl, IRepeatInfoUser, INamingContainer, IPostBackDataHandler
+ {
short tabIndex = 0;
public RadioButtonList ()
@@ -56,9 +51,6 @@ namespace System.Web.UI.WebControls {
}
-#if ONLY_1_1
- [Bindable (true)]
-#endif
[DefaultValue (-1)]
[WebSysDescription ("")]
[WebCategory ("Layout")]
@@ -151,9 +143,6 @@ namespace System.Web.UI.WebControls {
}
}
-#if ONLY_1_1
- [Bindable (true)]
-#endif
[DefaultValue (TextAlign.Right)]
[WebSysDescription ("")]
[WebCategory ("Appearance")]
@@ -172,31 +161,19 @@ namespace System.Web.UI.WebControls {
// Interface properties
-#if NET_2_0
- protected virtual
-#endif
- bool HasFooter {
+ protected virtual bool HasFooter {
get { return false; }
}
-#if NET_2_0
- protected virtual
-#endif
- bool HasHeader {
+ protected virtual bool HasHeader {
get { return false; }
}
-#if NET_2_0
- protected virtual
-#endif
- bool HasSeparators {
+ protected virtual bool HasSeparators {
get { return false; }
}
-#if NET_2_0
- protected virtual
-#endif
- int RepeatedItemCount {
+ protected virtual int RepeatedItemCount {
get { return Items.Count; }
}
@@ -221,7 +198,6 @@ namespace System.Web.UI.WebControls {
return new TableStyle (ViewState);
}
-#if NET_2_0
// MSDN: Searches the current naming container for a server control
// with the specified ID and path offset. The FindControl method
// always returns the RadioButtonList object.
@@ -229,20 +205,13 @@ namespace System.Web.UI.WebControls {
{
return this;
}
-#endif
-#if NET_2_0
- protected virtual
-#endif
- Style GetItemStyle (ListItemType itemType, int repeatIndex)
+ protected virtual Style GetItemStyle (ListItemType itemType, int repeatIndex)
{
return null;
}
-#if NET_2_0
- protected virtual
-#endif
- void RenderItem (ListItemType itemType, int repeatIndex, RepeatInfo repeatInfo, HtmlTextWriter writer)
+ protected virtual void RenderItem (ListItemType itemType, int repeatIndex, RepeatInfo repeatInfo, HtmlTextWriter writer)
{
ListItem item = Items [repeatIndex];
@@ -257,24 +226,19 @@ namespace System.Web.UI.WebControls {
radio.AutoPostBack = AutoPostBack;
radio.Enabled = IsEnabled;
radio.TabIndex = tabIndex;
-#if NET_2_0
radio.ValidationGroup = ValidationGroup;
radio.CausesValidation = CausesValidation;
if (radio.HasAttributes)
radio.Attributes.Clear ();
if (item.HasAttributes)
radio.Attributes.CopyFrom (item.Attributes);
-#endif
+
radio.RenderControl (writer);
}
-#if NET_2_0
- protected virtual
-#endif
- bool LoadPostData (string postDataKey, NameValueCollection postCollection)
+
+ protected virtual bool LoadPostData (string postDataKey, NameValueCollection postCollection)
{
-#if NET_2_0
EnsureDataBound ();
-#endif
string val = postCollection [postDataKey];
ListItemCollection items = Items;
int end = items.Count;
@@ -286,35 +250,21 @@ namespace System.Web.UI.WebControls {
if (i != selected) {
SelectedIndex = i;
-#if NET_2_0
return true;
-#else
- need_raise = true;
-#endif
}
-#if !NET_2_0
- return true;
-#endif
}
return false;
}
-#if NET_2_0
- protected virtual
-#endif
- void RaisePostDataChangedEvent ()
+ protected virtual void RaisePostDataChangedEvent ()
{
-#if NET_2_0
ValidateEvent (UniqueID, String.Empty);
- if (CausesValidation)
- Page.Validate (ValidationGroup);
-#endif
-
-#if !NET_2_0
- if (need_raise)
-#endif
- OnSelectedIndexChanged (EventArgs.Empty);
+ Page page = Page;
+ if (CausesValidation && page != null)
+ page.Validate (ValidationGroup);
+
+ OnSelectedIndexChanged (EventArgs.Empty);
}
bool IPostBackDataHandler.LoadPostData (string postDataKey, NameValueCollection postCollection)
@@ -337,20 +287,15 @@ namespace System.Web.UI.WebControls {
RenderItem (itemType, repeatIndex, repeatInfo, writer);
}
-#if NET_2_0
- protected internal
-#else
- protected
-#endif
- override void Render (HtmlTextWriter writer)
+ protected internal override void Render (HtmlTextWriter writer)
{
-#if NET_2_0
- if (Page != null)
- Page.ClientScript.RegisterForEventValidation (UniqueID);
+ Page page = Page;
+ if (page != null)
+ page.ClientScript.RegisterForEventValidation (UniqueID);
if (Items.Count == 0)
return;
-#endif
+
RepeatInfo repeat = new RepeatInfo ();
repeat.RepeatColumns = RepeatColumns;
repeat.RepeatDirection = RepeatDirection;
Modified: mcs/class/System.Web/System.Web.UI.WebControls/RepeatInfo.cs
===================================================================
--- a/mcs/class/System.Web/System.Web.UI.WebControls/RepeatInfo.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/RepeatInfo.cs
@@ -51,13 +51,7 @@ namespace System.Web.UI.WebControls {
void RenderBr (HtmlTextWriter w)
{
-#if NET_2_0
w.Write ("<br />");
-#else
- // grrr, not xhtml...
- w.Write ("<br>");
-#endif
-
}
void RenderVert (HtmlTextWriter w, IRepeatInfoUser user, Style controlStyle, WebControl baseControl)
@@ -70,16 +64,9 @@ namespace System.Web.UI.WebControls {
bool sep = user.HasSeparators;
bool oti = OuterTableImplied;
int hdr_span = cols * ((sep && cols != 1) ? 2 : 1);
-
bool table = RepeatLayout == RepeatLayout.Table && !oti;
-
-#if NET_2_0
bool show_empty_trailing_items = true;
bool show_empty_trailing_sep = true;
-#else
- bool show_empty_trailing_items = false;
- bool show_empty_trailing_sep = false;
-#endif
if (! oti)
RenderBeginTag (w, controlStyle, baseControl);
@@ -189,11 +176,6 @@ namespace System.Web.UI.WebControls {
s.AddAttributesToRender (w);
w.RenderBeginTag (HtmlTextWriterTag.Td);
- } else if (oti) {
-#if !NET_2_0
- /* 2.0 doesn't render this <br /> */
- RenderBr (w);
-#endif
}
user.RenderItem (ListItemType.Separator, r, this, w);
@@ -248,14 +230,8 @@ namespace System.Web.UI.WebControls {
int hdr_span = cols * (sep ? 2 : 1);
bool table = RepeatLayout == RepeatLayout.Table;
-
-#if NET_2_0
bool show_empty_trailing_items = true;
bool show_empty_trailing_sep = true;
-#else
- bool show_empty_trailing_items = false;
- bool show_empty_trailing_sep = false;
-#endif
RenderBeginTag (w, controlStyle, baseControl);