diff options
author | Marek Safar <marek.safar@gmail.com> | 2013-10-27 11:39:51 +0400 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2013-10-27 11:40:51 +0400 |
commit | ee09ac3bcf7f0763b30ac6684079aea38f371306 (patch) | |
tree | 92a1f3249c29e41a06122690d86d0d68827809ab /mcs/tests/test-869.cs | |
parent | 0a17e9070dab94893db0a76381a5cb1bb4caa61c (diff) |
Enum subtraction quirk needs to work with numeric constants only. Fixes #15520
Diffstat (limited to 'mcs/tests/test-869.cs')
-rw-r--r-- | mcs/tests/test-869.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mcs/tests/test-869.cs b/mcs/tests/test-869.cs index e0f01677b25..a0b22419ddc 100644 --- a/mcs/tests/test-869.cs +++ b/mcs/tests/test-869.cs @@ -20,6 +20,13 @@ public enum E Item = 2 } +enum E2 +{ + A = 0, + B, + C +} + class FooClass { public static int Main () @@ -34,6 +41,9 @@ class FooClass if (res != C.Token) return 2; + E2 e2 = E2.C; + + int day1 = e2 - E2.A; return 0; } }
\ No newline at end of file |