From 92e1391ca5ec73615220ac1cb513d1c687388d68 Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Mon, 16 May 2011 21:18:22 +0400 Subject: [PATCH] Test for JET-4: Support forward declarations with no type annotations --- .../checker/RecursiveTypeInference.jet | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 idea/testData/checker/RecursiveTypeInference.jet diff --git a/idea/testData/checker/RecursiveTypeInference.jet b/idea/testData/checker/RecursiveTypeInference.jet new file mode 100644 index 00000000000..a73cf01cc0e --- /dev/null +++ b/idea/testData/checker/RecursiveTypeInference.jet @@ -0,0 +1,42 @@ +namespace a { + val foo = bar() + + fun bar() = foo +} + +namespace b { + fun foo() = bar() + + fun bar() = foo() +} + +namespace c { + fun bazz() = bar() + + fun foo() = bazz() + + fun bar() = foo() +} + +namespace ok { + + namespace a { + val foo = bar() + + fun bar() : Int = foo + } + + namespace b { + fun foo() : Int = bar() + + fun bar() = foo() + } + + namespace c { + fun bazz() = bar() + + fun foo() : Int = bazz() + + fun bar() = foo() + } +} \ No newline at end of file