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

Go runtime panic #3929

Closed
parrt opened this issue Oct 16, 2022 · 1 comment
Closed

Go runtime panic #3929

parrt opened this issue Oct 16, 2022 · 1 comment
Assignees
Milestone

Comments

@parrt
Copy link
Member

parrt commented Oct 16, 2022

@chenquan reported bug here: #3834 (comment)

I found this problem in github.com/antlr/antlr4/runtime/Go/antlr v1.4.10. grammar:https://github.com/antlr/grammars-v4/tree/master/sql/mysql/Positive-Technologies

panic: interface conversion: antlr.PredictionContext is *antlr.EmptyPredictionContext, not *antlr.ArrayPredictionContext [recovered]
	panic: interface conversion: antlr.PredictionContext is *antlr.EmptyPredictionContext, not *antlr.ArrayPredictionContext [recovered]
	panic: interface conversion: antlr.PredictionContext is *antlr.EmptyPredictionContext, not *antlr.ArrayPredictionContext
@jimidle
Copy link
Collaborator

jimidle commented Mar 15, 2023

@parrt @chenquan I cannot reproduce this with the latest runtime code. I have some recollection of fixing this as part of some other code fix, but I cannot be sure. Code should refer to the PredictionContext interface rather than a specific instance. I believe that I fixed this as a byproduct of changing the code that calls mergeArrays, many months ago.

I ran the code above and with the generated visitor it all works as I would expect and there is no panic.

BTW - would you please report bugs with code, rather than a screenshot, so I can be sure I am running the same thing? Cheers :).

I think that this can be closed.

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

No branches or pull requests

2 participants