a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
26 lines
340 B
C#
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;
|
|
}
|
|
}
|