|
|
@ -321,7 +321,10 @@ public class ModuleGenerator |
|
|
|
.Append(param.IsNullable ? "iter.FieldOrEmpty" : "iter.Field") |
|
|
|
.Append(param.IsNullable ? "iter.FieldOrEmpty" : "iter.Field") |
|
|
|
.AppendLine($"<{param.FieldType!.GetFullName()}>({param.TermIndex});"); |
|
|
|
.AppendLine($"<{param.FieldType!.GetFullName()}>({param.TermIndex});"); |
|
|
|
|
|
|
|
|
|
|
|
sb.AppendLine("\t\t\tfor (var i = 0; i < iter.Count; i++) {"); |
|
|
|
// When the shim method is called, there's guaranteed to be at least one match. |
|
|
|
|
|
|
|
// iter.Count may be 0 when there's no variable entities that can be matched. |
|
|
|
|
|
|
|
// For example for a query that only matches singleton entities. |
|
|
|
|
|
|
|
sb.AppendLine("\t\t\tfor (var i = 0; i == 0 || i < iter.Count; i++) {"); |
|
|
|
|
|
|
|
|
|
|
|
sb.Append($"\t\t\t\t{method.Name}"); |
|
|
|
sb.Append($"\t\t\t\t{method.Name}"); |
|
|
|
if (method.IsGeneric) sb.Append("<T>"); |
|
|
|
if (method.IsGeneric) sb.Append("<T>"); |
|
|
|