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 9bbafdd commit f5b4a6cCopy full SHA for f5b4a6c
Rubberduck.Parsing/Symbols/IdentifierReference.cs
@@ -97,7 +97,20 @@ public bool HasTypeHint(out string token)
97
return false;
98
}
99
100
- var hint = ((dynamic)Context.Parent).typeHint() as VBAParser.TypeHintContext;
+ 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
+ }
113
+
114
token = hint?.GetText();
115
_hasTypeHint = hint != null;
116
return _hasTypeHint.Value;
0 commit comments