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

Parser or resolver errors should invalidate Code Inspection results (or disable quick fixes) #2023

Closed
comintern opened this issue Jul 12, 2016 · 2 comments · Fixed by #4695
Closed
Assignees
Labels
bug Identifies work items for known bugs feature-inspections
Milestone

Comments

@comintern
Copy link
Contributor

Still using https://github.com/peterennis/aegit/tree/master/aerc/src for testing. I ran the "Fix all occurrences in project" for FunctionReturnValueNotUsedInspection, which caused a parser error. However, it seems like the Code Inspections window was never invalidated, because I could select "Fix" for the ImplicitVariantReturnTypeInspection hint on this Function...

Public Function SpFolder(ByVal SpName As String)

    Dim objShell As Object
    Set objShell = CreateObject("Shell.Application")
    Dim objFolder As Object
    Set objFolder = objShell.Namespace(SpName)
    Dim objFolderItem As Object
    Set objFolderItem = objFolder.Self

    SpFolder = objFolderItem.Path

End Function 

...which resulted in this:

Public Function SpFolder(ByVal SpName As String)

    Dim objShell As Object
    Set objShell = CreateObject("Shell.Application")
    Dim objFolder As Object
    Set objFolder = objShell.Namespace(SpName) As Variant   '<-- This don't belong here.
    Dim objFolderItem As Object
    Set objFolderItem = objFolder.Self

    SpFolder = objFolderItem.Path

End Function

I'm not exactly sure that this is related to the parser error, but I can't replicate this without the parser failing.

@Hosch250
Copy link
Member

Yes, this is related to the parser error because the declaration selections aren't updated...

@Hosch250 Hosch250 added bug Identifies work items for known bugs feature-inspections labels Jul 16, 2016
@Hosch250 Hosch250 added this to the Version 2.0 milestone Jul 22, 2016
@Hosch250 Hosch250 self-assigned this Jul 22, 2016
@MDoerner
Copy link
Contributor

MDoerner commented Nov 12, 2018

This issue is not fixed. If running inspections after parsing is disabled, the inspection results in the code inspection window do not get invalidated.

This is a possible cause for issue #4503.

@MDoerner MDoerner reopened this Nov 12, 2018
@Vogel612 Vogel612 added this to ToDo in Semi-automatic bug tracker via automation Nov 24, 2018
Semi-automatic bug tracker automation moved this from ToDo to Done Jan 7, 2019
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 feature-inspections
Projects
Development

Successfully merging a pull request may close this issue.

3 participants