diff options
author | Juan J. Martinez <jjm@usebox.net> | 2022-08-30 23:21:50 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2022-08-30 23:26:10 +0100 |
commit | 90a8f16e5f1d852f21fbbaf2b0631d348973152a (patch) | |
tree | 44f9e3c284a4d5b8f2c8df708cd6592616714acf /test | |
parent | aaf2ef628772e5789203544ac6226b467891d1d9 (diff) | |
download | micro-lang-hs-90a8f16e5f1d852f21fbbaf2b0631d348973152a.tar.gz micro-lang-hs-90a8f16e5f1d852f21fbbaf2b0631d348973152a.zip |
Check undefined types
Diffstat (limited to 'test')
-rw-r--r-- | test/Language.hs | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/test/Language.hs b/test/Language.hs index 448e6ad..12c724a 100644 --- a/test/Language.hs +++ b/test/Language.hs @@ -253,6 +253,26 @@ testCase20 = \}\n" E.Undefined +testCase21 = + TestLabel "undefined type in function parameters" $ + TestCase $ + expectError + "module main\n\ + \def fn(a: undef): bool {\n\ + \return true;\n\ + \}\n" + E.UndefinedType + +testCase22 = + TestLabel "undefined type in function return type" $ + TestCase $ + expectError + "module main\n\ + \def fn(): undef {\n\ + \return true;\n\ + \}\n" + E.UndefinedType + language = [ testCase2, testCase3, @@ -272,5 +292,7 @@ language = testCase17, testCase18, testCase19, - testCase20 + testCase20, + testCase21, + testCase22 ] |