11d73045创建于 2023年8月21日历史提交
public class Test
{
	Test#? Parent; //FAIL: cl

	void SetParent!(Test# parent)
	{
		this.Parent = parent;
	}

	static Test# Identity(Test# p) => p;

	static bool Discard(Test# p)
	{
		return true;
	}

	static bool DiscardShort(Test# p) => true;

	static void Two(Test# p, int i)
	{
	}

	int[]#? Array;

	void SetArray!(int[]# a)
	{
		this.Array = a;
	}

	static int[]# ArrayIdentity(int[]# a) => a;

	static bool DiscardArray(int[]# p)
	{
		return true;
	}

	static bool DiscardArrayShort(int[]# p) => true;

	public static bool Run()
	{
		Test() o;
		o.SetParent(new Test());
		Test# p = new Test();
		o.SetParent(p);
		o.SetParent(Identity(p));
		Identity(p);
		Discard(p);
		DiscardShort(p);
		Two(p, 5);

		o.SetArray(new int[2]);
		int[]# a = new int[3];
		o.SetArray(a);
		o.Array[2] = 15;
		o.SetArray(ArrayIdentity(a));
		ArrayIdentity(a);
		DiscardArray(a);
		DiscardArrayShort(a);
		return o.Parent == p
			&& Discard(p) && DiscardShort(p)
			&& o.Array == a
			&& a[2] == 15
			&& DiscardArray(a) && DiscardArrayShort(a);
	}
}