X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fmcs%2Fconstant.cs;h=397d72c9a4ae7653be65733999a337aaf1567695;hb=3f9310e59b924a8ef63dfef6c7f3c72935ac8f21;hp=acfb6a751f8e2937b7d6296c8e7cea30b848cd80;hpb=6b4c3f0d7247795b4e52e158df688895ff64884e;p=mono.git diff --git a/mcs/mcs/constant.cs b/mcs/mcs/constant.cs index acfb6a751f8..397d72c9a4a 100644 --- a/mcs/mcs/constant.cs +++ b/mcs/mcs/constant.cs @@ -3,11 +3,11 @@ // // Author: // Miguel de Icaza (miguel@ximian.com) -// Marek Safar (marek.safar@seznam.cz) +// Marek Safar (marek.safar@gmail.com) // // Copyright 2001-2003 Ximian, Inc. // Copyright 2003-2008 Novell, Inc. -// Copyright 2011 Xamarin Inc +// Copyright 2011-2013 Xamarin Inc // using System; @@ -64,7 +64,7 @@ namespace Mono.CSharp { BuiltinTypeSpec.IsPrimitiveTypeOrDecimal (target) && BuiltinTypeSpec.IsPrimitiveTypeOrDecimal (type)) { ec.Report.Error (31, loc, "Constant value `{0}' cannot be converted to a `{1}'", - GetValueAsLiteral (), TypeManager.CSharpName (target)); + GetValueAsLiteral (), target.GetSignatureForError ()); } else { base.Error_ValueCannotBeConverted (ec, target, expl); } @@ -89,7 +89,7 @@ namespace Mono.CSharp { if (this.type == type) return this; - if (Convert.ImplicitNumericConversion (this, type) == null) + if (!Convert.ImplicitNumericConversionExists (this.type, type)) return null; bool fail; @@ -100,7 +100,7 @@ namespace Mono.CSharp { // reached, by calling Convert.ImplicitStandardConversionExists // throw new InternalErrorException ("Missing constant conversion between `{0}' and `{1}'", - TypeManager.CSharpName (Type), TypeManager.CSharpName (type)); + Type.GetSignatureForError (), type.GetSignatureForError ()); } return CreateConstantFromValue (type, constant_value, loc); @@ -396,7 +396,7 @@ namespace Mono.CSharp { catch { ec.Report.Error (31, loc, "Constant value `{0}' cannot be converted to a `{1}'", - GetValue ().ToString (), TypeManager.CSharpName (target)); + GetValue ().ToString (), target.GetSignatureForError ()); } }