Skip to content

Commit 7637fd8

Browse files
committed
Obsolete Type Hint tests
1 parent 98c1580 commit 7637fd8

File tree

6 files changed

+718
-0
lines changed

6 files changed

+718
-0
lines changed

RetailCoder.VBE/Inspections/FunctionReturnValueNotUsedInspectionResult.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public override string Description
4242
{
4343
get
4444
{
45+
// bug NullReferenceException thrown here - null Target
4546
return string.Format(InspectionsUI.FunctionReturnValueNotUsedInspectionResultFormat, Target.IdentifierName);
4647
}
4748
}

RetailCoder.VBE/Inspections/NonReturningFunctionInspectionResult.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public override string Description
2727
{
2828
get
2929
{
30+
// bug NullReferenceException thrown here - null Target
3031
return string.Format(InspectionsUI.NonReturningFunctionInspectionResultFormat, Target.IdentifierName);
3132
}
3233
}

RetailCoder.VBE/Inspections/ParameterNotUsedInspectionResult.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ public ParameterNotUsedInspectionResult(IInspection inspection, string result,
2626

2727
public override string Description
2828
{
29+
// bug NullReferenceException thrown here - null Target
2930
get { return string.Format(InspectionsUI.ParameterNotUsedInspectionResultFormat, Target.IdentifierName); }
3031
}
3132
}

Rubberduck.Parsing/Grammar/VBA.g4

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,8 @@ dictionaryCallStmt : '!' ambiguousIdentifier typeHint?;
637637

638638
argList : LPAREN (WS? arg (WS? ',' WS? arg)*)? WS? RPAREN;
639639

640+
// bug parameters should allow type hints - does this fix work?
641+
// arg : (OPTIONAL WS)? ((BYVAL | BYREF) WS)? (PARAMARRAY WS)? ambiguousIdentifier (typeHint)? (WS? LPAREN WS? RPAREN)? (WS? asTypeClause)? (WS? argDefaultValue)?;
640642
arg : (OPTIONAL WS)? ((BYVAL | BYREF) WS)? (PARAMARRAY WS)? ambiguousIdentifier (WS? LPAREN WS? RPAREN)? (WS? asTypeClause)? (WS? argDefaultValue)?;
641643

642644
argDefaultValue : EQ WS? valueStmt;

0 commit comments

Comments
 (0)