conjure-java icon indicating copy to clipboard operation
conjure-java copied to clipboard

Introduce default visitUnknown for enum visitors

Open jonsyu1 opened this issue 6 years ago • 0 comments

What happened?

The Visitor generated for enums requires implementations to handle the visitUnknown case, but we literally never do anything other than throw a generic exception in the unknown case.

What did you want to happen?

Either provide a default implementation for visitUnknown or generate a StrictVisitor where accept(StrictVisitor) handles the unknown case instead of passing the responsibility on to the implementation.

jonsyu1 avatar May 07 '19 22:05 jonsyu1