-
Notifications
You must be signed in to change notification settings - Fork 200
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
Unable to find Enum in Instance when Imported #857
Unable to find Enum in Instance when Imported #857
Comments
Probably the problem lies in those lines, because I do not see any other differences between values instances and For values instances Trivial fix by just running this pass for value instances as well leads to another problem:
That exception means that
(
Obviously, those two passes depends on each other and it is not trivial to split them. It does not looks like that |
It seems that the real problem is here:
Somehow the enum name contains the full name together with type ( |
Of course... |
Because of new types type system enforses fixing kaitai-io/kaitai_struct#857
Because of new types type system enforses fixing kaitai-io/kaitai_struct#857 This test need to be updated: [info] - expr_compare_enum2 *** FAILED *** [info] [expr_compare_enum2.ksy: /seq/1/if: [info] error: can't compare EnumType(EnumRef(false,List(),animal),Int1Type(false)) and Int1Type(true) [info] ] [info] did not equal [info] [expr_compare_enum2.ksy: /seq/1/if: [info] error: can't compare EnumType(List(animal),Int1Type(false)) and Int1Type(true) [info] ] (SimpleMatchers.scala:34)
I'm not sure whether this is the right repository or not, feel free to move the issue.
Enums don't work when they are used under the condition, that they are
I run Kaitai Struct locally in its WebIDE with latest commit
3a8cbe0d50596546fc05946bb27c6a04ec404ce9
.See the following example which produces the error message for
bar
whilefoo
works fine.My current workaround is to define the enum inside
reproducer.ksy
then it works fine.reproducer.ksy
my_enum.ksy
This might be related to #651 but it seems like this bug has already been fixed, at least my type
foo
works without any problems.The text was updated successfully, but these errors were encountered: