projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bump NuGet.BuildTasks to get new updates and switch to `dev` branch (#5566)
[mono.git]
/
mcs
/
tests
/
test-36.cs
diff --git
a/mcs/tests/test-36.cs
b/mcs/tests/test-36.cs
old mode 100755
(executable)
new mode 100644
(file)
index
11f5273
..
dc6fafe
--- a/
mcs/tests/test-36.cs
+++ b/
mcs/tests/test-36.cs
@@
-7,18
+7,18
@@
using System;
using System.Collections;
struct X {
int [] a;
using System.Collections;
struct X {
int [] a;
-
-
public IEnumerator GetEnumerator ()
-
{
+
+ public IEnumerator GetEnumerator ()
+ {
a = new int [3] { 1, 2, 3};
return a.GetEnumerator ();
a = new int [3] { 1, 2, 3};
return a.GetEnumerator ();
- }
}
}
+}
class Y {
static X x;
class Y {
static X x;
- static int Main ()
+
public
static int Main ()
{
int total = 0;
x = new X ();
{
int total = 0;
x = new X ();
@@
-29,6
+29,25
@@
class Y {
if (total != 6)
return 1;
if (total != 6)
return 1;
+
+ total = 0;
+
+ foreach (object a in new X ()){
+ total += (int) a;
+ }
+ if (total != 6)
+ return 3;
+
+ total = 0;
+
+ //
+ // implicit block
+ //
+ foreach (object a in x)
+ total += (int) a;
+ if (total != 6)
+ return 2;
+
return 0;
}
}
return 0;
}
}