From 7e0ca72d78420e96ef26c81cb2f32c54c37722e7 Mon Sep 17 00:00:00 2001 From: Chris Sienkiewicz Date: Wed, 23 Jan 2019 13:58:30 -0800 Subject: [PATCH] Remove un-needed IsValueType check --- src/Compilers/CSharp/Portable/Binder/ForEachLoopBinder.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Compilers/CSharp/Portable/Binder/ForEachLoopBinder.cs b/src/Compilers/CSharp/Portable/Binder/ForEachLoopBinder.cs index b309751674b..065a66df89c 100644 --- a/src/Compilers/CSharp/Portable/Binder/ForEachLoopBinder.cs +++ b/src/Compilers/CSharp/Portable/Binder/ForEachLoopBinder.cs @@ -843,7 +843,7 @@ private void GetDisposalInfoForEnumerator(ref ForEachEnumeratorInfo.Builder buil { builder.NeedsDisposeMethod = true; } - else if (enumeratorType.IsValueType && enumeratorType.IsRefLikeType) + else if (enumeratorType.IsRefLikeType) { // if it wasn't directly convertable to IDisposable, see if it is pattern disposable // again, we throw away any binding diagnostics, and assume it's not disposable if we encounter errors -- GitLab