Skip to content

Commit fda1b06

Browse files
committed
Use bool instead of InterfaceBuilder
1 parent a9169dd commit fda1b06

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

AutomaticInterface/AutomaticInterface/Builder.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ private static void AddMethod(InterfaceBuilder codeGenerator, IMethodSymbol meth
156156

157157
var paramResult = new HashSet<string>();
158158
method
159-
.Parameters.Select(p => GetParameterDisplayString(p, codeGenerator))
159+
.Parameters.Select(p => GetParameterDisplayString(p, codeGenerator.HasNullable))
160160
.ToList()
161161
.ForEach(x => paramResult.Add(x));
162162

@@ -229,7 +229,7 @@ private static bool IsNullable(ITypeSymbol typeSymbol)
229229

230230
private static string GetParameterDisplayString(
231231
IParameterSymbol param,
232-
InterfaceBuilder codeGenerator
232+
bool nullableContextEnabled
233233
)
234234
{
235235
var paramParts = param.ToDisplayParts(FullyQualifiedDisplayFormat);
@@ -258,7 +258,7 @@ InterfaceBuilder codeGenerator
258258
&& param.ExplicitDefaultValue is null
259259
&& param.NullableAnnotation != NullableAnnotation.Annotated
260260
&& param.Type.IsReferenceType
261-
&& codeGenerator.HasNullable
261+
&& nullableContextEnabled
262262
)
263263
{
264264
typeSb.Append('?');

0 commit comments

Comments
 (0)