diff --git a/formats_err/imports/enum_one.ksy b/formats_err/imports/enum_one.ksy new file mode 100644 index 000000000..4038d6f9a --- /dev/null +++ b/formats_err/imports/enum_one.ksy @@ -0,0 +1,10 @@ +# This is a file that is imported in imports_enum_leaking.ksy +meta: + id: enum_one +seq: + - id: something + type: u1 + enum: one +enums: + one: + 0: zero \ No newline at end of file diff --git a/formats_err/imports/enum_two.ksy b/formats_err/imports/enum_two.ksy new file mode 100644 index 000000000..db16055e2 --- /dev/null +++ b/formats_err/imports/enum_two.ksy @@ -0,0 +1,11 @@ +# This is a file that is imported in imports_enum_leaking.ksy +meta: + id: enum_two + # Note: missing import of `enum_one` +seq: + - id: one + type: u1 + enum: enum_one::one # Note: `enum_one` is not imported in this spec, so this should cause a compile error +enums: + two: + 0: zero \ No newline at end of file diff --git a/formats_err/imports_enum_leaking.ksy b/formats_err/imports_enum_leaking.ksy new file mode 100644 index 000000000..31eee5ff5 --- /dev/null +++ b/formats_err/imports_enum_leaking.ksy @@ -0,0 +1,15 @@ +# imports/enum_two.ksy: /seq/0/enum: +# error: unable to find enum 'enum_one::one', searching from enum_two +# +meta: + id: imports_enum_leaking + imports: + - imports/enum_one + - imports/enum_two +seq: + - id: another_one + type: u1 + enum: enum_one::one + - id: another_two + type: u1 + enum: enum_two::two \ No newline at end of file