diff options
author | Iulian Dragos <jaguarul@gmail.com> | 2012-04-30 11:53:41 +0200 |
---|---|---|
committer | Iulian Dragos <jaguarul@gmail.com> | 2012-04-30 12:15:45 +0200 |
commit | b72f52bbd59602ec9e09900381d5ff19752fa961 (patch) | |
tree | bf1ad4bd42c28b831d3b544278aa231788e2b1ee /test/files/presentation/visibility/src | |
parent | 94c63f5da548996535cad43142758c9405118828 (diff) | |
download | scala-b72f52bbd59602ec9e09900381d5ff19752fa961.tar.gz scala-b72f52bbd59602ec9e09900381d5ff19752fa961.tar.bz2 scala-b72f52bbd59602ec9e09900381d5ff19752fa961.zip |
Presentation Compiler tests for visibility of members.
Removed some unneeded indirection in the testing framework.
Diffstat (limited to 'test/files/presentation/visibility/src')
-rw-r--r-- | test/files/presentation/visibility/src/Completions.scala | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/test/files/presentation/visibility/src/Completions.scala b/test/files/presentation/visibility/src/Completions.scala new file mode 100644 index 0000000000..098b98a0fd --- /dev/null +++ b/test/files/presentation/visibility/src/Completions.scala @@ -0,0 +1,40 @@ +package accessibility { + + class Foo { + private def secretPrivate(): Unit = () + private[this] def secretPrivateThis(): Unit = () + + protected def secretProtected(): Unit + + protected[accessibility] def secretProtectedInPackage(): Unit + + def secretPublic(): Unit + + def someTests(other: Foo) { + other./*!*/secretPrivate // should be all but scretThis + + this./*!*/secretProtected // should hit five completions + } + } + + class AccessibilityChecks extends Foo { + def someTests { + this./*!*/ // should not list secretPrivate* + } + } + + class UnrelatedClass { + def someTests(foo: Foo) { + foo./*!*/ // should list public and protected[accessiblity] + } + } + +} + +package other { + class SomeChecsk { + def foo(o: accessibility.Foo) { + o./*!*/ // should only match secretPublic + } + } +}
\ No newline at end of file |