Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -442,4 +442,31 @@ public void M8(object o)

static void Sink(object o) { }
}

// Test operator overloads
public class N
{
public void operator +=(N y) => throw null;

public void operator checked +=(N y) => throw null;

public void M1(N n)
{
var n0 = new N();
n += n0;
Sink(n);
}

public void M2(N n)
{
var n0 = new N();
checked
{
n += n0;
}
Sink(n);
}

static void Sink(object o) { }
}
}
Loading
Loading