Skip to content

Commit

Permalink
Add explanation todo comments in the missing call target test file
Browse files Browse the repository at this point in the history
  • Loading branch information
tamasvajk committed Dec 2, 2024
1 parent b0d3c11 commit b8fd20e
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ public Test()
Event1.Invoke(this, 5);

var str = "abcd";
var sub = str[..3];
var sub = str[..3]; // TODO: this is not an indexer call, but rather a `str.Substring(0, 3)` call.

Span<int> sp = null;
var slice = sp[..3];
var slice = sp[..3]; // TODO: this is not an indexer call, but rather a `sp.Slice(0, 3)` call.

Span<byte> guidBytes = stackalloc byte[16];
guidBytes[08] = 1;
guidBytes[08] = 1; // TODO: this indexer call has no target, because the target is a `ref` returning getter.

new MyList([new(), new Test()]);
new MyList([new(), new Test()]); // TODO: the `new()` call has no target, which is unexpected, as we know at compile time, that this is a `new Test()` call.
}

public int MyProperty1 { get; }
Expand Down

0 comments on commit b8fd20e

Please sign in to comment.