Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set obj = nothing seems to raise incorrect inspection #3498

Closed
SystemsModelling opened this issue Oct 21, 2017 · 4 comments
Closed

Set obj = nothing seems to raise incorrect inspection #3498

SystemsModelling opened this issue Oct 21, 2017 · 4 comments
Labels
bug Identifies work items for known bugs difficulty-02-ducky Resolving these involves the internal API, but with relatively easy problems to solve. feature-inspections inspection-false-positive A bug where an inspection result appears, even though it is incorrect. up-for-grabs Use this label in conjunction with a difficulty level label, e.g. difficulty-02-ducky

Comments

@SystemsModelling
Copy link

SystemsModelling commented Oct 21, 2017

Suggestion: Object variable 'wb' is assigned without the 'Set' keyword - (XLTest163a.xlsm) XLTest.BatchProcs, line 925

Set wb = Nothing

Suggestion: Object variable 'wsDoc' is assigned without the 'Set' keyword - (XLTest163a.xlsm) XLTest.Colorizer, line 398

Set wsDoc = Nothing 

Suggestion: Object variable 'vLeft' is assigned without the 'Set' keyword - (XLTest163a.xlsm) XLTest.WBComparer, line 203

Function VarDifferent(ByRef vLeft As Variant, ByRef vRight As Variant) As Boolean
vLeft = "(" & TypeName(vLeft) & ")" & CStr(vLeft)
@retailcoder
Copy link
Member

Hmm, that's two bugs. One is the result of a recent tweak to that inspection that makes it ignore assignments to Nothing ...but then it shouldn't fire if the only assignment is to Nothing (assuming Set is present).
The ByRef/Variant assignment shouldn't trigger the inspection at all though.

@retailcoder retailcoder added bug Identifies work items for known bugs difficulty-02-ducky Resolving these involves the internal API, but with relatively easy problems to solve. inspection-false-positive A bug where an inspection result appears, even though it is incorrect. feature-inspections up-for-grabs Use this label in conjunction with a difficulty level label, e.g. difficulty-02-ducky labels Oct 21, 2017
@SystemsModelling
Copy link
Author

"The ByRef/Variant assignment shouldn't trigger the inspection at all though." Just to clarify: the inspection is not on that Function VarDifferent line, I just provided that to give the context. It's on the line vLeft = "...

Sorry, I'd better post issues one at a time and give the inspection with the line rather than as an introductory paragraph.

@MDoerner
Copy link
Contributor

Still, the inspection should not trigger since vLeft is a Variant.

@comintern
Copy link
Contributor

Both identified issues appear to have been fixed:

screenshot from 2018-07-16 20-04-59

Semi-automatic bug tracker automation moved this from ToDo to Done Jul 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Identifies work items for known bugs difficulty-02-ducky Resolving these involves the internal API, but with relatively easy problems to solve. feature-inspections inspection-false-positive A bug where an inspection result appears, even though it is incorrect. up-for-grabs Use this label in conjunction with a difficulty level label, e.g. difficulty-02-ducky
Projects
Development

No branches or pull requests

4 participants