From c2e799237fe66134b015442bc6db181319bef0c1 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Thu, 5 Oct 2023 17:45:03 +0200 Subject: pkg/compiler: prohibit not DirIn resources inside fmt The problem mentioned in the previous commit is actually not only ANY-specific, it's only by a happy coincidence that all our descriptions already avoided such situations. Enforce this rule at the compilation stage. --- pkg/compiler/testdata/errors2.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pkg/compiler/testdata/errors2.txt') diff --git a/pkg/compiler/testdata/errors2.txt b/pkg/compiler/testdata/errors2.txt index 3cd63ebd2..e99610c58 100644 --- a/pkg/compiler/testdata/errors2.txt +++ b/pkg/compiler/testdata/errors2.txt @@ -421,3 +421,7 @@ foo$non_generatable(a compressed_image) (no_minimize) ### call foo$non_generatab foo$non_minimizable(a compressed_image) (no_generate) ### call foo$non_minimizable refers to type compressed_image and so must be marked no_minimize foo$non_generatable_via_struct(a ptr[in, struct_non_generatable]) (no_minimize) ### call foo$non_generatable_via_struct refers to type compressed_image and so must be marked no_generate foo$non_minimizable_via_union(a ptr[in, union_non_minimizable]) (no_generate) ### call foo$non_minimizable_via_union refers to type compressed_image and so must be marked no_minimize + +resource for_fmt[int32] +foo$fmt_copyin(a ptr[in, fmt[dec, for_fmt]]) +foo$fmt_copyout(a ptr[out, fmt[dec, for_fmt]]) ### resource for_fmt cannot be created in fmt -- cgit mrf-deployment