File tree Expand file tree Collapse file tree
ICSharpCode.CodeConverter/CSharp Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1474,7 +1474,7 @@ private bool NeedsVariableForArgument(VBSyntax.SimpleArgumentSyntax node)
14741474 bool isUsing = symbolInfo ? . DeclaringSyntaxReferences . FirstOrDefault ( ) ? . GetSyntax ( ) ? . Parent ? . Parent ? . IsKind ( VBasic . SyntaxKind . UsingStatement ) == true ;
14751475
14761476 var typeInfo = _semanticModel . GetTypeInfo ( node . Expression ) ;
1477- bool isTypeMismatch = ! typeInfo . Type . Equals ( typeInfo . ConvertedType ) ;
1477+ bool isTypeMismatch = typeInfo . Type == null || ! typeInfo . Type . Equals ( typeInfo . ConvertedType ) ;
14781478
14791479 return ( ! isIdentifier && ! isMemberAccess ) || isProperty || isTypeMismatch || isUsing ;
14801480 }
Original file line number Diff line number Diff line change @@ -230,6 +230,10 @@ ElseIf Bar(True = False) Then
230230 End If
231231 End Sub
232232
233+ Sub Foo5()
234+ Bar(Nothing)
235+ End Sub
236+
233237 Sub Bar(ByRef b As Boolean)
234238 End Sub
235239
@@ -290,6 +294,12 @@ public void Foo4()
290294 }
291295 }
292296
297+ public void Foo5()
298+ {
299+ var argb = default(bool);
300+ Bar(ref argb);
301+ }
302+
293303 public void Bar(ref bool b)
294304 {
295305 }
You can’t perform that action at this time.
0 commit comments