2003-05-14 Ravi Pratap <ravi@ximian.com>
authorRavi Pratap M <ravi@mono-cvs.ximian.com>
Wed, 21 May 2003 18:55:34 +0000 (18:55 -0000)
committerRavi Pratap M <ravi@mono-cvs.ximian.com>
Wed, 21 May 2003 18:55:34 +0000 (18:55 -0000)
commita58b293978267cee8cf64c892b5d59c292053f79
tree7a82ed322d66a04459fd9a36fa95ed155f1835ff
parent23643a122cd2609e584538d5eff5ab8d893beb95
2003-05-14  Ravi Pratap  <ravi@ximian.com>

* enum.cs (ImplicitConversionExists) : Rename to
ImplicitEnumConversionExists to remove ambiguity.

* ecore.cs (NullCast): New type of cast expression class which
basically is very similar to EmptyCast with the difference being
it still is a constant since it is used only to cast a null to
something else
(eg. (string) null)

* convert.cs (ImplicitReferenceConversion): When casting a null
literal, we return a NullCast.

* literal.cs (NullLiteralTyped): Remove - I don't see why this
should be around anymore.

The renaming (reported was slightly wrong). Corrections:

ConvertImplicitStandard -> ImplicitConversionStandard
ConvertExplicitStandard -> ExplicitConversionStandard

* expression.cs (StaticCallExpr.MakeSimpleCall): Resolve arguments
before passing them in !

* convert.cs (ImplicitConversionStandard): When comparing for
equal expr and target types, ensure that expr is not a
NullLiteral.

In general, we must not be checking (expr_type ==
target_type) in the top level conversion methods
(ImplicitConversion, ExplicitConversion etc). This checking is
done in the methods that they delegate to.

svn path=/trunk/mcs/; revision=14773
mcs/mcs/ChangeLog
mcs/mcs/convert.cs
mcs/mcs/ecore.cs
mcs/mcs/expression.cs
mcs/mcs/literal.cs