-
Not sure if this is an issue or not, but the behavior doesn't quite seem right. If needed, I can try to come up with a minimal test case. Validator Test Case:...
it('Should detect method invocation on a field', () => {
const mark = validationResult.document.textDocument.getText().lastIndexOf('(');
expectError(validationResult, "Method invocation on a field",
{
offset: mark,
length: 2,
});
});
... Note: Test passes with length of 2, but fails with length of 1 (off by one in range) Code langium-tests.ts...
if ('offset' in options) {
const outer = {
start: validationResult.document.textDocument.positionAt(options.offset),
end: validationResult.document.textDocument.positionAt(options.offset + options.length - 1)
};
filters.push(d => isRangeEqual(outer, d.range));
}
... Note: wondering if the Validator in action:I don't believe that this would have been caught in the tests since it's uncovered in the test report: |
Beta Was this translation helpful? Give feedback.
Answered by
msujew
Aug 28, 2022
Replies: 1 comment 1 reply
-
I created an issue from this, since this is definitely not intended to work that way #655. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
snarkipus
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I created an issue from this, since this is definitely not intended to work that way #655.