We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f5b4a6c commit 1c7ea1eCopy full SHA for 1c7ea1e
Rubberduck.Parsing/Symbols/IdentifierReference.cs
@@ -97,19 +97,9 @@ public bool HasTypeHint(out string token)
97
return false;
98
}
99
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
109
- default:
110
- hint = null;
111
112
- }
+ var hint = Context.Parent is VBAParser.TypedIdentifierContext typedIdentifierContext
+ ? typedIdentifierContext.typeHint()
+ : null;
113
114
token = hint?.GetText();
115
_hasTypeHint = hint != null;
0 commit comments