if (rc.HasSet (ResolveContext.Options.CheckedScope))
flags |= ResolveContext.Options.CheckedScope;
+ if (!rc.ConstantCheckState)
+ flags &= ~Options.ConstantCheckState;
+
if (rc.IsInProbingMode)
flags |= ResolveContext.Options.ProbingMode;
--- /dev/null
+using System;
+
+class X
+{
+ const int Value = 1000;
+
+ static void Main ()
+ {
+ unchecked {
+ Func<byte> b = () => (byte)X.Value;
+ }
+ }
+}
\ No newline at end of file
</method>\r
</type>\r
</test>\r
+ <test name="gtest-lambda-32.cs">\r
+ <type name="X">\r
+ <method name="Void Main()" attrs="145">\r
+ <size>34</size>\r
+ </method>\r
+ <method name="Byte <Main>m__0()" attrs="145">\r
+ <size>13</size>\r
+ </method>\r
+ <method name="Void .ctor()" attrs="6278">\r
+ <size>7</size>\r
+ </method>\r
+ </type>\r
+ </test>\r
<test name="gtest-linq-01.cs">\r
<type name="from.C">\r
<method name="Void Main()" attrs="150">\r