Emit\CompilationEmitTests.cs (12)
971[InlineData("private void M() { }", "", Match.RefOut)]
972[InlineData("internal void M() { }", "", Match.RefOut)]
973[InlineData("private protected void M() { }", "", Match.RefOut)]
974[InlineData("private void M() { dynamic x = 1; }", "", Match.RefOut)] // no reference added from method bodies
975[InlineData(@"private void M() { var x = new { id = 1 }; }", "", Match.RefOut)]
976[InlineData("private int P { get { Error(); } set { Error(); } }", "", Match.RefOut)] // errors in methods bodies don't matter
979[InlineData("private int P { get; set; }", "", Match.RefOut)] // private auto-property and underlying field are removed
980[InlineData("internal int P { get; set; }", "", Match.RefOut)]
981[InlineData("private event Action E { add { Error(); } remove { Error(); } }", "", Match.RefOut)]
982[InlineData("internal event Action E { add { Error(); } remove { Error(); } }", "", Match.RefOut)]
986[InlineData("private int i;", "", Match.RefOut)]
1201(expectedMatch == Match.BothMetadataAndRefOut || expectedMatch == Match.RefOut);