Skip to content

Instantly share code, notes, and snippets.

@mstrobel
Last active August 29, 2015 14:25
Show Gist options
  • Save mstrobel/b21d0aeb451610b04873 to your computer and use it in GitHub Desktop.
Save mstrobel/b21d0aeb451610b04873 to your computer and use it in GitHub Desktop.
using System;
public class C {
public void M() {
dynamic n;
dynamic c = "";
//
// Roslyn marks use of 'n' in 'n > 0' as possibly unassigned;
// compiles fine with csc.exe in VS2013.
//
bool b = c != null &&
F(c, out n) &&
n > 0;
}
private static bool F(object x, out object value) {
value = 42;
return true;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment