From b5814de79b177c4b58337f396c5efd30b4235cf3 Mon Sep 17 00:00:00 2001 From: Marek Safar Date: Fri, 26 Nov 2010 10:27:27 +0000 Subject: [PATCH] New test --- mcs/tests/test-471.cs | 26 ++++++++++++++++++++++++++ mcs/tests/ver-il-gmcs.xml | 25 +++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 mcs/tests/test-471.cs diff --git a/mcs/tests/test-471.cs b/mcs/tests/test-471.cs new file mode 100644 index 00000000000..771a8e95be6 --- /dev/null +++ b/mcs/tests/test-471.cs @@ -0,0 +1,26 @@ +using System; + +class AAttribute : Attribute +{ + public string Value; + + public AAttribute (string s) + { + Value = s; + } +} + +[A (value)] +class MainClass +{ + const string value = null; + + public static int Main () + { + var attr = typeof (MainClass).GetCustomAttributes (false) [0] as AAttribute; + if (attr.Value != null) + return 1; + + return 0; + } +} diff --git a/mcs/tests/ver-il-gmcs.xml b/mcs/tests/ver-il-gmcs.xml index 0ef1e33307a..e97fe431bb3 100644 --- a/mcs/tests/ver-il-gmcs.xml +++ b/mcs/tests/ver-il-gmcs.xml @@ -4377,6 +4377,16 @@ + + + + 7 + + + 7 + + + @@ -35042,6 +35052,21 @@ + + + + 14 + + + + + 39 + + + 7 + + + -- 2.25.1