From 3d55fe723f1af91f4d2db421f0e0965c583346dc Mon Sep 17 00:00:00 2001 From: Luc Bourlier Date: Wed, 13 Nov 2013 15:14:05 +0100 Subject: Adds test cases for scope completion --- .../scope-completion-3/src/Completions.scala | 106 +++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 test/files/presentation/scope-completion-3/src/Completions.scala (limited to 'test/files/presentation/scope-completion-3/src/Completions.scala') diff --git a/test/files/presentation/scope-completion-3/src/Completions.scala b/test/files/presentation/scope-completion-3/src/Completions.scala new file mode 100644 index 0000000000..18cef1cefa --- /dev/null +++ b/test/files/presentation/scope-completion-3/src/Completions.scala @@ -0,0 +1,106 @@ +package test + +/* check availability of members defined locally and in hierachy */ + +abstract class Base1 { + + type tb1 = Int + val vb1 = 0 + var rb1 = 0 + def fb1 = 0 + class Cb1 + object Ob1 + + private type tb2 = Int + private val vb2 = 0 + private var rb2 = 0 + private def fb2 = 0 + private class Cb2 + private object Ob2 + + type tb3 + val vb3: Int + var rb3: Int + def fb3: Int +} + +trait Trait1 { + + type tt1 = Int + val vt1 = 0 + var rt1 = 0 + def ft1 = 0 + class Ct1 + object Ot1 + + private type tt2 = Int + private val vt2 = 0 + private var rt2 = 0 + private def ft2 = 0 + private class Ct2 + private object Ot2 + + type tt3 + val vt3: Int + var rt3: Int + def ft3: Int +} + +class Completion1 extends Base1 with Trait1 { + + type tc1 = Int + val vc1 = 0 + var rc1 = 0 + def fc1 = 0 + class Cc1 + object Oc1 + + private type tc2 = Int + private val vc2 = 0 + private var rc2 = 0 + private def fc2 = 0 + private class Cc2 + private object Oc2 + + override type tb3 = Int + override val vb3 = 12 + override var rb3 = 12 + override def fb3 = 12 + + override type tt3 = Int + override val vt3 = 12 + override var rt3 = 12 + override def ft3 = 12 + + /*_*/ +} + +object Completion2 extends Base1 with Trait1 { + + type to1 = Int + val vo1 = 0 + var ro1 = 0 + def fo1 = 0 + class Co1 + object Oo1 + + private type to2 = Int + private val vo2 = 0 + private var ro2 = 0 + private def fo2 = 0 + private class Co2 + private object Oo2 + + override type tb3 = Int + override val vb3 = 12 + override var rb3 = 12 + override def fb3 = 12 + + override type tt3 = Int + override val vt3 = 12 + override var rt3 = 12 + override def ft3 = 12 + + /*_*/ +} + -- cgit v1.2.3