Reporter | Alexander Shvedov (shvedov) |
---|---|
Created | Jan 20, 2012 12:04:38 PM |
Updated | Jan 23, 2012 11:10:18 PM |
Resolved | Jan 23, 2012 6:59:02 PM |
Priority | Major |
Type | Usability Problem |
Fix versions | Next |
State | Fixed |
Assignee | Evgeny Pasynkov (pasynkov) |
Subsystem | Context actions |
Affected versions | 6.1, 6.1.1 |
Fixed in build | 6.5.1.3201 |
using System; class Program { static void Main() { var t = typeof(Console); Type baseType; do { baseType = t.BaseType; if (baseType == null) // <-- { if (t.IsValueType) { GC.KeepAlive(t); } else { throw new ArgumentException("aa"); // return; <-- fine } } } while (baseType == null); } }
after:
using System; class Program { static void Main() { var t = typeof(Console); Type baseType; do { baseType = t.BaseType; if (baseType != null) // <-- { } else { if (t.IsValueType) { GC.KeepAlive(t); } else { throw new ArgumentException("aa"); // return; <-- fine } } } while (baseType == null); } }