Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2006-03-26 14:10:05 +0400
committerMarek Safar <marek.safar@gmail.com>2006-03-26 14:10:05 +0400
commit616566f8f4ea61012ad535d9a080b4175e3dafde (patch)
treedf9b9d1282b4781c65b80bb4c56c95f463d0ad5e /mcs/tests/test-39.cs
parentf73fdbcfdbc9c8b768d8c0e36247f2cc85d32402 (diff)
2006-03-26 Marek Safar <marek.safar@seznam.cz>
* attribute.cs (Attribute.ResolveConstructor): Conversion was moved to GetAttributableValue. * constant.cs (Constant.GetAttributableValue): Does implicit conversion when required. * convert.cs (ImplicitConversionRequired): Error message moved to DoubleLiteral. * ecore.cs (Expression.GetAttributableValue): Add type parameter for automatic implicit conversion of an output value. (EnumConstant.GetAttributableValue): Don't reduce the enum constants. * expression.cs (ArrayCreation.GetAttributableValue): Add element type conversion. (TypeOf.GetAttributableValue): Add extra handling for object type. * literal.cs (DoubleLiteral.Error_ValueCannotBeConverted): Doubles can have special error message. svn path=/trunk/mcs/; revision=58538
Diffstat (limited to 'mcs/tests/test-39.cs')
-rw-r--r--mcs/tests/test-39.cs24
1 files changed, 20 insertions, 4 deletions
diff --git a/mcs/tests/test-39.cs b/mcs/tests/test-39.cs
index 52f243c62f0..e1d6897c9eb 100644
--- a/mcs/tests/test-39.cs
+++ b/mcs/tests/test-39.cs
@@ -21,7 +21,22 @@ public class SimpleAttribute : Attribute {
secret = value;
}
}
-
+
+ public long LongValue {
+ get {
+ return 0;
+ }
+ set { }
+ }
+
+ public long[] ArrayValue {
+ get {
+ return new long[0];
+ }
+ set { }
+ }
+
+ public object D;
}
[Simple ("Interface test")]
@@ -31,7 +46,10 @@ public interface IFoo {
}
[Simple ("Dummy", MyNamedArg = "Dude!")]
-[Simple ("Vids", MyNamedArg = "Raj", AnotherArg = "Foo")]
+[Simple ("Vids", MyNamedArg = "Raj", AnotherArg = "Foo")]
+[Simple ("Trip", LongValue=0)]
+[Simple ("Fourth", ArrayValue=new long[] { 0 })]
+//[Simple ("Fifth", D=new double[] { -1 })] // runtime bug #77916
public class Blah {
public static int Main ()
@@ -40,5 +58,3 @@ public class Blah {
return 0;
}
}
-
-