File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -1111,6 +1111,30 @@ End Sub
1111
1111
&& item . ParentScoping . DeclarationType == DeclarationType . Procedure ) ) ;
1112
1112
}
1113
1113
1114
+ [ TestMethod ]
1115
+ public void FunctionWithSameNameAsEnumReturnAssignment_DoesntResolveToEnum ( )
1116
+ {
1117
+ var code = @"
1118
+
1119
+ Option Explicit
1120
+ Public Enum Foos
1121
+ Foo1
1122
+ End Enum
1123
+
1124
+ Public Function Foos() As Foos
1125
+ Foos = Foo1
1126
+ End Function
1127
+ " ;
1128
+
1129
+ var state = Resolve ( code ) ;
1130
+
1131
+ var declaration = state . AllUserDeclarations . Single ( item =>
1132
+ item . DeclarationType == DeclarationType . Enumeration
1133
+ && item . IdentifierName == "Foos" ) ;
1134
+
1135
+ Assert . IsTrue ( declaration . References . All ( item => item . Selection . StartLine != 9 ) ) ;
1136
+ }
1137
+
1114
1138
[ TestMethod ]
1115
1139
public void UserDefinedTypeParameterAsTypeName_ResolvesToUserDefinedTypeDeclaration ( )
1116
1140
{
You can’t perform that action at this time.
0 commit comments