2002-06-29 Martin Baulig <martin@gnome.org>
[mono.git] / mcs / mcs / ecore.cs
index 991cf70dccf847c7589707cc825a5597e5f6ba5e..51c6dc77642fe5e5b2f15cdd710b8f5415770638 100755 (executable)
@@ -812,7 +812,8 @@ namespace Mono.CSharp {
                                                return true;
                                
                                // from the null type to any reference-type.
-                               if (expr is NullLiteral && !target_type.IsValueType)
+                               if (expr is NullLiteral && !target_type.IsValueType &&
+                                   !TypeManager.IsEnumType (target_type))
                                        return true;
                                
                        }