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

Invalid cast in TableDefinitionExtensions.GetTableSortingKeys #2635

Open
efr15 opened this issue Jul 22, 2024 · 1 comment
Open

Invalid cast in TableDefinitionExtensions.GetTableSortingKeys #2635

efr15 opened this issue Jul 22, 2024 · 1 comment
Labels
Bug Cobol From logging User Visible Visible by the end user. Useful to priorize issue

Comments

@efr15
Copy link
Contributor

efr15 commented Jul 22, 2024

Describe the bug
An InvalidCastException has been thrown by TableDefinitionExtensions.GetTableSortingKeys, code was attempting to cast an instance of DataConditionEntry into CommonDataDescriptionAndDataRedefines.

To Reproduce
(Type)Cobol code that cause the bug : (if any)

       No code to reproduce yet

Expected behavior
No exception !

Technical
Check cast instructions and protect where needed.

How to test automatically
Standard tests if code to reproduce can be found.

@efr15 efr15 added Bug Cobol User Visible Visible by the end user. Useful to priorize issue From logging labels Jul 22, 2024
@efr15
Copy link
Contributor Author

efr15 commented Jul 23, 2024

Stack trace:
at TypeCobol.Compiler.Nodes.TableDefinitionExtensions.GetTableSortingKeys(DataDefinition tableDefinition) at TypeCobol.Compiler.Diagnostics.CrossCompleteChecker.g__CheckTableSort|16_1(<>c__DisplayClass16_0&) at TypeCobol.Compiler.Diagnostics.CrossCompleteChecker.Visit(Sort sort) at TypeCobol.Compiler.Nodes.Sort.VisitNode(IASTVisitor astVisitor) at TypeCobol.Compiler.Nodes.Node.VisitChildrens(IASTVisitor astVisitor, Boolean continueVisit, IEnumerable1 childrenNodes) at TypeCobol.Compiler.Nodes.Node.VisitChildrens(IASTVisitor astVisitor, Boolean continueVisit, IEnumerable1 childrenNodes) at TypeCobol.Compiler.Nodes.Node.VisitChildrens(IASTVisitor astVisitor, Boolean continueVisit, IEnumerable1 childrenNodes) at TypeCobol.Compiler.Nodes.Node.VisitChildrens(IASTVisitor astVisitor, Boolean continueVisit, IEnumerable1 childrenNodes) at TypeCobol.Compiler.Nodes.Node.VisitChildrens(IASTVisitor astVisitor, Boolean continueVisit, IEnumerable1 childrenNodes) at TypeCobol.Compiler.Nodes.Node.VisitChildrens(IASTVisitor astVisitor, Boolean continueVisit, IEnumerable1 childrenNodes) at TypeCobol.Compiler.Nodes.Node.VisitChildrens(IASTVisitor astVisitor, Boolean continueVisit, IEnumerable`1 childrenNodes) at TypeCobol.Compiler.CompilationUnit.RefreshProgramClassDocumentSnapshot() at TypeCobol.LanguageServer.Workspace.RefreshSyntaxTree(FileCompiler fileCompiler, SyntaxTreeRefreshLevel refreshLevel) at TypeCobol.LanguageServer.Workspace.<>c__DisplayClass102_0.g__Refresh|0() at TypeCobol.LanguageServer.TypeCobolServerHost.MessageHandler(IMessageHandler messageHandler, TypeCobolServer typeCobolServer)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Cobol From logging User Visible Visible by the end user. Useful to priorize issue
Projects
None yet
Development

No branches or pull requests

1 participant