From 439bb0c5de6fa4671105b9709f06326abba03d84 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Mon, 18 Nov 2019 12:11:25 +0300 Subject: [PATCH] foo()? test --- vlib/compiler/tests/repl/option.repl | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 vlib/compiler/tests/repl/option.repl diff --git a/vlib/compiler/tests/repl/option.repl b/vlib/compiler/tests/repl/option.repl new file mode 100644 index 0000000000..84ed92976d --- /dev/null +++ b/vlib/compiler/tests/repl/option.repl @@ -0,0 +1,10 @@ +fn foo() ?bool { + return true +} + +fn main() { + foo()? // only works in main() + println('done') +} +===output=== +done