Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

26 lines
340 B
C#

using System.Collections;
class P {
public int x;
}
struct Q {
public P p;
public Q (P p) { this.p = p; }
}
class Test {
static IEnumerable foo () { return null; }
public static void Main ()
{
IEnumerable f = foo ();
if (f != null)
foreach (P p in f)
p.x = 0;
if (f != null)
foreach (Q q in f)
q.p.x = 0;
}
}