From 414c035582c39398ddd927b5e4fdfd7a6f3aefc5 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Sat, 17 Feb 2018 17:00:53 +0100 Subject: pkg/compiler: support template template arguments Can be useful for netfilter descriptions. --- pkg/compiler/testdata/all.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'pkg/compiler/testdata/all.txt') diff --git a/pkg/compiler/testdata/all.txt b/pkg/compiler/testdata/all.txt index 2bf76c28b..dd2a90ba3 100644 --- a/pkg/compiler/testdata/all.txt +++ b/pkg/compiler/testdata/all.txt @@ -133,6 +133,26 @@ struct0 { f2 int16 } +type templ_base0[TYPE, CONST] { + f1 TYPE + f2 const[CONST, int32] +} + +type templ_base1[TYPE, CONST] { + f2 const[CONST, int8] + f1 TYPE +} + +type templ_templ[BASE, CONST] { + f1 BASE[int8, CONST] + f2 BASE[int32, 0] +} + +templ_templ_use { + f1 templ_templ[templ_base0, 0] + f2 templ_templ[templ_base1, 1] +} + type templ_struct2[A] templ_struct0[A, int8] type templ_struct3 templ_struct2[C1] type templ_struct4 templ_struct3 -- cgit mrf-deployment