Skip to content

Commit d09041a

Browse files
#4 test case
1 parent 956ed07 commit d09041a

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

semantic/src/test/java/com/compilerprogramming/ezlang/semantic/TestSemaAssignTypes.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import com.compilerprogramming.ezlang.parser.Parser;
66
import com.compilerprogramming.ezlang.types.TypeDictionary;
77
import org.junit.Assert;
8+
import org.junit.Ignore;
89
import org.junit.Test;
910

1011
public class TestSemaAssignTypes {
@@ -420,4 +421,20 @@ func foo()
420421
""";
421422
analyze(src, "foo", "func foo()");
422423
}
424+
425+
@Ignore
426+
@Test(expected = CompilerException.class)
427+
public void test23() {
428+
String src = """
429+
func bar(arg: Int)->Int {
430+
if (arg)
431+
return 42;
432+
return 0;
433+
}
434+
func foo()->Int {
435+
return bar();
436+
}
437+
""";
438+
analyze(src, "foo", "func foo()->Int");
439+
}
423440
}

0 commit comments

Comments
 (0)