From 765d851b1a1bc4584162f6c1d582b589799830a4 Mon Sep 17 00:00:00 2001 From: Svetlana Isakova Date: Fri, 4 May 2012 20:47:17 +0400 Subject: [PATCH] Tests for fixed issues #KT-1736 fixed #KT-1244 fixed #KT-1738 fixed --- .../diagnostics/tests/regressions/kt1736.jet | 10 ++++++++++ .../testData/diagnostics/tests/scopes/kt1244.jet | 13 +++++++++++++ .../testData/diagnostics/tests/scopes/kt1738.jet | 11 +++++++++++ 3 files changed, 34 insertions(+) create mode 100644 compiler/testData/diagnostics/tests/regressions/kt1736.jet create mode 100644 compiler/testData/diagnostics/tests/scopes/kt1244.jet create mode 100644 compiler/testData/diagnostics/tests/scopes/kt1738.jet diff --git a/compiler/testData/diagnostics/tests/regressions/kt1736.jet b/compiler/testData/diagnostics/tests/regressions/kt1736.jet new file mode 100644 index 00000000000..8214fc8e645 --- /dev/null +++ b/compiler/testData/diagnostics/tests/regressions/kt1736.jet @@ -0,0 +1,10 @@ +//KT-1736 AssertionError in CallResolver + +package kt1736 + +object Obj { + fun method() { + } +} + +val x = Obj.method{ -> } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/scopes/kt1244.jet b/compiler/testData/diagnostics/tests/scopes/kt1244.jet new file mode 100644 index 00000000000..16bc89dc4ba --- /dev/null +++ b/compiler/testData/diagnostics/tests/scopes/kt1244.jet @@ -0,0 +1,13 @@ +//KT-1244 Frontend allows access to private members of other classes + +package kt1244 + +class A { + private var a = "" +} + +class B() { + { + A().a = "Hello" + } +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/scopes/kt1738.jet b/compiler/testData/diagnostics/tests/scopes/kt1738.jet new file mode 100644 index 00000000000..3ad2f15a121 --- /dev/null +++ b/compiler/testData/diagnostics/tests/scopes/kt1738.jet @@ -0,0 +1,11 @@ +//KT-1738 Make it possible to define visibility for constructor parameters which become properties + +package kt1738 + +class A(private var i: Int, var j: Int) { +} + +fun test(a: A) { + a.i++ + a.j++ +} \ No newline at end of file