Skip to content

Commit

Permalink
Added test case for #3633.
Browse files Browse the repository at this point in the history
  • Loading branch information
perost committed Jan 21, 2016
1 parent 949f860 commit 0af2de1
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions metamodelica/meta/Makefile
Expand Up @@ -70,6 +70,7 @@ MatchCaseInteractive3.mos \
MatchDotNotation.mos \
MatchElse1.mos \
MatchIfEquation1.mos \
MatchNoRetCall.mos \
MatchShadowing.mo \
OptimizeContinue.mo \
OptimizeMatchToIfExp.mo \
Expand Down
25 changes: 25 additions & 0 deletions metamodelica/meta/MatchNoRetCall.mos
@@ -0,0 +1,25 @@
// name: MatchNoRetCall
// keywords: match noretcall #3633
// status: correct
// cflags: +g=MetaModelica
//
// Checks that using a match as a non-returning call works.
//

loadString("
function test
input Integer n;
algorithm
_ := match n
case 1 then n;
end match;
end test;
");
test(1);
getErrorString();

// Result:
// true
//
// ""
// endResult

0 comments on commit 0af2de1

Please sign in to comment.