Alexander Shvedov
Alexander Shvedov
Unfortunately, byref-like types cannot be used as type arguments... ``` System.TypeLoadException: The generic type 'SizeComputer`1' was used with an invalid instantiation in assembly 'ObjectLayoutInspector, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. at System.RuntimeType.MakeGenericType(Type[] instantiation)...
```c# interface I1 { void M(int parameter) { // display class is optimized into struct void Local() => parameter++; Local(); } } interface I2 { void M(int parameter) { //...
```c# const string s = "aaa"; string b = $"aaa{s}"; // no alloc ```
Methods like `String.Substring` are often important to highlight. We can introduce external annotations or hardcoded annotation provider for such APIs
https://github.com/dotnet/roslyn/issues/5835
Static local functions are not introducing closures see for details: https://youtrack.jetbrains.com/issue/RSRP-487543
```c# void M(T t) where T : struct, I { t.Default(); // possible boxing allocation } interface I { void Default() { } } struct S : I { }...
Check params allocation when argument list is missing in object-creation-expression
```c# using System; public class C { public void M(Action a) { } public void M(out int x) { for (;; M(out /*display class*/ var y), M(() => y++)) {...