From ac93d7e1d83ffac19983e9d754a47e7808f1230e Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Tue, 28 Nov 2017 14:27:28 +0100 Subject: pkg/compiler: add check that len does not refer to array with varlen elements This [almost] always means a bug in descriptions. Fix all bugs identified by the check. --- pkg/compiler/testdata/errors2.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pkg/compiler/testdata/errors2.txt') diff --git a/pkg/compiler/testdata/errors2.txt b/pkg/compiler/testdata/errors2.txt index 0292aca5e..5b418ab55 100644 --- a/pkg/compiler/testdata/errors2.txt +++ b/pkg/compiler/testdata/errors2.txt @@ -52,6 +52,8 @@ foo$104(a len[parent]) ### len target parent does not exist foo$105(a ptr[in, int32], b ptr[in, array[len[a, int32]]]) foo$106(a int32, b ptr[in, csum[a, inet, int32]]) foo$107(a int32, b ptr[in, csum[c, inet, int32]]) ### csum target c does not exist +foo$108(a ptr[in, array[string]], b len[a]) ### len target a refer to an array with variable-size elements (do you mean bytesize?) +foo$109(a ptr[in, array[string]], b ptr[in, len[a, int32]]) ### len target a refer to an array with variable-size elements (do you mean bytesize?) s1 { f1 len[s2, int32] ### len target s2 does not exist -- cgit mrf-deployment