Skip to content

Commit 1c7ea1e

Browse files
committed
Replace dynamic in the remaining parts of the parsing process
1 parent f5b4a6c commit 1c7ea1e

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

Rubberduck.Parsing/Symbols/IdentifierReference.cs

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -97,19 +97,9 @@ public bool HasTypeHint(out string token)
9797
return false;
9898
}
9999

100-
VBAParser.TypeHintContext hint;
101-
switch (Context.Parent)
102-
{
103-
case VBAParser.TypedIdentifierContext typedIdentifierContext:
104-
hint = typedIdentifierContext.typeHint();
105-
break;
106-
case VBAParser.LiteralExpressionContext literalExpressionContext:
107-
hint = literalExpressionContext.typeHint();
108-
break;
109-
default:
110-
hint = null;
111-
break;
112-
}
100+
var hint = Context.Parent is VBAParser.TypedIdentifierContext typedIdentifierContext
101+
? typedIdentifierContext.typeHint()
102+
: null;
113103

114104
token = hint?.GetText();
115105
_hasTypeHint = hint != null;

0 commit comments

Comments
 (0)