Problem with Search Pattern in VB

As i have a weird problem with converting strings to booleans i wanted to replace all CBool() calls in my solution with an own implementation. I usedefined the pattern

   CBool($value$)

where $value$ is defined as identifier.

If i search this, R# also returns occurences of the other VB conversion functions like CStr(), CInt() and so on.

The application is an old VB6 application which was migrated to .NET. The old VB6 application made heavy use of the Varianrt type, so most of the variable are declared of type Object now. I tried to change the pattern like this:

   $result$ = CBool($value$)

and defined $result$ as expression of type Boolean. With ths pattern only calls of CBool() are found, but as most of the calls have a variable of type Object on the left the result is'nt satisfying.

I expect that R# takes the fix parts in the pattern as it is, but this don't seems so. Is this behavior by design? And if yes, how can i restrict the pattern that i only get calls of CBool()?

Regards
Klaus

3 comments
Comment actions Permalink

After two weeks with no answer i like to ask my question again. Is this behavior a bug or a feature?

Regards
Klaus

0
Comment actions Permalink

Hi Klaus,

sorry for not answering your question for so long. This is a bug, it has been identified and fixed in upcoming 7.* bugfix update.

0
Comment actions Permalink

can you tell me the issue number so that i can see the status in YouTrack?. Do you have a timelline for 7.1?

Regards
Klaus

0

Please sign in to leave a comment.