Created
March 2, 2020 13:25
-
-
Save arialdomartini/3cd13b5a43f4b9ed00762ca76a84040a to your computer and use it in GitHub Desktop.
Implicitly Captured Closure: a
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
internal static class Foobar | |
{ | |
private static Bar Foo(Func<Bar, Bar> f) => f(null); | |
internal class Bar | |
{ | |
public Bar Use(Bar bar) => throw new NotImplementedException(); | |
} | |
internal static void Warning() | |
{ | |
var a = new Bar(); | |
var b = new Bar(); | |
var foo = Foo(i => a.Use(b)); | |
var foo2 = Foo(i => b); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment