Merge pull request #3528 from BrzVlad/fix-sgen-check-before-collections
[mono.git] / mcs / class / corlib / Test / System.Runtime.CompilerServices / AsyncVoidMethodBuilderTest.cs
index b5fc9983cc659c48c1e780525726081de4cd8c9a..c442b3c7b890ee3eb27420618a8462692df7627a 100644 (file)
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_4_5
 
 using System;
 using System.Threading;
 using System.Threading.Tasks;
 using NUnit.Framework;
 using System.Runtime.CompilerServices;
+using System.Runtime.ExceptionServices;
 
 namespace MonoTests.System.Runtime.CompilerServices
 {
@@ -60,7 +60,7 @@ namespace MonoTests.System.Runtime.CompilerServices
 
                        public override void Post (SendOrPostCallback d, object state)
                        {
-                               if (state is Exception) {
+                               if (state is ExceptionDispatchInfo) {
                                        ++PostCounter;
                                }
                        }
@@ -116,4 +116,3 @@ namespace MonoTests.System.Runtime.CompilerServices
        }
 }
 
-#endif
\ No newline at end of file