Browse Source

Fixed unassigned-out errors

Brian Fiete 3 years ago
parent
commit
a4b1ff8a72
1 changed files with 5 additions and 0 deletions
  1. 5 0
      IDEHelper/Tests/BeefLinq/src/src/Enumerable.bf

+ 5 - 0
IDEHelper/Tests/BeefLinq/src/src/Enumerable.bf

@@ -551,6 +551,7 @@ namespace System.Linq
 					return true;
 					return true;
 			}
 			}
 
 
+			val = default;
 			return false;
 			return false;
 		}
 		}
 
 
@@ -591,6 +592,7 @@ namespace System.Linq
 		internal static bool InternalLast<TEnum, TSource>(TEnum items, out TSource val)
 		internal static bool InternalLast<TEnum, TSource>(TEnum items, out TSource val)
 			where TEnum : concrete, IEnumerator<TSource>
 			where TEnum : concrete, IEnumerator<TSource>
 		{
 		{
+			val = ?;
 			var found = false;
 			var found = false;
 			using (var iterator = Iterator.Wrap(items))
 			using (var iterator = Iterator.Wrap(items))
 			{
 			{
@@ -602,6 +604,8 @@ namespace System.Linq
 					val = temp;
 					val = temp;
 			}
 			}
 
 
+			if (!found)
+				val = default;
 			return found;
 			return found;
 		}
 		}
 
 
@@ -657,6 +661,7 @@ namespace System.Linq
 				}
 				}
 			}
 			}
 
 
+			val = default;
 			return false;
 			return false;
 		}
 		}