• K
    Add a reference in CompilationTestData to hold on to the Compilation that was... · d8a4bfb8
    Kevin_H 提交于
    Add a reference in CompilationTestData to hold on to the Compilation that was used to initialize it.  The IL visualizer requires Symbols of the Compilation to still be alive when visualizing tokens.
    
    Most of the time, we hold a reference to the compilation in the test method, so the lifetime of the Symbols would be long enough for all test verification to occur.  However, in some tests, the Compilation is created in a helper and then thrown away as soon as the PE image is emitted.  Verification steps later in the test method could result in AVs if a GC occurs at the wrong time. (changeset 1347747)
    d8a4bfb8
CSharpCompilation.cs 118.4 KB