Skip to content

Commit 80bfc78

Browse files
authored
Fix crash on auto return types (#1898)
Not sure if this is resolved properly
1 parent 99e5e19 commit 80bfc78

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/AST/ASTVisitor.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,10 @@ public virtual bool VisitProperty(Property property)
432432
return false;
433433

434434
if (VisitOptions.VisitFunctionReturnType)
435-
property.Type.Visit(this);
435+
{
436+
if(property.Type != null) // Auto types return null types currently
437+
property.Type.Visit(this);
438+
}
436439

437440
if (VisitOptions.VisitPropertyAccessors)
438441
{

0 commit comments

Comments
 (0)