consulo / consulo-csharp

Languages: C#
Apache License 2.0
50 stars 6 forks source link

CS0136 #493

Open VISTALL opened 6 years ago

VISTALL commented 6 years ago
#pragma warning disable 219

using System;

namespace test {
    public class DefaultTest {
        public static void aA(string d = default(string)) {
            string[] a = null;

            foreach (string s in a)
            {
                if (true)
                {
                    //int pos = 1;  // error here

                    Action action = () => {

                        int pos = 2; // error here
                    };
                }
            }

            int pos = 2;
        }
    }
}
VISTALL commented 6 years ago

foreach variable not global for each statements

bug