From ac6b1bd5d3685d3af401c3c05ad267ecaff1768e Mon Sep 17 00:00:00 2001 From: Marek Safar Date: Mon, 5 Mar 2012 13:28:30 +0000 Subject: [PATCH] Fix symbol file entry for using dispose call --- mcs/mcs/statement.cs | 2 +- mcs/tests/test-debug-11-ref.xml | 304 +++++++++++++++++++++------------------- mcs/tests/test-debug-11.cs | 8 ++ mcs/tests/ver-il-net_4_5.xml | 3 + 4 files changed, 172 insertions(+), 145 deletions(-) diff --git a/mcs/mcs/statement.cs b/mcs/mcs/statement.cs index c0639b9631b..ff12a7d9dae 100644 --- a/mcs/mcs/statement.cs +++ b/mcs/mcs/statement.cs @@ -5473,7 +5473,7 @@ namespace Mono.CSharp { // Add conditional call when disposing possible null variable if (!type.IsStruct || type.IsNullableType) - dispose = new If (new Binary (Binary.Operator.Inequality, lvr, new NullLiteral (loc), loc), dispose, loc); + dispose = new If (new Binary (Binary.Operator.Inequality, lvr, new NullLiteral (loc), loc), dispose, dispose.loc); return dispose; } diff --git a/mcs/tests/test-debug-11-ref.xml b/mcs/tests/test-debug-11-ref.xml index 5e6ff502185..82b81dcb812 100644 --- a/mcs/tests/test-debug-11-ref.xml +++ b/mcs/tests/test-debug-11-ref.xml @@ -1,7 +1,7 @@  - + @@ -69,7 +69,6 @@ - - + - - + - - + - - + - + - + + + + + + + + @@ -193,17 +209,17 @@ - + - @@ -211,13 +227,13 @@ - + - @@ -226,28 +242,28 @@ - + - - + - @@ -255,18 +271,18 @@ - + - @@ -275,15 +291,15 @@ - + - @@ -291,17 +307,17 @@ - + - @@ -313,12 +329,12 @@ - + - @@ -328,14 +344,14 @@ - + - @@ -345,15 +361,15 @@ - + - @@ -363,15 +379,15 @@ - + - @@ -381,7 +397,7 @@ - + diff --git a/mcs/tests/test-debug-11.cs b/mcs/tests/test-debug-11.cs index aade9d59d3b..187bc044d79 100644 --- a/mcs/tests/test-debug-11.cs +++ b/mcs/tests/test-debug-11.cs @@ -40,6 +40,14 @@ class C { } } + + void Using_4 () + { + using (var ms = new System.IO.MemoryStream ()) + { + Console.WriteLine ("a"); + } + } void Lock () { diff --git a/mcs/tests/ver-il-net_4_5.xml b/mcs/tests/ver-il-net_4_5.xml index 4d154adb29b..09c60883b84 100644 --- a/mcs/tests/ver-il-net_4_5.xml +++ b/mcs/tests/ver-il-net_4_5.xml @@ -55969,6 +55969,9 @@ 60 + + 38 + -- 2.11.4.GIT