aboutsummaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rw-r--r--pkg/compiler/testdata/all.txt1
-rw-r--r--pkg/compiler/types.go5
2 files changed, 6 insertions, 0 deletions
diff --git a/pkg/compiler/testdata/all.txt b/pkg/compiler/testdata/all.txt
index d451f5a60..69ad6d181 100644
--- a/pkg/compiler/testdata/all.txt
+++ b/pkg/compiler/testdata/all.txt
@@ -102,6 +102,7 @@ struct_with_void1 {
f1 int8
f2 array[void5]
f3 int64
+ f4 optional[int8]
}
foo$void0(a ptr[in, void0])
diff --git a/pkg/compiler/types.go b/pkg/compiler/types.go
index 825071324..97f7d18c4 100644
--- a/pkg/compiler/types.go
+++ b/pkg/compiler/types.go
@@ -744,6 +744,11 @@ type boolptr intptr[0:1]
type filename string[filename]
filename = "", "."
+
+type optional[T] [
+ val T
+ void void
+] [varlen]
`
func init() {