From 7ba329bce27b51ace8fe549772399aaee8695e33 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 6 Jan 2022 18:39:09 +0100 Subject: pkg/compiler: prohibit use of len/flags/const/proc types in out fields These types in explict out fields is either unnecessary details or bugs in descriptions. --- pkg/compiler/testdata/errors2.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'pkg/compiler/testdata/errors2.txt') diff --git a/pkg/compiler/testdata/errors2.txt b/pkg/compiler/testdata/errors2.txt index c07e6a8a1..75c202fba 100644 --- a/pkg/compiler/testdata/errors2.txt +++ b/pkg/compiler/testdata/errors2.txt @@ -383,7 +383,7 @@ s405 { # Field attributes. -foo$overlay(a ptr[in, struct$overlay0]) +foo$overlay(a ptr[in, struct$overlay0], b ptr[in, struct$out0]) struct$overlay0 { f0 int32 @@ -392,3 +392,10 @@ struct$overlay0 { f3 proc[0, 1, int32] ### proc type must not be used as output f4 bytesize[f1, int32] ### bytesize type must not be used as output } + +struct$out0 { + f0 const[0, int32] (out) ### const type must not be used as output + f1 ptr[in, int32] (out) ### ptr type must not be used as output + f2 proc[0, 1, int32] (out) ### proc type must not be used as output + f3 bytesize[f1, int32] (out) ### bytesize type must not be used as output +} -- cgit mrf-deployment