From 3d00667caf261324aeaa693e7c7826b7312147ca Mon Sep 17 00:00:00 2001 From: greg Date: Thu, 18 Oct 2018 15:55:24 -0700 Subject: [PATCH] Add test for ignored pattern --- schala-lang/language/src/eval.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/schala-lang/language/src/eval.rs b/schala-lang/language/src/eval.rs index d3256f6..48c6d72 100644 --- a/schala-lang/language/src/eval.rs +++ b/schala-lang/language/src/eval.rs @@ -563,4 +563,15 @@ if a { is true -> "x", is false -> "y" } "#; test_in_fresh_env!(source, "\"y\""); } + + #[test] + fn ignore_pattern() { + let source = r#" +type Option = Some(T) | None +if Some(10) { + is _ -> "hella" +} +"#; + test_in_fresh_env!(source, "\"hella\""); + } }