Surrounding error markers are not resolved once fixing the underlying error #142

Closed
rhdunn opened this Issue Nov 17, 2015 · 3 comments

Comments

Projects
None yet
2 participants
@rhdunn

rhdunn commented Nov 17, 2015

Using IntelliJ 15.0.1 and intellij-xquery a5350b8 (latest master as of 17/11/2015), given:

declare function createMessage($message, $value) {
    if ($message) then
        <message value="{$value}">{$message}</message>
    else
        <message test="foo">Test</message>
};

Changing the if to:

    return if ($message) then

Causes two errors to be generated:

  1. An error after the { of the function declaration -- <expr single> expected, got 'return'.
  2. An error on the return statement -- ';', <expr single>, declare or '}' expected, got 'return'.

Deleting the return keyword removes error 2, but error 1 persists (even when closing and re-opening the file).

I have also seen this when copying an existing function in the file and renaming the copy.

NOTE: I don't see this behaviour with IntelliJ 14.1.5 and intellij-xquery 2.2.1.

@ligasgr

This comment has been minimized.

Show comment
Hide comment
@ligasgr

ligasgr Nov 17, 2015

Owner

I'm not able to reproduce the issue on the same commit and version 143.747.6 (the issue being that both errors are not removed). Can you please let me know the exact version number you are using?

Owner

ligasgr commented Nov 17, 2015

I'm not able to reproduce the issue on the same commit and version 143.747.6 (the issue being that both errors are not removed). Can you please let me know the exact version number you are using?

@rhdunn

This comment has been minimized.

Show comment
Hide comment
@rhdunn

rhdunn Nov 18, 2015

This is with build IC-143.382 built on November 10, 2015 (15.0.1).

rhdunn commented Nov 18, 2015

This is with build IC-143.382 built on November 10, 2015 (15.0.1).

@ligasgr

This comment has been minimized.

Show comment
Hide comment
@ligasgr

ligasgr Nov 18, 2015

Owner

Thanks for checking that. I was able to reproduce the issue after installing plugin from a zip distribution instead of running it in development mode from IDEA.
Issue was not really version related. And there was another thing that didn't work (XQuery Settings form in Settings -> Other settings). The page would never show it's contents.

Owner

ligasgr commented Nov 18, 2015

Thanks for checking that. I was able to reproduce the issue after installing plugin from a zip distribution instead of running it in development mode from IDEA.
Issue was not really version related. And there was another thing that didn't work (XQuery Settings form in Settings -> Other settings). The page would never show it's contents.

@ligasgr ligasgr closed this in 5163f76 Nov 18, 2015

@ligasgr ligasgr added the bug label Nov 18, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment