diff options
Diffstat (limited to 'test/files/presentation')
55 files changed, 1512 insertions, 1207 deletions
diff --git a/test/files/presentation/callcc-interpreter.check b/test/files/presentation/callcc-interpreter.check index 9a92c40609..4bf68b3d4e 100644 --- a/test/files/presentation/callcc-interpreter.check +++ b/test/files/presentation/callcc-interpreter.check @@ -1,94 +1,88 @@ reload: CallccInterpreter.scala -askTypeCompletion at CallccInterpreter.scala(51,38) +askTypeCompletion at CallccInterpreter.scala(51,34) ================================================================================ -[response] askTypeCompletion at (51,38) -retrieved 64 members -[accessible: true] `class AddcallccInterpreter.Add` -[accessible: true] `class AppcallccInterpreter.App` -[accessible: true] `class CcccallccInterpreter.Ccc` -[accessible: true] `class ConcallccInterpreter.Con` -[accessible: true] `class FuncallccInterpreter.Fun` -[accessible: true] `class LamcallccInterpreter.Lam` -[accessible: true] `class McallccInterpreter.M` -[accessible: true] `class NumcallccInterpreter.Num` -[accessible: true] `class VarcallccInterpreter.Var` -[accessible: true] `method !=(x$1: Any)Boolean` -[accessible: true] `method !=(x$1: AnyRef)Boolean` -[accessible: true] `method ##()Int` -[accessible: true] `method +(other: String)String` -[accessible: true] `method ->[B](y: B)(callccInterpreter.type, B)` -[accessible: true] `method ==(x$1: Any)Boolean` -[accessible: true] `method ==(x$1: AnyRef)Boolean` -[accessible: true] `method add(a: callccInterpreter.Value, b: callccInterpreter.Value)callccInterpreter.M[_ >: callccInterpreter.Num with callccInterpreter.Wrong.type <: Product with Serializable with callccInterpreter.Value]` -[accessible: true] `method apply(a: callccInterpreter.Value, b: callccInterpreter.Value)callccInterpreter.M[callccInterpreter.Value]` -[accessible: true] `method asInstanceOf[T0]=> T0` -[accessible: true] `method callCC[A](h: (A => callccInterpreter.M[A]) => callccInterpreter.M[A])callccInterpreter.M[A]` -[accessible: true] `method clone()Object` -[accessible: true] `method ensuring(cond: Boolean)callccInterpreter.type` -[accessible: true] `method ensuring(cond: Boolean, msg: => Any)callccInterpreter.type` -[accessible: true] `method ensuring(cond: callccInterpreter.type => Boolean)callccInterpreter.type` -[accessible: true] `method ensuring(cond: callccInterpreter.type => Boolean, msg: => Any)callccInterpreter.type` -[accessible: true] `method eq(x$1: AnyRef)Boolean` -[accessible: true] `method equals(x$1: Any)Boolean` -[accessible: true] `method finalize()Unit` -[accessible: true] `method formatted(fmtstr: String)String` -[accessible: true] `method hashCode()Int` -[accessible: true] `method id[A]=> A => A` -[accessible: true] `method interp(t: callccInterpreter.Term, e: callccInterpreter.Environment)callccInterpreter.M[callccInterpreter.Value]` -[accessible: true] `method isInstanceOf[T0]=> Boolean` -[accessible: true] `method lookup(x: callccInterpreter.Name, e: callccInterpreter.Environment)callccInterpreter.M[callccInterpreter.Value]` -[accessible: true] `method main(args: Array[String])Unit` -[accessible: true] `method ne(x$1: AnyRef)Boolean` -[accessible: true] `method notify()Unit` -[accessible: true] `method notifyAll()Unit` -[accessible: true] `method showM(m: callccInterpreter.M[callccInterpreter.Value])String` -[accessible: true] `method synchronized[T0](x$1: T0)T0` -[accessible: true] `method test(t: callccInterpreter.Term)String` -[accessible: true] `method toString()String` -[accessible: true] `method unitM[A](a: A)callccInterpreter.M[A]` -[accessible: true] `method wait()Unit` -[accessible: true] `method wait(x$1: Long)Unit` -[accessible: true] `method wait(x$1: Long, x$2: Int)Unit` -[accessible: true] `method x=> callccInterpreter.type` -[accessible: true] `method →[B](y: B)(callccInterpreter.type, B)` -[accessible: true] `object WrongcallccInterpreter.Wrong.type` -[accessible: true] `trait TermcallccInterpreter.Term` -[accessible: true] `trait ValuecallccInterpreter.Value` -[accessible: true] `type AnswercallccInterpreter.Answer` -[accessible: true] `type EnvironmentcallccInterpreter.Environment` -[accessible: true] `type NamecallccInterpreter.Name` -[accessible: true] `value __leftOfArrowcallccInterpreter.type` -[accessible: true] `value __resultOfEnsuringcallccInterpreter.type` -[accessible: true] `value selfAny` -[accessible: true] `value term0callccInterpreter.App` -[accessible: true] `value term1callccInterpreter.App` -[accessible: true] `value term2callccInterpreter.Add` +[response] askTypeCompletion at (51,34) +retrieved 57 members +abstract trait Term extends AnyRef +abstract trait Value extends AnyRef +case class Add extends callccInterpreter.Term with Product with Serializable +case class App extends callccInterpreter.Term with Product with Serializable +case class Ccc extends callccInterpreter.Term with Product with Serializable +case class Con extends callccInterpreter.Term with Product with Serializable +case class Fun extends callccInterpreter.Value with Product with Serializable +case class Lam extends callccInterpreter.Term with Product with Serializable +case class M[A] extends Product with Serializable +case class Num extends callccInterpreter.Value with Product with Serializable +case class Var extends callccInterpreter.Term with Product with Serializable +case object Wrong +def +(other: String): String +def ->[B](y: B): (callccInterpreter.type, B) +def add(a: callccInterpreter.Value,b: callccInterpreter.Value): callccInterpreter.M[_ >: callccInterpreter.Num with callccInterpreter.Wrong.type <: Product with Serializable with callccInterpreter.Value] +def apply(a: callccInterpreter.Value,b: callccInterpreter.Value): callccInterpreter.M[callccInterpreter.Value] +def callCC[A](h: (A => callccInterpreter.M[A]) => callccInterpreter.M[A]): callccInterpreter.M[A] +def ensuring(cond: Boolean): callccInterpreter.type +def ensuring(cond: Boolean,msg: => Any): callccInterpreter.type +def ensuring(cond: callccInterpreter.type => Boolean): callccInterpreter.type +def ensuring(cond: callccInterpreter.type => Boolean,msg: => Any): callccInterpreter.type +def equals(x$1: Any): Boolean +def formatted(fmtstr: String): String +def hashCode(): Int +def id[A]: A => A +def interp(t: callccInterpreter.Term,e: callccInterpreter.Environment): callccInterpreter.M[callccInterpreter.Value] +def lookup(x: callccInterpreter.Name,e: callccInterpreter.Environment): callccInterpreter.M[callccInterpreter.Value] +def main(args: Array[String]): Unit +def showM(m: callccInterpreter.M[callccInterpreter.Value]): String +def test(t: callccInterpreter.Term): String +def toString(): String +def unitM[A](a: A): callccInterpreter.M[A] +def →[B](y: B): (callccInterpreter.type, B) +final def !=(x$1: Any): Boolean +final def ##(): Int +final def ==(x$1: Any): Boolean +final def asInstanceOf[T0]: T0 +final def eq(x$1: AnyRef): Boolean +final def isInstanceOf[T0]: Boolean +final def ne(x$1: AnyRef): Boolean +final def notify(): Unit +final def notifyAll(): Unit +final def synchronized[T0](x$1: T0): T0 +final def wait(): Unit +final def wait(x$1: Long): Unit +final def wait(x$1: Long,x$2: Int): Unit +private[this] val term0: callccInterpreter.App +private[this] val term1: callccInterpreter.App +private[this] val term2: callccInterpreter.Add +protected[package lang] def clone(): Object +protected[package lang] def finalize(): Unit +type Answer = callccInterpreter.Answer +type Environment = callccInterpreter.Environment +type Name = callccInterpreter.Name ================================================================================ askType at CallccInterpreter.scala(14,21) ================================================================================ -[response] askTypeAt at (14,21) -def unitM[A >: Nothing <: Any](a: A): callccInterpreter.M[A] = callccInterpreter.this.M.apply[A](((c: A => callccInterpreter.Answer) => c.apply(a))) +[response] askTypeAt (14,21) +def unitM[A](a: A): callccInterpreter.M[A] = callccInterpreter.this.M.apply[A](((c: A => callccInterpreter.Answer) => c.apply(a))) ================================================================================ askType at CallccInterpreter.scala(16,12) ================================================================================ -[response] askTypeAt at (16,12) -def id[A >: Nothing <: Any]: A => A = ((x: A) => x) +[response] askTypeAt (16,12) +def id[A]: A => A = ((x: A) => x) ================================================================================ askType at CallccInterpreter.scala(17,25) ================================================================================ -[response] askTypeAt at (17,25) +[response] askTypeAt (17,25) def showM(m: callccInterpreter.M[callccInterpreter.Value]): String = m.in.apply(callccInterpreter.this.id[callccInterpreter.Value]).toString() ================================================================================ askType at CallccInterpreter.scala(50,30) ================================================================================ -[response] askTypeAt at (50,30) -def add(a: callccInterpreter.Value, b: callccInterpreter.Value): callccInterpreter.M[_ >: callccInterpreter.Num with callccInterpreter.Wrong.type <: Product with Serializable with callccInterpreter.Value] = scala.this.Predef.Pair.apply[callccInterpreter.Value, callccInterpreter.Value](a, b) match { - case scala.this.Predef.Pair.unapply[callccInterpreter.Value, callccInterpreter.Value](<unapply-selector>) <unapply> ((n: Int)callccInterpreter.Num((m @ _)), (n: Int)callccInterpreter.Num((n @ _))) => this.unitM[callccInterpreter.Num](callccInterpreter.this.Num.apply(m.+(n))) +[response] askTypeAt (50,30) +def add(a: callccInterpreter.Value, b: callccInterpreter.Value): callccInterpreter.M[_ >: callccInterpreter.Num with callccInterpreter.Wrong.type <: Product with Serializable with callccInterpreter.Value] = scala.Tuple2.apply[callccInterpreter.Value, callccInterpreter.Value](a, b) match { + case (_1: callccInterpreter.Value, _2: callccInterpreter.Value)(callccInterpreter.Value, callccInterpreter.Value)((n: Int)callccInterpreter.Num((m @ _)), (n: Int)callccInterpreter.Num((n @ _))) => this.unitM[callccInterpreter.Num](callccInterpreter.this.Num.apply(m.+(n))) case _ => callccInterpreter.this.unitM[callccInterpreter.Wrong.type](callccInterpreter.this.Wrong) } ================================================================================ diff --git a/test/files/presentation/callcc-interpreter/src/CallccInterpreter.scala b/test/files/presentation/callcc-interpreter/src/CallccInterpreter.scala index 0e96dfaa05..d498fe0b17 100644 --- a/test/files/presentation/callcc-interpreter/src/CallccInterpreter.scala +++ b/test/files/presentation/callcc-interpreter/src/CallccInterpreter.scala @@ -2,8 +2,8 @@ object callccInterpreter { type Answer = Value - /** - * A continuation monad. + /** + * A continuation monad. */ case class M[A](in: (A => Answer) => Answer) { def bind[B](k: A => M[B]) = M[B](c => in (a => k(a) in c)) @@ -40,15 +40,15 @@ object callccInterpreter { override def toString() = "<function>" } - type Environment = List[Pair[Name, Value]] + type Environment = List[Tuple2[Name, Value]] def lookup(x: Name, e: Environment): M[Value] = e match { case List() => unitM(Wrong) - case Pair(y, b) :: e1 => if (x == y) unitM(b) else lookup(x, e1) + case (y, b) :: e1 => if (x == y) unitM(b) else lookup(x, e1) } - def add(a: Value, b: Value) /*?*/ = Pair(a, b) match { - case Pair(Num(m), Num(n)) => this./*!*/unitM(Num(m + n)) + def add(a: Value, b: Value) /*?*/ = (a, b) match { + case (Num(m), Num(n)) => this./*!*/unitM(Num(m + n)) case _ => unitM(Wrong) } @@ -60,16 +60,20 @@ object callccInterpreter { def interp(t: Term, e: Environment): M[Value] = t match { case Var(x) => lookup(x, e) case Con(n) => unitM(Num(n)) - case Add(l, r) => for (val a <- interp(l, e); - val b <- interp(r, e); - val c <- add(a, b)) - yield c - case Lam(x, t) => unitM(Fun(a => interp(t, Pair(x, a) :: e))) - case App(f, t) => for (val a <- interp(f, e); - val b <- interp(t, e); - val c <- apply(a, b)) - yield c - case Ccc(x, t) => callCC(k => interp(t, Pair(x, Fun(k)) :: e)) + case Add(l, r) => + for { + a <- interp(l, e) + b <- interp(r, e) + c <- add(a, b) + } yield c + case Lam(x, t) => unitM(Fun(a => interp(t, (x, a) :: e))) + case App(f, t) => + for { + a <- interp(f, e) + b <- interp(t, e) + c <- apply(a, b) + } yield c + case Ccc(x, t) => callCC(k => interp(t, (x, Fun(k)) :: e)) } def test(t: Term): String = showM(interp(t, List())) diff --git a/test/files/presentation/completion-implicit-chained.check b/test/files/presentation/completion-implicit-chained.check index 24417cfa46..c583b7877c 100644 --- a/test/files/presentation/completion-implicit-chained.check +++ b/test/files/presentation/completion-implicit-chained.check @@ -3,27 +3,25 @@ reload: Completions.scala askTypeCompletion at Completions.scala(11,16) ================================================================================ [response] askTypeCompletion at (11,16) -retrieved 24 members -[accessible: true] `method !=(x$1: Any)Boolean` -[accessible: true] `method !=(x$1: AnyRef)Boolean` -[accessible: true] `method ##()Int` -[accessible: true] `method ==(x$1: Any)Boolean` -[accessible: true] `method ==(x$1: AnyRef)Boolean` -[accessible: true] `method asInstanceOf[T0]=> T0` -[accessible: true] `method eq(x$1: AnyRef)Boolean` -[accessible: true] `method equals(x$1: Any)Boolean` -[accessible: true] `method hashCode()Int` -[accessible: true] `method isInstanceOf[T0]=> Boolean` -[accessible: true] `method map(x: Int => Int)(implicit a: DummyImplicit)test.O.type` -[accessible: true] `method ne(x$1: AnyRef)Boolean` -[accessible: true] `method notify()Unit` -[accessible: true] `method notifyAll()Unit` -[accessible: true] `method synchronized[T0](x$1: T0)T0` -[accessible: true] `method toString()String` -[accessible: true] `method wait()Unit` -[accessible: true] `method wait(x$1: Long)Unit` -[accessible: true] `method wait(x$1: Long, x$2: Int)Unit` -[accessible: true] `value prefix123Int` -[accessible: false] `method clone()Object` -[accessible: false] `method finalize()Unit` +retrieved 22 members +[inaccessible] protected[package lang] def clone(): Object +[inaccessible] protected[package lang] def finalize(): Unit +def equals(x$1: Any): Boolean +def hashCode(): Int +def map(x: Int => Int)(implicit a: DummyImplicit): test.O.type +def toString(): String +final def !=(x$1: Any): Boolean +final def ##(): Int +final def ==(x$1: Any): Boolean +final def asInstanceOf[T0]: T0 +final def eq(x$1: AnyRef): Boolean +final def isInstanceOf[T0]: Boolean +final def ne(x$1: AnyRef): Boolean +final def notify(): Unit +final def notifyAll(): Unit +final def synchronized[T0](x$1: T0): T0 +final def wait(): Unit +final def wait(x$1: Long): Unit +final def wait(x$1: Long,x$2: Int): Unit +private[this] val prefix123: Int ================================================================================ diff --git a/test/files/presentation/hyperlinks-macro.check b/test/files/presentation/hyperlinks-macro.check new file mode 100644 index 0000000000..80d2268fa1 --- /dev/null +++ b/test/files/presentation/hyperlinks-macro.check @@ -0,0 +1,11 @@ +reload: MacroCall.scala + +askHyperlinkPos for `foo` at (5,7) MacroCall.scala +================================================================================ +[response] found askHyperlinkPos for `foo` at (2,7) MacroCall.scala +================================================================================ + +askHyperlinkPos for `foo` at (9,7) MacroCall.scala +================================================================================ +[response] found askHyperlinkPos for `foo` at (2,7) MacroCall.scala +================================================================================ diff --git a/test/files/presentation/hyperlinks-macro/Runner.scala b/test/files/presentation/hyperlinks-macro/Runner.scala new file mode 100644 index 0000000000..c2f89bdb17 --- /dev/null +++ b/test/files/presentation/hyperlinks-macro/Runner.scala @@ -0,0 +1,8 @@ +import scala.tools.nsc.interactive.tests.InteractiveTest + +object Test extends InteractiveTest { + override def runDefaultTests() { + sourceFiles foreach (src => askLoadedTyped(src).get) + super.runDefaultTests() + } +} diff --git a/test/files/presentation/hyperlinks-macro/src/MacroCall.scala b/test/files/presentation/hyperlinks-macro/src/MacroCall.scala new file mode 100644 index 0000000000..d9676b3d2a --- /dev/null +++ b/test/files/presentation/hyperlinks-macro/src/MacroCall.scala @@ -0,0 +1,11 @@ +object Test { + def foo = 0 + + scala.reflect.runtime.universe.reify { + foo/*#*/ + } + + identity { + foo/*#*/ + } +} diff --git a/test/files/presentation/hyperlinks/Runner.scala b/test/files/presentation/hyperlinks/Runner.scala index 61da49a3d7..b78e13c23a 100644 --- a/test/files/presentation/hyperlinks/Runner.scala +++ b/test/files/presentation/hyperlinks/Runner.scala @@ -7,5 +7,5 @@ object Test extends InteractiveTest { sourceFiles foreach (src => askLoadedTyped(src).get) super.runDefaultTests() } - + }
\ No newline at end of file diff --git a/test/files/presentation/hyperlinks/src/NameDefaultTests.scala b/test/files/presentation/hyperlinks/src/NameDefaultTests.scala index b218040fe3..340d223d2e 100644 --- a/test/files/presentation/hyperlinks/src/NameDefaultTests.scala +++ b/test/files/presentation/hyperlinks/src/NameDefaultTests.scala @@ -2,11 +2,11 @@ class NameDefaults { val someString = "abc" val someInt = 42 - + def foo(x: String, y: Int)(implicit logger: Int): Int = y - + implicit val l = 42 - + def bar { println() val someOtherInt = 10 diff --git a/test/files/presentation/hyperlinks/src/PatMatTests.scala b/test/files/presentation/hyperlinks/src/PatMatTests.scala index bbd0f2e7ed..7184106357 100644 --- a/test/files/presentation/hyperlinks/src/PatMatTests.scala +++ b/test/files/presentation/hyperlinks/src/PatMatTests.scala @@ -6,22 +6,22 @@ case class CaseOne(x: Int, y: List[Int]) extends BaseType case class CaseTwo(str: String) extends BaseType class PatMatTests { - + def foo(x: BaseType) { x match { case CaseOne/*#*/(10, first :: second :: Nil) => val tmp = 23 println(first/*#*/) println(tmp/*#*/) - + case CaseTwo/*#*/(mystring) => println(mystring/*#*/) } } - + def multipleAssign() { val (x, y) = ("abc", "def") - + println(x/*#*/, y/*#*/) } diff --git a/test/files/presentation/ide-bug-1000349.check b/test/files/presentation/ide-bug-1000349.check index ada307d0b2..79bfde5343 100644 --- a/test/files/presentation/ide-bug-1000349.check +++ b/test/files/presentation/ide-bug-1000349.check @@ -3,38 +3,32 @@ reload: CompletionOnEmptyArgMethod.scala askTypeCompletion at CompletionOnEmptyArgMethod.scala(2,17) ================================================================================ [response] askTypeCompletion at (2,17) -retrieved 37 members -[accessible: true] `method !=(x$1: Any)Boolean` -[accessible: true] `method !=(x$1: AnyRef)Boolean` -[accessible: true] `method ##()Int` -[accessible: true] `method +(other: String)String` -[accessible: true] `method ->[B](y: B)(Foo, B)` -[accessible: true] `method ==(x$1: Any)Boolean` -[accessible: true] `method ==(x$1: AnyRef)Boolean` -[accessible: true] `method asInstanceOf[T0]=> T0` -[accessible: true] `method clone()Object` -[accessible: true] `method ensuring(cond: Boolean)Foo` -[accessible: true] `method ensuring(cond: Boolean, msg: => Any)Foo` -[accessible: true] `method ensuring(cond: Foo => Boolean)Foo` -[accessible: true] `method ensuring(cond: Foo => Boolean, msg: => Any)Foo` -[accessible: true] `method eq(x$1: AnyRef)Boolean` -[accessible: true] `method equals(x$1: Any)Boolean` -[accessible: true] `method finalize()Unit` -[accessible: true] `method foo=> Foo` -[accessible: true] `method formatted(fmtstr: String)String` -[accessible: true] `method hashCode()Int` -[accessible: true] `method isInstanceOf[T0]=> Boolean` -[accessible: true] `method ne(x$1: AnyRef)Boolean` -[accessible: true] `method notify()Unit` -[accessible: true] `method notifyAll()Unit` -[accessible: true] `method synchronized[T0](x$1: T0)T0` -[accessible: true] `method toString()String` -[accessible: true] `method wait()Unit` -[accessible: true] `method wait(x$1: Long)Unit` -[accessible: true] `method wait(x$1: Long, x$2: Int)Unit` -[accessible: true] `method x=> Foo` -[accessible: true] `method →[B](y: B)(Foo, B)` -[accessible: true] `value __leftOfArrowFoo` -[accessible: true] `value __resultOfEnsuringFoo` -[accessible: true] `value selfAny` +retrieved 30 members +def +(other: String): String +def ->[B](y: B): (Foo, B) +def ensuring(cond: Boolean): Foo +def ensuring(cond: Boolean,msg: => Any): Foo +def ensuring(cond: Foo => Boolean): Foo +def ensuring(cond: Foo => Boolean,msg: => Any): Foo +def equals(x$1: Any): Boolean +def foo: Foo +def formatted(fmtstr: String): String +def hashCode(): Int +def toString(): String +def →[B](y: B): (Foo, B) +final def !=(x$1: Any): Boolean +final def ##(): Int +final def ==(x$1: Any): Boolean +final def asInstanceOf[T0]: T0 +final def eq(x$1: AnyRef): Boolean +final def isInstanceOf[T0]: Boolean +final def ne(x$1: AnyRef): Boolean +final def notify(): Unit +final def notifyAll(): Unit +final def synchronized[T0](x$1: T0): T0 +final def wait(): Unit +final def wait(x$1: Long): Unit +final def wait(x$1: Long,x$2: Int): Unit +protected[package lang] def clone(): Object +protected[package lang] def finalize(): Unit ================================================================================ diff --git a/test/files/presentation/ide-bug-1000475.check b/test/files/presentation/ide-bug-1000475.check index 07902727e3..4fb7f18285 100644 --- a/test/files/presentation/ide-bug-1000475.check +++ b/test/files/presentation/ide-bug-1000475.check @@ -3,113 +3,95 @@ reload: Foo.scala askTypeCompletion at Foo.scala(3,7) ================================================================================ [response] askTypeCompletion at (3,7) -retrieved 36 members -[accessible: true] `method !=(x$1: Any)Boolean` -[accessible: true] `method !=(x$1: AnyRef)Boolean` -[accessible: true] `method ##()Int` -[accessible: true] `method +(other: String)String` -[accessible: true] `method ->[B](y: B)(Object, B)` -[accessible: true] `method ==(x$1: Any)Boolean` -[accessible: true] `method ==(x$1: AnyRef)Boolean` -[accessible: true] `method asInstanceOf[T0]=> T0` -[accessible: true] `method ensuring(cond: Boolean)Object` -[accessible: true] `method ensuring(cond: Boolean, msg: => Any)Object` -[accessible: true] `method ensuring(cond: Object => Boolean)Object` -[accessible: true] `method ensuring(cond: Object => Boolean, msg: => Any)Object` -[accessible: true] `method eq(x$1: AnyRef)Boolean` -[accessible: true] `method equals(x$1: Any)Boolean` -[accessible: true] `method formatted(fmtstr: String)String` -[accessible: true] `method hashCode()Int` -[accessible: true] `method isInstanceOf[T0]=> Boolean` -[accessible: true] `method ne(x$1: AnyRef)Boolean` -[accessible: true] `method notify()Unit` -[accessible: true] `method notifyAll()Unit` -[accessible: true] `method synchronized[T0](x$1: T0)T0` -[accessible: true] `method toString()String` -[accessible: true] `method wait()Unit` -[accessible: true] `method wait(x$1: Long)Unit` -[accessible: true] `method wait(x$1: Long, x$2: Int)Unit` -[accessible: true] `method x=> Object` -[accessible: true] `method →[B](y: B)(Object, B)` -[accessible: true] `value __leftOfArrowObject` -[accessible: true] `value __resultOfEnsuringObject` -[accessible: true] `value selfAny` -[accessible: false] `method clone()Object` -[accessible: false] `method finalize()Unit` +retrieved 29 members +[inaccessible] protected[package lang] def clone(): Object +[inaccessible] protected[package lang] def finalize(): Unit +def +(other: String): String +def ->[B](y: B): (Object, B) +def ensuring(cond: Boolean): Object +def ensuring(cond: Boolean,msg: => Any): Object +def ensuring(cond: Object => Boolean): Object +def ensuring(cond: Object => Boolean,msg: => Any): Object +def equals(x$1: Any): Boolean +def formatted(fmtstr: String): String +def hashCode(): Int +def toString(): String +def →[B](y: B): (Object, B) +final def !=(x$1: Any): Boolean +final def ##(): Int +final def ==(x$1: Any): Boolean +final def asInstanceOf[T0]: T0 +final def eq(x$1: AnyRef): Boolean +final def isInstanceOf[T0]: Boolean +final def ne(x$1: AnyRef): Boolean +final def notify(): Unit +final def notifyAll(): Unit +final def synchronized[T0](x$1: T0): T0 +final def wait(): Unit +final def wait(x$1: Long): Unit +final def wait(x$1: Long,x$2: Int): Unit ================================================================================ askTypeCompletion at Foo.scala(6,10) ================================================================================ [response] askTypeCompletion at (6,10) -retrieved 36 members -[accessible: true] `method !=(x$1: Any)Boolean` -[accessible: true] `method !=(x$1: AnyRef)Boolean` -[accessible: true] `method ##()Int` -[accessible: true] `method +(other: String)String` -[accessible: true] `method ->[B](y: B)(Object, B)` -[accessible: true] `method ==(x$1: Any)Boolean` -[accessible: true] `method ==(x$1: AnyRef)Boolean` -[accessible: true] `method asInstanceOf[T0]=> T0` -[accessible: true] `method ensuring(cond: Boolean)Object` -[accessible: true] `method ensuring(cond: Boolean, msg: => Any)Object` -[accessible: true] `method ensuring(cond: Object => Boolean)Object` -[accessible: true] `method ensuring(cond: Object => Boolean, msg: => Any)Object` -[accessible: true] `method eq(x$1: AnyRef)Boolean` -[accessible: true] `method equals(x$1: Any)Boolean` -[accessible: true] `method formatted(fmtstr: String)String` -[accessible: true] `method hashCode()Int` -[accessible: true] `method isInstanceOf[T0]=> Boolean` -[accessible: true] `method ne(x$1: AnyRef)Boolean` -[accessible: true] `method notify()Unit` -[accessible: true] `method notifyAll()Unit` -[accessible: true] `method synchronized[T0](x$1: T0)T0` -[accessible: true] `method toString()String` -[accessible: true] `method wait()Unit` -[accessible: true] `method wait(x$1: Long)Unit` -[accessible: true] `method wait(x$1: Long, x$2: Int)Unit` -[accessible: true] `method x=> Object` -[accessible: true] `method →[B](y: B)(Object, B)` -[accessible: true] `value __leftOfArrowObject` -[accessible: true] `value __resultOfEnsuringObject` -[accessible: true] `value selfAny` -[accessible: false] `method clone()Object` -[accessible: false] `method finalize()Unit` +retrieved 29 members +[inaccessible] protected[package lang] def clone(): Object +[inaccessible] protected[package lang] def finalize(): Unit +def +(other: String): String +def ->[B](y: B): (Object, B) +def ensuring(cond: Boolean): Object +def ensuring(cond: Boolean,msg: => Any): Object +def ensuring(cond: Object => Boolean): Object +def ensuring(cond: Object => Boolean,msg: => Any): Object +def equals(x$1: Any): Boolean +def formatted(fmtstr: String): String +def hashCode(): Int +def toString(): String +def →[B](y: B): (Object, B) +final def !=(x$1: Any): Boolean +final def ##(): Int +final def ==(x$1: Any): Boolean +final def asInstanceOf[T0]: T0 +final def eq(x$1: AnyRef): Boolean +final def isInstanceOf[T0]: Boolean +final def ne(x$1: AnyRef): Boolean +final def notify(): Unit +final def notifyAll(): Unit +final def synchronized[T0](x$1: T0): T0 +final def wait(): Unit +final def wait(x$1: Long): Unit +final def wait(x$1: Long,x$2: Int): Unit ================================================================================ askTypeCompletion at Foo.scala(7,7) ================================================================================ [response] askTypeCompletion at (7,7) -retrieved 36 members -[accessible: true] `method !=(x$1: Any)Boolean` -[accessible: true] `method !=(x$1: AnyRef)Boolean` -[accessible: true] `method ##()Int` -[accessible: true] `method +(other: String)String` -[accessible: true] `method ->[B](y: B)(Object, B)` -[accessible: true] `method ==(x$1: Any)Boolean` -[accessible: true] `method ==(x$1: AnyRef)Boolean` -[accessible: true] `method asInstanceOf[T0]=> T0` -[accessible: true] `method ensuring(cond: Boolean)Object` -[accessible: true] `method ensuring(cond: Boolean, msg: => Any)Object` -[accessible: true] `method ensuring(cond: Object => Boolean)Object` -[accessible: true] `method ensuring(cond: Object => Boolean, msg: => Any)Object` -[accessible: true] `method eq(x$1: AnyRef)Boolean` -[accessible: true] `method equals(x$1: Any)Boolean` -[accessible: true] `method formatted(fmtstr: String)String` -[accessible: true] `method hashCode()Int` -[accessible: true] `method isInstanceOf[T0]=> Boolean` -[accessible: true] `method ne(x$1: AnyRef)Boolean` -[accessible: true] `method notify()Unit` -[accessible: true] `method notifyAll()Unit` -[accessible: true] `method synchronized[T0](x$1: T0)T0` -[accessible: true] `method toString()String` -[accessible: true] `method wait()Unit` -[accessible: true] `method wait(x$1: Long)Unit` -[accessible: true] `method wait(x$1: Long, x$2: Int)Unit` -[accessible: true] `method x=> Object` -[accessible: true] `method →[B](y: B)(Object, B)` -[accessible: true] `value __leftOfArrowObject` -[accessible: true] `value __resultOfEnsuringObject` -[accessible: true] `value selfAny` -[accessible: false] `method clone()Object` -[accessible: false] `method finalize()Unit` +retrieved 29 members +[inaccessible] protected[package lang] def clone(): Object +[inaccessible] protected[package lang] def finalize(): Unit +def +(other: String): String +def ->[B](y: B): (Object, B) +def ensuring(cond: Boolean): Object +def ensuring(cond: Boolean,msg: => Any): Object +def ensuring(cond: Object => Boolean): Object +def ensuring(cond: Object => Boolean,msg: => Any): Object +def equals(x$1: Any): Boolean +def formatted(fmtstr: String): String +def hashCode(): Int +def toString(): String +def →[B](y: B): (Object, B) +final def !=(x$1: Any): Boolean +final def ##(): Int +final def ==(x$1: Any): Boolean +final def asInstanceOf[T0]: T0 +final def eq(x$1: AnyRef): Boolean +final def isInstanceOf[T0]: Boolean +final def ne(x$1: AnyRef): Boolean +final def notify(): Unit +final def notifyAll(): Unit +final def synchronized[T0](x$1: T0): T0 +final def wait(): Unit +final def wait(x$1: Long): Unit +final def wait(x$1: Long,x$2: Int): Unit ================================================================================ diff --git a/test/files/presentation/ide-bug-1000475/src/Foo.scala b/test/files/presentation/ide-bug-1000475/src/Foo.scala index b963bb7a88..5dd6b7d00d 100644 --- a/test/files/presentation/ide-bug-1000475/src/Foo.scala +++ b/test/files/presentation/ide-bug-1000475/src/Foo.scala @@ -1,7 +1,7 @@ class Foo { val v = new Object v.toS/*!*/ - + val m = Map(1 -> new Object) m(1).toS/*!*/ m(1)./*!*/ diff --git a/test/files/presentation/ide-bug-1000531.check b/test/files/presentation/ide-bug-1000531.check index a28ecb3437..d8c7a369f7 100644 --- a/test/files/presentation/ide-bug-1000531.check +++ b/test/files/presentation/ide-bug-1000531.check @@ -3,127 +3,120 @@ reload: CrashOnLoad.scala askTypeCompletion at CrashOnLoad.scala(6,12) ================================================================================ [response] askTypeCompletion at (6,12) -retrieved 126 members -[accessible: true] `class GroupedIteratorIterator[B]#GroupedIterator` -[accessible: true] `method !=(x$1: Any)Boolean` -[accessible: true] `method !=(x$1: AnyRef)Boolean` -[accessible: true] `method ##()Int` -[accessible: true] `method +(other: String)String` -[accessible: true] `method ++[B >: B](that: => scala.collection.GenTraversableOnce[B])Iterator[B]` -[accessible: true] `method ->[B](y: B)(java.util.Iterator[B], B)` -[accessible: true] `method /:[B](z: B)(op: (B, B) => B)B` -[accessible: true] `method /:\[A1 >: B](z: A1)(op: (A1, A1) => A1)A1` -[accessible: true] `method :\[B](z: B)(op: (B, B) => B)B` -[accessible: true] `method ==(x$1: Any)Boolean` -[accessible: true] `method ==(x$1: AnyRef)Boolean` -[accessible: true] `method addString(b: StringBuilder)StringBuilder` -[accessible: true] `method addString(b: StringBuilder, sep: String)StringBuilder` -[accessible: true] `method addString(b: StringBuilder, start: String, sep: String, end: String)StringBuilder` -[accessible: true] `method aggregate[B](z: B)(seqop: (B, B) => B, combop: (B, B) => B)B` -[accessible: true] `method asInstanceOf[T0]=> T0` -[accessible: true] `method buffered=> scala.collection.BufferedIterator[B]` -[accessible: true] `method collectFirst[B](pf: PartialFunction[B,B])Option[B]` -[accessible: true] `method collect[B](pf: PartialFunction[B,B])Iterator[B]` -[accessible: true] `method contains(elem: Any)Boolean` -[accessible: true] `method copyToArray[B >: B](xs: Array[B])Unit` -[accessible: true] `method copyToArray[B >: B](xs: Array[B], start: Int)Unit` -[accessible: true] `method copyToArray[B >: B](xs: Array[B], start: Int, len: Int)Unit` -[accessible: true] `method copyToBuffer[B >: B](dest: scala.collection.mutable.Buffer[B])Unit` -[accessible: true] `method corresponds[B](that: scala.collection.GenTraversableOnce[B])(p: (B, B) => Boolean)Boolean` -[accessible: true] `method count(p: B => Boolean)Int` -[accessible: true] `method drop(n: Int)Iterator[B]` -[accessible: true] `method dropWhile(p: B => Boolean)Iterator[B]` -[accessible: true] `method duplicate=> (Iterator[B], Iterator[B])` -[accessible: true] `method ensuring(cond: Boolean)java.util.Iterator[B]` -[accessible: true] `method ensuring(cond: Boolean, msg: => Any)java.util.Iterator[B]` -[accessible: true] `method ensuring(cond: java.util.Iterator[B] => Boolean)java.util.Iterator[B]` -[accessible: true] `method ensuring(cond: java.util.Iterator[B] => Boolean, msg: => Any)java.util.Iterator[B]` -[accessible: true] `method eq(x$1: AnyRef)Boolean` -[accessible: true] `method equals(x$1: Any)Boolean` -[accessible: true] `method exists(p: B => Boolean)Boolean` -[accessible: true] `method filter(p: B => Boolean)Iterator[B]` -[accessible: true] `method filterNot(p: B => Boolean)Iterator[B]` -[accessible: true] `method find(p: B => Boolean)Option[B]` -[accessible: true] `method flatMap[B](f: B => scala.collection.GenTraversableOnce[B])Iterator[B]` -[accessible: true] `method foldLeft[B](z: B)(op: (B, B) => B)B` -[accessible: true] `method foldRight[B](z: B)(op: (B, B) => B)B` -[accessible: true] `method fold[A1 >: B](z: A1)(op: (A1, A1) => A1)A1` -[accessible: true] `method forall(p: B => Boolean)Boolean` -[accessible: true] `method foreach[U](f: B => U)Unit` -[accessible: true] `method formatted(fmtstr: String)String` -[accessible: true] `method grouped[B >: B](size: Int)Iterator[B]#GroupedIterator[B]` -[accessible: true] `method hasDefiniteSize=> Boolean` -[accessible: true] `method hasNext()Boolean` -[accessible: true] `method hashCode()Int` -[accessible: true] `method indexOf[B >: B](elem: B)Int` -[accessible: true] `method indexWhere(p: B => Boolean)Int` -[accessible: true] `method isEmpty=> Boolean` -[accessible: true] `method isInstanceOf[T0]=> Boolean` -[accessible: true] `method isTraversableAgain=> Boolean` -[accessible: true] `method length=> Int` -[accessible: true] `method map[B](f: B => B)Iterator[B]` -[accessible: true] `method maxBy[B](f: B => B)(implicit cmp: Ordering[B])B` -[accessible: true] `method max[B >: B](implicit cmp: Ordering[B])B` -[accessible: true] `method minBy[B](f: B => B)(implicit cmp: Ordering[B])B` -[accessible: true] `method min[B >: B](implicit cmp: Ordering[B])B` -[accessible: true] `method mkString(sep: String)String` -[accessible: true] `method mkString(start: String, sep: String, end: String)String` -[accessible: true] `method mkString=> String` -[accessible: true] `method ne(x$1: AnyRef)Boolean` -[accessible: true] `method next()B` -[accessible: true] `method nonEmpty=> Boolean` -[accessible: true] `method notify()Unit` -[accessible: true] `method notifyAll()Unit` -[accessible: true] `method padTo[A1 >: B](len: Int, elem: A1)Iterator[A1]` -[accessible: true] `method partition(p: B => Boolean)(Iterator[B], Iterator[B])` -[accessible: true] `method patch[B >: B](from: Int, patchElems: Iterator[B], replaced: Int)Iterator[B]` -[accessible: true] `method product[B >: B](implicit num: Numeric[B])B` -[accessible: true] `method reduceLeftOption[B >: B](op: (B, B) => B)Option[B]` -[accessible: true] `method reduceLeft[B >: B](op: (B, B) => B)B` -[accessible: true] `method reduceOption[A1 >: B](op: (A1, A1) => A1)Option[A1]` -[accessible: true] `method reduceRightOption[B >: B](op: (B, B) => B)Option[B]` -[accessible: true] `method reduceRight[B >: B](op: (B, B) => B)B` -[accessible: true] `method reduce[A1 >: B](op: (A1, A1) => A1)A1` -[accessible: true] `method remove()Unit` -[accessible: true] `method sameElements(that: Iterator[_])Boolean` -[accessible: true] `method scanLeft[B](z: B)(op: (B, B) => B)Iterator[B]` -[accessible: true] `method scanRight[B](z: B)(op: (B, B) => B)Iterator[B]` -[accessible: true] `method seq=> Iterator[B]` -[accessible: true] `method size=> Int` -[accessible: true] `method slice(from: Int, until: Int)Iterator[B]` -[accessible: true] `method sliding[B >: B](size: Int, step: Int)Iterator[B]#GroupedIterator[B]` -[accessible: true] `method span(p: B => Boolean)(Iterator[B], Iterator[B])` -[accessible: true] `method sum[B >: B](implicit num: Numeric[B])B` -[accessible: true] `method synchronized[T0](x$1: T0)T0` -[accessible: true] `method take(n: Int)Iterator[B]` -[accessible: true] `method takeWhile(p: B => Boolean)Iterator[B]` -[accessible: true] `method toArray[B >: B](implicit evidence$1: scala.reflect.ClassTag[B])Array[B]` -[accessible: true] `method toBuffer[B >: B]=> scala.collection.mutable.Buffer[B]` -[accessible: true] `method toIndexedSeq=> scala.collection.immutable.IndexedSeq[B]` -[accessible: true] `method toIterable=> Iterable[B]` -[accessible: true] `method toIterator=> Iterator[B]` -[accessible: true] `method toList=> List[B]` -[accessible: true] `method toMap[T, U](implicit ev: <:<[B,(T, U)])scala.collection.immutable.Map[T,U]` -[accessible: true] `method toSeq=> Seq[B]` -[accessible: true] `method toSet[B >: B]=> scala.collection.immutable.Set[B]` -[accessible: true] `method toStream=> scala.collection.immutable.Stream[B]` -[accessible: true] `method toString()String` -[accessible: true] `method toTraversable=> Traversable[B]` -[accessible: true] `method toVector=> Vector[B]` -[accessible: true] `method to[Col[_]](implicit cbf: scala.collection.generic.CanBuildFrom[Nothing,B,Col[B]])Col[B]` -[accessible: true] `method wait()Unit` -[accessible: true] `method wait(x$1: Long)Unit` -[accessible: true] `method wait(x$1: Long, x$2: Int)Unit` -[accessible: true] `method withFilter(p: B => Boolean)Iterator[B]` -[accessible: true] `method x=> java.util.Iterator[B]` -[accessible: true] `method zipAll[B, A1 >: B, B1 >: B](that: Iterator[B], thisElem: A1, thatElem: B1)Iterator[(A1, B1)]` -[accessible: true] `method zipWithIndex=> Iterator[(B, Int)]` -[accessible: true] `method zip[B](that: Iterator[B])Iterator[(B, B)]` -[accessible: true] `method →[B](y: B)(java.util.Iterator[B], B)` -[accessible: true] `value __leftOfArrowjava.util.Iterator[B]` -[accessible: true] `value __resultOfEnsuringjava.util.Iterator[B]` -[accessible: true] `value selfAny` -[accessible: false] `method clone()Object` -[accessible: false] `method finalize()Unit` -[accessible: false] `method reversed=> List[B]` +retrieved 117 members +[inaccessible] protected[package lang] def clone(): Object +[inaccessible] protected[package lang] def finalize(): Unit +[inaccessible] protected[this] def reversed: List[B] +class GroupedIterator[B >: A] extends AbstractIterator[Seq[B]] with Iterator[Seq[B]] +def +(other: String): String +def ++[B >: B](that: => scala.collection.GenTraversableOnce[B]): Iterator[B] +def ->[B](y: B): (java.util.Iterator[B], B) +def /:[B](z: B)(op: (B, B) => B): B +def :\[B](z: B)(op: (B, B) => B): B +def addString(b: StringBuilder): StringBuilder +def addString(b: StringBuilder,sep: String): StringBuilder +def addString(b: StringBuilder,start: String,sep: String,end: String): StringBuilder +def aggregate[B](z: => B)(seqop: (B, B) => B,combop: (B, B) => B): B +def buffered: scala.collection.BufferedIterator[B] +def collectFirst[B](pf: PartialFunction[B,B]): Option[B] +def collect[B](pf: PartialFunction[B,B]): Iterator[B] +def contains(elem: Any): Boolean +def copyToArray[B >: B](xs: Array[B]): Unit +def copyToArray[B >: B](xs: Array[B],start: Int): Unit +def copyToArray[B >: B](xs: Array[B],start: Int,len: Int): Unit +def copyToBuffer[B >: B](dest: scala.collection.mutable.Buffer[B]): Unit +def corresponds[B](that: scala.collection.GenTraversableOnce[B])(p: (B, B) => Boolean): Boolean +def count(p: B => Boolean): Int +def drop(n: Int): Iterator[B] +def dropWhile(p: B => Boolean): Iterator[B] +def duplicate: (Iterator[B], Iterator[B]) +def ensuring(cond: Boolean): java.util.Iterator[B] +def ensuring(cond: Boolean,msg: => Any): java.util.Iterator[B] +def ensuring(cond: java.util.Iterator[B] => Boolean): java.util.Iterator[B] +def ensuring(cond: java.util.Iterator[B] => Boolean,msg: => Any): java.util.Iterator[B] +def equals(x$1: Any): Boolean +def exists(p: B => Boolean): Boolean +def filter(p: B => Boolean): Iterator[B] +def filterNot(p: B => Boolean): Iterator[B] +def find(p: B => Boolean): Option[B] +def flatMap[B](f: B => scala.collection.GenTraversableOnce[B]): Iterator[B] +def foldLeft[B](z: B)(op: (B, B) => B): B +def foldRight[B](z: B)(op: (B, B) => B): B +def fold[A1 >: B](z: A1)(op: (A1, A1) => A1): A1 +def forall(p: B => Boolean): Boolean +def foreach[U](f: B => U): Unit +def formatted(fmtstr: String): String +def grouped[B >: B](size: Int): Iterator[B]#GroupedIterator[B] +def hasDefiniteSize: Boolean +def hasNext(): Boolean +def hashCode(): Int +def indexOf[B >: B](elem: B): Int +def indexWhere(p: B => Boolean): Int +def isEmpty: Boolean +def isTraversableAgain: Boolean +def length: Int +def map[B](f: B => B): Iterator[B] +def maxBy[B](f: B => B)(implicit cmp: Ordering[B]): B +def max[B >: B](implicit cmp: Ordering[B]): B +def minBy[B](f: B => B)(implicit cmp: Ordering[B]): B +def min[B >: B](implicit cmp: Ordering[B]): B +def mkString(sep: String): String +def mkString(start: String,sep: String,end: String): String +def mkString: String +def next(): B +def nonEmpty: Boolean +def padTo[A1 >: B](len: Int,elem: A1): Iterator[A1] +def partition(p: B => Boolean): (Iterator[B], Iterator[B]) +def patch[B >: B](from: Int,patchElems: Iterator[B],replaced: Int): Iterator[B] +def product[B >: B](implicit num: Numeric[B]): B +def reduceLeftOption[B >: B](op: (B, B) => B): Option[B] +def reduceLeft[B >: B](op: (B, B) => B): B +def reduceOption[A1 >: B](op: (A1, A1) => A1): Option[A1] +def reduceRightOption[B >: B](op: (B, B) => B): Option[B] +def reduceRight[B >: B](op: (B, B) => B): B +def reduce[A1 >: B](op: (A1, A1) => A1): A1 +def remove(): Unit +def sameElements(that: Iterator[_]): Boolean +def scanLeft[B](z: B)(op: (B, B) => B): Iterator[B] +def scanRight[B](z: B)(op: (B, B) => B): Iterator[B] +def seq: Iterator[B] +def size: Int +def slice(from: Int,until: Int): Iterator[B] +def sliding[B >: B](size: Int,step: Int): Iterator[B]#GroupedIterator[B] +def span(p: B => Boolean): (Iterator[B], Iterator[B]) +def sum[B >: B](implicit num: Numeric[B]): B +def take(n: Int): Iterator[B] +def takeWhile(p: B => Boolean): Iterator[B] +def toArray[B >: B](implicit evidence$1: scala.reflect.ClassTag[B]): Array[B] +def toBuffer[B >: B]: scala.collection.mutable.Buffer[B] +def toIndexedSeq: scala.collection.immutable.IndexedSeq[B] +def toIterable: Iterable[B] +def toIterator: Iterator[B] +def toList: List[B] +def toMap[T, U](implicit ev: <:<[B,(T, U)]): scala.collection.immutable.Map[T,U] +def toSeq: Seq[B] +def toSet[B >: B]: scala.collection.immutable.Set[B] +def toStream: scala.collection.immutable.Stream[B] +def toString(): String +def toTraversable: Traversable[B] +def toVector: Vector[B] +def to[Col[_]](implicit cbf: scala.collection.generic.CanBuildFrom[Nothing,B,Col[B]]): Col[B] +def withFilter(p: B => Boolean): Iterator[B] +def zipAll[B, A1 >: B, B1 >: B](that: Iterator[B],thisElem: A1,thatElem: B1): Iterator[(A1, B1)] +def zipWithIndex: Iterator[(B, Int)] +def zip[B](that: Iterator[B]): Iterator[(B, B)] +def →[B](y: B): (java.util.Iterator[B], B) +final def !=(x$1: Any): Boolean +final def ##(): Int +final def ==(x$1: Any): Boolean +final def asInstanceOf[T0]: T0 +final def eq(x$1: AnyRef): Boolean +final def isInstanceOf[T0]: Boolean +final def ne(x$1: AnyRef): Boolean +final def notify(): Unit +final def notifyAll(): Unit +final def synchronized[T0](x$1: T0): T0 +final def wait(): Unit +final def wait(x$1: Long): Unit +final def wait(x$1: Long,x$2: Int): Unit ================================================================================ diff --git a/test/files/presentation/ide-bug-1000531/src/CrashOnLoad.scala b/test/files/presentation/ide-bug-1000531/src/CrashOnLoad.scala index 21d39c8923..878bbfa19e 100644 --- a/test/files/presentation/ide-bug-1000531/src/CrashOnLoad.scala +++ b/test/files/presentation/ide-bug-1000531/src/CrashOnLoad.scala @@ -1,7 +1,7 @@ /** When this files is opened within the IDE, a typing error is reported. */ class A[B] extends java.lang.Iterable[B] { import scala.collection.JavaConversions._ - def iterator = Iterator.empty - + def iterator = Iterator.empty + iterator. /*!*/ }
\ No newline at end of file diff --git a/test/files/presentation/ide-t1001326.check b/test/files/presentation/ide-t1001326.check deleted file mode 100644 index 0ac15faed4..0000000000 --- a/test/files/presentation/ide-t1001326.check +++ /dev/null @@ -1,4 +0,0 @@ -Unique OK -Unattributed OK -NeverModify OK -AlwaysParseTree OK
\ No newline at end of file diff --git a/test/files/presentation/ide-t1001326/src/a/A.scala b/test/files/presentation/ide-t1001326/src/a/A.scala deleted file mode 100644 index c82ca02231..0000000000 --- a/test/files/presentation/ide-t1001326/src/a/A.scala +++ /dev/null @@ -1,5 +0,0 @@ -package a - -class A { - def foo(s: String) = s + s -}
\ No newline at end of file diff --git a/test/files/presentation/implicit-member.check b/test/files/presentation/implicit-member.check index 111d06dfa8..3bd3d8af41 100644 --- a/test/files/presentation/implicit-member.check +++ b/test/files/presentation/implicit-member.check @@ -3,40 +3,34 @@ reload: ImplicitMember.scala askTypeCompletion at ImplicitMember.scala(7,7) ================================================================================ [response] askTypeCompletion at (7,7) -retrieved 39 members -[accessible: true] `class AppliedImplicitImplicit.AppliedImplicit` -[accessible: true] `method !=(x$1: Any)Boolean` -[accessible: true] `method !=(x$1: AnyRef)Boolean` -[accessible: true] `method ##()Int` -[accessible: true] `method +(other: String)String` -[accessible: true] `method ->[B](y: B)(Implicit.type, B)` -[accessible: true] `method ==(x$1: Any)Boolean` -[accessible: true] `method ==(x$1: AnyRef)Boolean` -[accessible: true] `method AppliedImplicit[A](x: A)Implicit.AppliedImplicit[A]` -[accessible: true] `method asInstanceOf[T0]=> T0` -[accessible: true] `method clone()Object` -[accessible: true] `method ensuring(cond: Boolean)Implicit.type` -[accessible: true] `method ensuring(cond: Boolean, msg: => Any)Implicit.type` -[accessible: true] `method ensuring(cond: Implicit.type => Boolean)Implicit.type` -[accessible: true] `method ensuring(cond: Implicit.type => Boolean, msg: => Any)Implicit.type` -[accessible: true] `method eq(x$1: AnyRef)Boolean` -[accessible: true] `method equals(x$1: Any)Boolean` -[accessible: true] `method finalize()Unit` -[accessible: true] `method formatted(fmtstr: String)String` -[accessible: true] `method hashCode()Int` -[accessible: true] `method isInstanceOf[T0]=> Boolean` -[accessible: true] `method ne(x$1: AnyRef)Boolean` -[accessible: true] `method notify()Unit` -[accessible: true] `method notifyAll()Unit` -[accessible: true] `method synchronized[T0](x$1: T0)T0` -[accessible: true] `method toString()String` -[accessible: true] `method wait()Unit` -[accessible: true] `method wait(x$1: Long)Unit` -[accessible: true] `method wait(x$1: Long, x$2: Int)Unit` -[accessible: true] `method x=> Implicit.type` -[accessible: true] `method →[B](y: B)(Implicit.type, B)` -[accessible: true] `value __leftOfArrowImplicit.type` -[accessible: true] `value __resultOfEnsuringImplicit.type` -[accessible: true] `value selfAny` -[accessible: true] `value xImplicit.type` +retrieved 32 members +def +(other: String): String +def ->[B](y: B): (Implicit.type, B) +def ensuring(cond: Boolean): Implicit.type +def ensuring(cond: Boolean,msg: => Any): Implicit.type +def ensuring(cond: Implicit.type => Boolean): Implicit.type +def ensuring(cond: Implicit.type => Boolean,msg: => Any): Implicit.type +def equals(x$1: Any): Boolean +def formatted(fmtstr: String): String +def hashCode(): Int +def toString(): String +def →[B](y: B): (Implicit.type, B) +final class AppliedImplicit[A] extends AnyRef +final def !=(x$1: Any): Boolean +final def ##(): Int +final def ==(x$1: Any): Boolean +final def asInstanceOf[T0]: T0 +final def eq(x$1: AnyRef): Boolean +final def isInstanceOf[T0]: Boolean +final def ne(x$1: AnyRef): Boolean +final def notify(): Unit +final def notifyAll(): Unit +final def synchronized[T0](x$1: T0): T0 +final def wait(): Unit +final def wait(x$1: Long): Unit +final def wait(x$1: Long,x$2: Int): Unit +implicit def AppliedImplicit[A](x: A): Implicit.AppliedImplicit[A] +private[this] val x: Implicit.type +protected[package lang] def clone(): Object +protected[package lang] def finalize(): Unit ================================================================================ diff --git a/test/files/presentation/implicit-member/src/ImplicitMember.scala b/test/files/presentation/implicit-member/src/ImplicitMember.scala index 06732f6dc6..a547b65a8e 100644 --- a/test/files/presentation/implicit-member/src/ImplicitMember.scala +++ b/test/files/presentation/implicit-member/src/ImplicitMember.scala @@ -1,8 +1,8 @@ object Implicit { final class AppliedImplicit[A](val x: A) - + implicit def AppliedImplicit[A](x: A): AppliedImplicit[A] = new AppliedImplicit(x) - + this./*!*/x }
\ No newline at end of file diff --git a/test/files/presentation/memory-leaks/MemoryLeaksTest.scala b/test/files/presentation/memory-leaks/MemoryLeaksTest.scala index 950569c880..f09c6f8e2c 100644 --- a/test/files/presentation/memory-leaks/MemoryLeaksTest.scala +++ b/test/files/presentation/memory-leaks/MemoryLeaksTest.scala @@ -2,8 +2,9 @@ import java.io.PrintWriter import java.io.FileOutputStream import java.util.Calendar +import scala.reflect.internal.util.BatchSourceFile +import scala.tools.nsc.interactive import scala.tools.nsc.interactive.tests._ -import scala.tools.nsc.util._ import scala.tools.nsc.io._ import scala.tools.nsc.doc @@ -25,7 +26,21 @@ import scala.tools.nsc.doc object Test extends InteractiveTest { final val mega = 1024 * 1024 - override val withDocComments = true + import interactive.Global + trait InteractiveScaladocAnalyzer extends interactive.InteractiveAnalyzer with doc.ScaladocAnalyzer { + val global : Global + override def newTyper(context: Context) = new Typer(context) with InteractiveTyper with ScaladocTyper { + override def canAdaptConstantTypeToLiteral = false + } + } + + private class ScaladocEnabledGlobal extends Global(settings, compilerReporter) { + override lazy val analyzer = new { + val global: ScaladocEnabledGlobal.this.type = ScaladocEnabledGlobal.this + } with InteractiveScaladocAnalyzer + } + + override def createGlobal: Global = new ScaladocEnabledGlobal override def execute(): Unit = memoryConsumptionTest() diff --git a/test/files/presentation/parse-invariants.check b/test/files/presentation/parse-invariants.check new file mode 100644 index 0000000000..32e9c846ab --- /dev/null +++ b/test/files/presentation/parse-invariants.check @@ -0,0 +1,5 @@ +NoNewSymbolsEntered OK +Unique OK +Unattributed OK +NeverModify OK +AlwaysParseTree OK diff --git a/test/files/presentation/ide-t1001326/Test.scala b/test/files/presentation/parse-invariants/Test.scala index 3091da4b40..128896ccaa 100644 --- a/test/files/presentation/ide-t1001326/Test.scala +++ b/test/files/presentation/parse-invariants/Test.scala @@ -3,19 +3,35 @@ import scala.reflect.internal.util.SourceFile import scala.tools.nsc.interactive.Response object Test extends InteractiveTest { - + override def execute(): Unit = { val sf = sourceFiles.find(_.file.name == "A.scala").head - uniqueParseTree_t1001326(sf) - unattributedParseTree_t1001326(sf) - neverModifyParseTree_t1001326(sf) - shouldAlwaysReturnParseTree_t1001326(sf) + noNewSymbols(sf) + uniqueParseTree(sf) + unattributedParseTree(sf) + neverModifyParseTree(sf) + shouldAlwaysReturnParseTree(sf) + } + + /** + * Asking for a parseTree should not enter any new symbols. + */ + private def noNewSymbols(sf: SourceFile) { + def nextId() = compiler.NoSymbol.newTermSymbol(compiler.TermName("dummy"), compiler.NoPosition, compiler.NoFlags).id + val id = nextId() + val tree = compiler.parseTree(sf) + val id2 = nextId() + if (id2 == id + 1) { + reporter.println("NoNewSymbolsEntered OK") + } else { + reporter.println("NoNewSymbolsEntered FAILED") + } } - + /** * Asking twice for a parseTree on the same source should always return a new tree */ - private def uniqueParseTree_t1001326(sf: SourceFile) { + private def uniqueParseTree(sf: SourceFile) { val parseTree1 = compiler.parseTree(sf) val parseTree2 = compiler.parseTree(sf) if (parseTree1 != parseTree2) { @@ -24,22 +40,22 @@ object Test extends InteractiveTest { reporter.println("Unique FAILED") } } - + /** * A parseTree should never contain any symbols or types */ - private def unattributedParseTree_t1001326(sf: SourceFile) { + private def unattributedParseTree(sf: SourceFile) { if (noSymbolsOrTypes(compiler.parseTree(sf))) { reporter.println("Unattributed OK") } else { reporter.println("Unattributed FAILED") } } - + /** * Once you have obtained a parseTree it should never change - */ - private def neverModifyParseTree_t1001326(sf: SourceFile) { + */ + private def neverModifyParseTree(sf: SourceFile) { val parsedTree = compiler.parseTree(sf) loadSourceAndWaitUntilTypechecked(sf) if (noSymbolsOrTypes(parsedTree)) { @@ -48,11 +64,11 @@ object Test extends InteractiveTest { reporter.println("NeverModify FAILED") } } - + /** * Should always return a parse tree */ - private def shouldAlwaysReturnParseTree_t1001326(sf: SourceFile) { + private def shouldAlwaysReturnParseTree(sf: SourceFile) { loadSourceAndWaitUntilTypechecked(sf) if (noSymbolsOrTypes(compiler.parseTree(sf))) { reporter.println("AlwaysParseTree OK") @@ -60,7 +76,7 @@ object Test extends InteractiveTest { reporter.println("AlwaysParseTree FAILED") } } - + /** * Load a source and block while it is type-checking. */ @@ -71,7 +87,7 @@ object Test extends InteractiveTest { res.get askLoadedTyped(sf).get } - + /** * Traverses a tree and makes sure that there are no types or symbols present in the tree with * the exception of the symbol for the package 'scala'. This is because that symbol will be @@ -79,13 +95,13 @@ object Test extends InteractiveTest { */ private def noSymbolsOrTypes(tree: compiler.Tree): Boolean = { tree.forAll { t => - (t.symbol == null || - t.symbol == compiler.NoSymbol || + (t.symbol == null || + t.symbol == compiler.NoSymbol || t.symbol == compiler.definitions.ScalaPackage // ignore the symbol for the scala package for now ) && ( - t.tpe == null || + t.tpe == null || t.tpe == compiler.NoType) } } - + }
\ No newline at end of file diff --git a/test/files/presentation/parse-invariants/src/a/A.scala b/test/files/presentation/parse-invariants/src/a/A.scala new file mode 100644 index 0000000000..1ae78cad05 --- /dev/null +++ b/test/files/presentation/parse-invariants/src/a/A.scala @@ -0,0 +1,138 @@ +package syntax + +object Terms { + object Literals { + 0 + 0l + 0f + 0d + 0xb33f + 'c' + "string" + """ + multi-line + string + """ + 'symbol + true + false + null + () + } + + object Patterns { + 0 match { case 0 => } + 1 match { case (0 | 1) => } + 2 match { case _: Int => } + 3 match { case _ => } + Some(0) match { case Some(0) => } + Some(0) match { case name @ Some(_) => } + Some(Some(0)) match { case nested @ Some(deeper @ Some(_)) => } + List(1, 2, 3) match { case unapplySeq @ List(1, 2, _*) => } + 0 match { case i if i > 0 => } + List(1) match { case _: List[t] => List.empty[t] } + } + + object New { + class Foo + trait Bar + new Foo + new Foo { selfie => } + new Foo with Bar + new { val early = 1 } with Bar + new { val name = "anon "} + } + + def tuple = (1, 'two, "three") + def lambda = (x: Int, y: Int) => x + y + def lambda2 = (_: Int) + (_: Int) + def blocks = { { {}; {} }; {} } + def ascription = (1: Int) + def select = Nil.size + def method1 = "s".replace("foo", "bar") + def method2 = "s" + "s" + def method3 = Nil.foreach { e => } + def method4 = 1 :: 2 :: 3 :: Nil + def if1 = if (true) true else false + def if2 = if (true) true + def `return`: Int = { return 0 } + def `throw` = throw new Exception + def `match` = 0 match { case 0 => case _ => } + def `try` = try 0 catch { case _ => } finally 0 + def `while` = while(true) 0 + def `do while` = do 0 while(true) + def `for` = for (i <- 1 to 10; if i % 2 == 0; j = i + 1) j + def `for yield` = for (a <- List(List(1)); b <- a; c = b * 2) yield b + def interpolation = s"$tuple and maybe also $blocks" + def assign = { var x = 1; x = 2 } + def assign2 = { object o { var x = 1 }; o.x = 2 } + def update = { val v = collection.mutable.Seq(1); v(0) = 2 } + def `this` = this +} + +object Types { + type Reference = scala.App + type Tuple = (Int, String, Double) + type Function = (Int, String) => Double + type Refined = Int { val meta: Any } + type Lambda = ({ type F[T] = List[T] })#F[_] + type Infix = Int Either String + type Application = List[Int] + type Existential = List[T] forSome { type T } + object O { type T = Int } + type Dependent = O.T + class O { type T = Int } + type Selection = O#T +} + +object Definitions { + private val x1 = 0 + private[this] val x2 = 0 + private[Definitions] val x3 = 0 + protected val x4 = 0 + protected[AcessManagement] val x5 = 0 + val x1 = 1 + val x2: Int = 1 + val x3, y3 = 1 + lazy val x4 = 1 + implicit val x5 = 1 + final val x6 = 1 + lazy final val x7 = 1 + val Some(x8) = Some(0) + var x9 = 1 + var x10, y10 = 1 + var x11: Int = 1 + + implicit def implicitView: Option[Int] = None + def implicitArg1(implicit i: Int) = i + 2 + def implicitArg2[T: Fooable] = implicitly[Fooable[T]] + def bound1[T <: Int](x: T): T = x + def bound2[T >: Any](x: T): T = x + def bound3[T <% Int](x: T): Int = x + def vararg(args: Int*) = args.toList + def sum(x: Int, y: Int) = x + y + def multipleArgLists(x: Int)(y: Int) = x + y + + type _0 = Int + type _1[T] = List[T] + type _2[A, B] = Either[A, B] + + class Val(value: Int) extends AnyVal + implicit class Impl(value: Int) { def foo = "foo" } + abstract class Abs + sealed class Sealed + class Child extends Sealed + case class Point(x: Int, y: Int) + + trait Fooable[T] + trait Barable with Fooable[Barable] + + object Foo + object Foo with Fooable[Foo] + case object Zero +} + +package Packages { + package object PackageObject + package Nested { package Deeper { } } +} diff --git a/test/files/presentation/partial-fun.check b/test/files/presentation/partial-fun.check new file mode 100644 index 0000000000..0352d5e5c8 --- /dev/null +++ b/test/files/presentation/partial-fun.check @@ -0,0 +1,2 @@ +reload: PartialFun.scala +ArrayBuffer() diff --git a/test/files/presentation/partial-fun/Runner.scala b/test/files/presentation/partial-fun/Runner.scala new file mode 100644 index 0000000000..3edd5bb5b0 --- /dev/null +++ b/test/files/presentation/partial-fun/Runner.scala @@ -0,0 +1,10 @@ +import scala.tools.nsc.interactive.tests.InteractiveTest + +object Test extends InteractiveTest { + override def runDefaultTests() { + sourceFiles foreach (src => askLoadedTyped(src).get) + super.runDefaultTests() + + println(compiler.unitOfFile.values.map(_.problems).mkString("", "\n", "")) + } +} diff --git a/test/files/presentation/partial-fun/src/PartialFun.scala b/test/files/presentation/partial-fun/src/PartialFun.scala new file mode 100644 index 0000000000..4657898ed1 --- /dev/null +++ b/test/files/presentation/partial-fun/src/PartialFun.scala @@ -0,0 +1,5 @@ +class A { + def foo { + val x: PartialFunction[Int, Int] = ({ case 0 => 0 }) + } +} diff --git a/test/files/presentation/ping-pong.check b/test/files/presentation/ping-pong.check index f714c1b4da..220bdf33b2 100644 --- a/test/files/presentation/ping-pong.check +++ b/test/files/presentation/ping-pong.check @@ -3,100 +3,88 @@ reload: PingPong.scala askTypeCompletion at PingPong.scala(10,23) ================================================================================ [response] askTypeCompletion at (10,23) -retrieved 40 members -[accessible: true] `method !=(x$1: Any)Boolean` -[accessible: true] `method !=(x$1: AnyRef)Boolean` -[accessible: true] `method ##()Int` -[accessible: true] `method +(other: String)String` -[accessible: true] `method ->[B](y: B)(Pong, B)` -[accessible: true] `method ==(x$1: Any)Boolean` -[accessible: true] `method ==(x$1: AnyRef)Boolean` -[accessible: true] `method asInstanceOf[T0]=> T0` -[accessible: true] `method ensuring(cond: Boolean)Pong` -[accessible: true] `method ensuring(cond: Boolean, msg: => Any)Pong` -[accessible: true] `method ensuring(cond: Pong => Boolean)Pong` -[accessible: true] `method ensuring(cond: Pong => Boolean, msg: => Any)Pong` -[accessible: true] `method eq(x$1: AnyRef)Boolean` -[accessible: true] `method equals(x$1: Any)Boolean` -[accessible: true] `method formatted(fmtstr: String)String` -[accessible: true] `method hashCode()Int` -[accessible: true] `method isInstanceOf[T0]=> Boolean` -[accessible: true] `method ne(x$1: AnyRef)Boolean` -[accessible: true] `method notify()Unit` -[accessible: true] `method notifyAll()Unit` -[accessible: true] `method poke()Unit` -[accessible: true] `method synchronized[T0](x$1: T0)T0` -[accessible: true] `method toString()String` -[accessible: true] `method wait()Unit` -[accessible: true] `method wait(x$1: Long)Unit` -[accessible: true] `method wait(x$1: Long, x$2: Int)Unit` -[accessible: true] `method x=> Pong` -[accessible: true] `method →[B](y: B)(Pong, B)` -[accessible: true] `value __leftOfArrowPong` -[accessible: true] `value __resultOfEnsuringPong` -[accessible: true] `value nameString` -[accessible: true] `value selfAny` -[accessible: false] `method clone()Object` -[accessible: false] `method finalize()Unit` -[accessible: false] `value pingPing` +retrieved 32 members +[inaccessible] private[this] val ping: Ping +[inaccessible] protected[package lang] def clone(): Object +[inaccessible] protected[package lang] def finalize(): Unit +def +(other: String): String +def ->[B](y: B): (Pong, B) +def ensuring(cond: Boolean): Pong +def ensuring(cond: Boolean,msg: => Any): Pong +def ensuring(cond: Pong => Boolean): Pong +def ensuring(cond: Pong => Boolean,msg: => Any): Pong +def equals(x$1: Any): Boolean +def formatted(fmtstr: String): String +def hashCode(): Int +def poke(): Unit +def →[B](y: B): (Pong, B) +final def !=(x$1: Any): Boolean +final def ##(): Int +final def ==(x$1: Any): Boolean +final def asInstanceOf[T0]: T0 +final def eq(x$1: AnyRef): Boolean +final def isInstanceOf[T0]: Boolean +final def ne(x$1: AnyRef): Boolean +final def notify(): Unit +final def notifyAll(): Unit +final def synchronized[T0](x$1: T0): T0 +final def wait(): Unit +final def wait(x$1: Long): Unit +final def wait(x$1: Long,x$2: Int): Unit +override def toString(): String +private[this] val name: String ================================================================================ askTypeCompletion at PingPong.scala(19,20) ================================================================================ [response] askTypeCompletion at (19,20) -retrieved 40 members -[accessible: true] `method !=(x$1: Any)Boolean` -[accessible: true] `method !=(x$1: AnyRef)Boolean` -[accessible: true] `method ##()Int` -[accessible: true] `method +(other: String)String` -[accessible: true] `method ->[B](y: B)(Ping, B)` -[accessible: true] `method ==(x$1: Any)Boolean` -[accessible: true] `method ==(x$1: AnyRef)Boolean` -[accessible: true] `method asInstanceOf[T0]=> T0` -[accessible: true] `method ensuring(cond: Boolean)Ping` -[accessible: true] `method ensuring(cond: Boolean, msg: => Any)Ping` -[accessible: true] `method ensuring(cond: Ping => Boolean)Ping` -[accessible: true] `method ensuring(cond: Ping => Boolean, msg: => Any)Ping` -[accessible: true] `method eq(x$1: AnyRef)Boolean` -[accessible: true] `method equals(x$1: Any)Boolean` -[accessible: true] `method formatted(fmtstr: String)String` -[accessible: true] `method hashCode()Int` -[accessible: true] `method isInstanceOf[T0]=> Boolean` -[accessible: true] `method loop=> Unit` -[accessible: true] `method name=> String` -[accessible: true] `method ne(x$1: AnyRef)Boolean` -[accessible: true] `method notify()Unit` -[accessible: true] `method notifyAll()Unit` -[accessible: true] `method poke=> Unit` -[accessible: true] `method synchronized[T0](x$1: T0)T0` -[accessible: true] `method toString()String` -[accessible: true] `method wait()Unit` -[accessible: true] `method wait(x$1: Long)Unit` -[accessible: true] `method wait(x$1: Long, x$2: Int)Unit` -[accessible: true] `method x=> Ping` -[accessible: true] `method →[B](y: B)(Ping, B)` -[accessible: true] `value __leftOfArrowPing` -[accessible: true] `value __resultOfEnsuringPing` -[accessible: true] `value pongPong` -[accessible: true] `value selfAny` -[accessible: false] `method clone()Object` -[accessible: false] `method finalize()Unit` +retrieved 33 members +[inaccessible] protected[package lang] def clone(): Object +[inaccessible] protected[package lang] def finalize(): Unit +def +(other: String): String +def ->[B](y: B): (Ping, B) +def ensuring(cond: Boolean): Ping +def ensuring(cond: Boolean,msg: => Any): Ping +def ensuring(cond: Ping => Boolean): Ping +def ensuring(cond: Ping => Boolean,msg: => Any): Ping +def equals(x$1: Any): Boolean +def formatted(fmtstr: String): String +def hashCode(): Int +def loop: Unit +def name: String +def poke: Unit +def →[B](y: B): (Ping, B) +final def !=(x$1: Any): Boolean +final def ##(): Int +final def ==(x$1: Any): Boolean +final def asInstanceOf[T0]: T0 +final def eq(x$1: AnyRef): Boolean +final def isInstanceOf[T0]: Boolean +final def ne(x$1: AnyRef): Boolean +final def notify(): Unit +final def notifyAll(): Unit +final def synchronized[T0](x$1: T0): T0 +final def wait(): Unit +final def wait(x$1: Long): Unit +final def wait(x$1: Long,x$2: Int): Unit +override def toString(): String +private[this] val pong: Pong ================================================================================ askType at PingPong.scala(8,10) ================================================================================ -[response] askTypeAt at (8,10) +[response] askTypeAt (8,10) def loop: Unit = Ping.this.poke() ================================================================================ askType at PingPong.scala(10,10) ================================================================================ -[response] askTypeAt at (10,10) +[response] askTypeAt (10,10) def poke: Unit = Ping.this.pong.poke() ================================================================================ askType at PingPong.scala(17,10) ================================================================================ -[response] askTypeAt at (17,10) +[response] askTypeAt (17,10) private[this] val name: String = "pong" ================================================================================ diff --git a/test/files/presentation/ping-pong/src/PingPong.scala b/test/files/presentation/ping-pong/src/PingPong.scala index 08bb4e3f2d..94f52c4658 100644 --- a/test/files/presentation/ping-pong/src/PingPong.scala +++ b/test/files/presentation/ping-pong/src/PingPong.scala @@ -2,21 +2,21 @@ class Ping { val pong = new Pong(this) - + def name = "ping" - def loop/*?*/ { poke() } - + def loop/*?*/ { poke() } + def poke/*?*/ { pong./*!*/poke() } - - override def toString = name + + override def toString = name } class Pong(ping: Ping) { val name/*?*/ = "pong" - + def poke() { ping./*!*/poke() } - + override def toString = name }
\ No newline at end of file diff --git a/test/files/presentation/random.check b/test/files/presentation/random.check index fce4b69fb3..fb3500aeea 100644 --- a/test/files/presentation/random.check +++ b/test/files/presentation/random.check @@ -2,7 +2,7 @@ reload: Random.scala askType at Random.scala(18,14) ================================================================================ -[response] askTypeAt at (18,14) +[response] askTypeAt (18,14) val filter: Int => Boolean = try { java.this.lang.Integer.parseInt(args.apply(0)) match { case 1 => ((x: Int) => x.%(2).!=(0)) @@ -16,12 +16,12 @@ val filter: Int => Boolean = try { askType at Random.scala(19,30) ================================================================================ -[response] askTypeAt at (19,30) +[response] askTypeAt (19,30) 0 ================================================================================ askType at Random.scala(26,12) ================================================================================ -[response] askTypeAt at (26,12) +[response] askTypeAt (26,12) _ ================================================================================ diff --git a/test/files/presentation/random/src/Random.scala b/test/files/presentation/random/src/Random.scala index 4fff783fa4..af76a28f47 100644 --- a/test/files/presentation/random/src/Random.scala +++ b/test/files/presentation/random/src/Random.scala @@ -4,16 +4,16 @@ import java.io._ import java.net.{InetAddress,ServerSocket,Socket,SocketException} import java.util.Random -/** - * Simple client/server application using Java sockets. - * - * The server simply generates random integer values and - * the clients provide a filter function to the server - * to get only values they interested in (eg. even or - * odd values, and so on). +/** + * Simple client/server application using Java sockets. + * + * The server simply generates random integer values and + * the clients provide a filter function to the server + * to get only values they interested in (eg. even or + * odd values, and so on). */ object randomclient { - + def main(args: Array[String]) { val filter/*?*/ = try { Integer.parseInt(args(0)/*?*/) match { diff --git a/test/files/presentation/scope-completion-1.check b/test/files/presentation/scope-completion-1.check index 93c637370d..63f956b239 100644 --- a/test/files/presentation/scope-completion-1.check +++ b/test/files/presentation/scope-completion-1.check @@ -4,16 +4,16 @@ askScopeCompletion at Completions.scala(6,2) ================================================================================ [response] askScopeCompletion at (6,2) retrieved 3 members -[accessible: true] `class Completion1test.Completion1` -[accessible: true] `constructor Completion1()test.Completion1` -[accessible: true] `object Completion2test.Completion2.type` +class Completion1 extends AnyRef +def <init>(): test.Completion1 +object Completion2 ================================================================================ askScopeCompletion at Completions.scala(10,2) ================================================================================ [response] askScopeCompletion at (10,2) retrieved 3 members -[accessible: true] `class Completion1test.Completion1` -[accessible: true] `constructor Completion2()test.Completion2.type` -[accessible: true] `object Completion2test.Completion2.type` +class Completion1 extends AnyRef +def <init>(): test.Completion2.type +object Completion2 ================================================================================ diff --git a/test/files/presentation/scope-completion-2.check b/test/files/presentation/scope-completion-2.check index 462671da40..d94f7a4b56 100644 --- a/test/files/presentation/scope-completion-2.check +++ b/test/files/presentation/scope-completion-2.check @@ -4,30 +4,30 @@ askScopeCompletion at Completions.scala(15,2) ================================================================================ [response] askScopeCompletion at (15,2) retrieved 10 members -[accessible: true] `class Cc1Completion1.this.Cc1` -[accessible: true] `class Co1test.Completion1.Co1` -[accessible: true] `class Completion1test.Completion1` -[accessible: true] `constructor Completion1()test.Completion1` -[accessible: true] `method fc1=> Int` -[accessible: true] `method fo1=> Int` -[accessible: true] `object Completion1test.Completion1.type` -[accessible: true] `value ctest.Completion1` -[accessible: true] `value vc1Int` -[accessible: true] `value vo1Int` +class Completion1 extends AnyRef +def <init>(): test.Completion1 +object Completion1 +private class Cc1 extends AnyRef +private class Co1 extends AnyRef +private def fc1: Int +private def fo1: Int +private[this] val c: test.Completion1 +private[this] val vc1: Int +private[this] val vo1: Int ================================================================================ askScopeCompletion at Completions.scala(29,2) ================================================================================ [response] askScopeCompletion at (29,2) retrieved 10 members -[accessible: true] `class Cc1test.Completion1.c.Cc1` -[accessible: true] `class Co1test.Completion1.Co1` -[accessible: true] `class Completion1test.Completion1` -[accessible: true] `constructor Completion1()test.Completion1.type` -[accessible: true] `method fc1=> Int` -[accessible: true] `method fo1=> Int` -[accessible: true] `object Completion1test.Completion1.type` -[accessible: true] `value ctest.Completion1` -[accessible: true] `value vc1Int` -[accessible: true] `value vo1Int` +class Completion1 extends AnyRef +def <init>(): test.Completion1.type +object Completion1 +private class Cc1 extends AnyRef +private class Co1 extends AnyRef +private def fc1: Int +private def fo1: Int +private[this] val c: test.Completion1 +private[this] val vc1: Int +private[this] val vo1: Int ================================================================================ diff --git a/test/files/presentation/scope-completion-3.check b/test/files/presentation/scope-completion-3.check index 119fc1de5f..b70a7d5c6b 100644 --- a/test/files/presentation/scope-completion-3.check +++ b/test/files/presentation/scope-completion-3.check @@ -3,109 +3,85 @@ reload: Completions.scala askScopeCompletion at Completions.scala(75,2) ================================================================================ [response] askScopeCompletion at (75,2) -retrieved 49 members -[accessible: true] `class Base1test.Base1` -[accessible: true] `class Cb1Completion1.this.Cb1` -[accessible: true] `class Cc1Completion1.this.Cc1` -[accessible: true] `class Cc2Completion1.this.Cc2` -[accessible: true] `class Completion1test.Completion1` -[accessible: true] `class Ct1Completion1.this.Ct1` -[accessible: true] `constructor Completion1()test.Completion1` -[accessible: true] `method fb1=> Int` -[accessible: true] `method fb3=> Int` -[accessible: true] `method fc1=> Int` -[accessible: true] `method fc2=> Int` -[accessible: true] `method ft1=> Int` -[accessible: true] `method ft3=> Int` -[accessible: true] `object Completion2test.Completion2.type` -[accessible: true] `object Ob1Completion1.this.Ob1.type` -[accessible: true] `object Oc1Completion1.this.Oc1.type` -[accessible: true] `object Oc2Completion1.this.Oc2.type` -[accessible: true] `object Ot1Completion1.this.Ot1.type` -[accessible: true] `trait Trait1test.Trait1` -[accessible: true] `type tb1Completion1.this.tb1` -[accessible: true] `type tb3Completion1.this.tb3` -[accessible: true] `type tc1Completion1.this.tc1` -[accessible: true] `type tc2Completion1.this.tc2` -[accessible: true] `type tt1Completion1.this.tt1` -[accessible: true] `type tt3Completion1.this.tt3` -[accessible: true] `value vb1Int` -[accessible: true] `value vb3Int` -[accessible: true] `value vc1Int` -[accessible: true] `value vc2Int` -[accessible: true] `value vt1Int` -[accessible: true] `value vt3Int` -[accessible: true] `variable rb1Int` -[accessible: true] `variable rb3Int` -[accessible: true] `variable rc1Int` -[accessible: true] `variable rc2Int` -[accessible: true] `variable rt1Int` -[accessible: true] `variable rt3Int` -[accessible: false] `class Cb2Completion1.this.Cb2` -[accessible: false] `class Ct2Completion1.this.Ct2` -[accessible: false] `method fb2=> Int` -[accessible: false] `method ft2=> Int` -[accessible: false] `object Ob2Completion1.this.Ob2.type` -[accessible: false] `object Ot2Completion1.this.Ot2.type` -[accessible: false] `type tb2Completion1.this.tb2` -[accessible: false] `type tt2Completion1.this.tt2` -[accessible: false] `value vb2Int` -[accessible: false] `value vt2Int` -[accessible: false] `variable rb2Int` -[accessible: false] `variable rt2Int` +retrieved 37 members +abstract class Base1 extends AnyRef +abstract trait Trait1 extends AnyRef +class Cb1 extends AnyRef +class Cc1 extends AnyRef +class Completion1 extends Base1 with Trait1 +class Ct1 extends AnyRef +def <init>(): test.Completion1 +def fb1: Int +def fc1: Int +def ft1: Int +object Completion2 +object Ob1 +object Oc1 +object Ot1 +override def fb3: Int +override def ft3: Int +override type tb3 = Completion1.this.tb3 +override type tt3 = Completion1.this.tt3 +private class Cc2 extends AnyRef +private def fc2: Int +private object Oc2 +private type tc2 = Completion1.this.tc2 +private[this] val vb1: Int +private[this] val vb3: Int +private[this] val vc1: Int +private[this] val vc2: Int +private[this] val vt1: Int +private[this] val vt3: Int +private[this] var rb1: Int +private[this] var rb3: Int +private[this] var rc1: Int +private[this] var rc2: Int +private[this] var rt1: Int +private[this] var rt3: Int +type tb1 = Completion1.this.tb1 +type tc1 = Completion1.this.tc1 +type tt1 = Completion1.this.tt1 ================================================================================ askScopeCompletion at Completions.scala(104,2) ================================================================================ [response] askScopeCompletion at (104,2) -retrieved 49 members -[accessible: true] `class Base1test.Base1` -[accessible: true] `class Cb1test.Completion2.Cb1` -[accessible: true] `class Co1test.Completion2.Co1` -[accessible: true] `class Co2test.Completion2.Co2` -[accessible: true] `class Completion1test.Completion1` -[accessible: true] `class Ct1test.Completion2.Ct1` -[accessible: true] `constructor Completion2()test.Completion2.type` -[accessible: true] `method fb1=> Int` -[accessible: true] `method fb3=> Int` -[accessible: true] `method fo1=> Int` -[accessible: true] `method fo2=> Int` -[accessible: true] `method ft1=> Int` -[accessible: true] `method ft3=> Int` -[accessible: true] `object Completion2test.Completion2.type` -[accessible: true] `object Ob1test.Completion2.Ob1.type` -[accessible: true] `object Oo1test.Completion2.Oo1.type` -[accessible: true] `object Oo2test.Completion2.Oo2.type` -[accessible: true] `object Ot1test.Completion2.Ot1.type` -[accessible: true] `trait Trait1test.Trait1` -[accessible: true] `type tb1test.Completion2.tb1` -[accessible: true] `type tb3test.Completion2.tb3` -[accessible: true] `type to1test.Completion2.to1` -[accessible: true] `type to2test.Completion2.to2` -[accessible: true] `type tt1test.Completion2.tt1` -[accessible: true] `type tt3test.Completion2.tt3` -[accessible: true] `value vb1Int` -[accessible: true] `value vb3Int` -[accessible: true] `value vo1Int` -[accessible: true] `value vo2Int` -[accessible: true] `value vt1Int` -[accessible: true] `value vt3Int` -[accessible: true] `variable rb1Int` -[accessible: true] `variable rb3Int` -[accessible: true] `variable ro1Int` -[accessible: true] `variable ro2Int` -[accessible: true] `variable rt1Int` -[accessible: true] `variable rt3Int` -[accessible: false] `class Cb2test.Completion2.Cb2` -[accessible: false] `class Ct2test.Completion2.Ct2` -[accessible: false] `method fb2=> Int` -[accessible: false] `method ft2=> Int` -[accessible: false] `object Ob2test.Completion2.Ob2.type` -[accessible: false] `object Ot2test.Completion2.Ot2.type` -[accessible: false] `type tb2test.Completion2.tb2` -[accessible: false] `type tt2test.Completion2.tt2` -[accessible: false] `value vb2Int` -[accessible: false] `value vt2Int` -[accessible: false] `variable rb2Int` -[accessible: false] `variable rt2Int` +retrieved 37 members +abstract class Base1 extends AnyRef +abstract trait Trait1 extends AnyRef +class Cb1 extends AnyRef +class Co1 extends AnyRef +class Completion1 extends Base1 with Trait1 +class Ct1 extends AnyRef +def <init>(): test.Completion2.type +def fb1: Int +def fo1: Int +def ft1: Int +object Completion2 +object Ob1 +object Oo1 +object Ot1 +override def fb3: Int +override def ft3: Int +override type tb3 = test.Completion2.tb3 +override type tt3 = test.Completion2.tt3 +private class Co2 extends AnyRef +private def fo2: Int +private object Oo2 +private type to2 = test.Completion2.to2 +private[this] val vb1: Int +private[this] val vb3: Int +private[this] val vo1: Int +private[this] val vo2: Int +private[this] val vt1: Int +private[this] val vt3: Int +private[this] var rb1: Int +private[this] var rb3: Int +private[this] var ro1: Int +private[this] var ro2: Int +private[this] var rt1: Int +private[this] var rt3: Int +type tb1 = test.Completion2.tb1 +type to1 = test.Completion2.to1 +type tt1 = test.Completion2.tt1 ================================================================================ diff --git a/test/files/presentation/scope-completion-4.check b/test/files/presentation/scope-completion-4.check index f6241cf7f7..59c47464c4 100644 --- a/test/files/presentation/scope-completion-4.check +++ b/test/files/presentation/scope-completion-4.check @@ -4,290 +4,290 @@ askScopeCompletion at Completions.scala(12,8) ================================================================================ [response] askScopeCompletion at (12,8) retrieved 8 members -[accessible: true] `class Completion1test.Completion1` -[accessible: true] `class cCompletion1.this.c` -[accessible: true] `class fcfc` -[accessible: true] `class ffcffc` -[accessible: true] `constructor Completion1()test.Completion1` -[accessible: true] `method f=> Unit` -[accessible: true] `method ff=> Unit` -[accessible: true] `method fff=> Unit` +class Completion1 extends AnyRef +class c extends AnyRef +class fc extends AnyRef +class ffc extends AnyRef +def <init>(): test.Completion1 +def f: Unit +def ff: Unit +def fff: Unit ================================================================================ askScopeCompletion at Completions.scala(15,6) ================================================================================ [response] askScopeCompletion at (15,6) retrieved 8 members -[accessible: true] `class Completion1test.Completion1` -[accessible: true] `class cCompletion1.this.c` -[accessible: true] `class fcfc` -[accessible: true] `class ffcffc` -[accessible: true] `constructor Completion1()test.Completion1` -[accessible: true] `method f=> Unit` -[accessible: true] `method ff=> Unit` -[accessible: true] `method fff=> Unit` +class Completion1 extends AnyRef +class c extends AnyRef +class fc extends AnyRef +class ffc extends AnyRef +def <init>(): test.Completion1 +def f: Unit +def ff: Unit +def fff: Unit ================================================================================ askScopeCompletion at Completions.scala(18,8) ================================================================================ [response] askScopeCompletion at (18,8) retrieved 8 members -[accessible: true] `class Completion1test.Completion1` -[accessible: true] `class cCompletion1.this.c` -[accessible: true] `class fcfc` -[accessible: true] `class ffcffc` -[accessible: true] `constructor ffc()ffc` -[accessible: true] `method f=> Unit` -[accessible: true] `method ff=> Unit` -[accessible: true] `method fff=> Unit` +class Completion1 extends AnyRef +class c extends AnyRef +class fc extends AnyRef +class ffc extends AnyRef +def <init>(): ffc +def f: Unit +def ff: Unit +def fff: Unit ================================================================================ askScopeCompletion at Completions.scala(21,6) ================================================================================ [response] askScopeCompletion at (21,6) retrieved 8 members -[accessible: true] `class Completion1test.Completion1` -[accessible: true] `class cCompletion1.this.c` -[accessible: true] `class fcfc` -[accessible: true] `class ffcffc` -[accessible: true] `constructor Completion1()test.Completion1` -[accessible: true] `method f=> Unit` -[accessible: true] `method ff=> Unit` -[accessible: true] `method fff=> Unit` +class Completion1 extends AnyRef +class c extends AnyRef +class fc extends AnyRef +class ffc extends AnyRef +def <init>(): test.Completion1 +def f: Unit +def ff: Unit +def fff: Unit ================================================================================ askScopeCompletion at Completions.scala(24,4) ================================================================================ [response] askScopeCompletion at (24,4) retrieved 6 members -[accessible: true] `class Completion1test.Completion1` -[accessible: true] `class cCompletion1.this.c` -[accessible: true] `class fcfc` -[accessible: true] `constructor Completion1()test.Completion1` -[accessible: true] `method f=> Unit` -[accessible: true] `method ff=> Unit` +class Completion1 extends AnyRef +class c extends AnyRef +class fc extends AnyRef +def <init>(): test.Completion1 +def f: Unit +def ff: Unit ================================================================================ askScopeCompletion at Completions.scala(29,8) ================================================================================ [response] askScopeCompletion at (29,8) retrieved 8 members -[accessible: true] `class Completion1test.Completion1` -[accessible: true] `class cCompletion1.this.c` -[accessible: true] `class fccfc.this.fcc` -[accessible: true] `class fcfc` -[accessible: true] `constructor fc()fc` -[accessible: true] `method f=> Unit` -[accessible: true] `method fcf=> Unit` -[accessible: true] `method ff=> Unit` +class Completion1 extends AnyRef +class c extends AnyRef +class fc extends AnyRef +class fcc extends AnyRef +def <init>(): fc +def f: Unit +def fcf: Unit +def ff: Unit ================================================================================ askScopeCompletion at Completions.scala(32,6) ================================================================================ [response] askScopeCompletion at (32,6) retrieved 8 members -[accessible: true] `class Completion1test.Completion1` -[accessible: true] `class cCompletion1.this.c` -[accessible: true] `class fccfc.this.fcc` -[accessible: true] `class fcfc` -[accessible: true] `constructor fc()fc` -[accessible: true] `method f=> Unit` -[accessible: true] `method fcf=> Unit` -[accessible: true] `method ff=> Unit` +class Completion1 extends AnyRef +class c extends AnyRef +class fc extends AnyRef +class fcc extends AnyRef +def <init>(): fc +def f: Unit +def fcf: Unit +def ff: Unit ================================================================================ askScopeCompletion at Completions.scala(35,8) ================================================================================ [response] askScopeCompletion at (35,8) retrieved 8 members -[accessible: true] `class Completion1test.Completion1` -[accessible: true] `class cCompletion1.this.c` -[accessible: true] `class fccfc.this.fcc` -[accessible: true] `class fcfc` -[accessible: true] `constructor fcc()fc.this.fcc` -[accessible: true] `method f=> Unit` -[accessible: true] `method fcf=> Unit` -[accessible: true] `method ff=> Unit` +class Completion1 extends AnyRef +class c extends AnyRef +class fc extends AnyRef +class fcc extends AnyRef +def <init>(): fc.this.fcc +def f: Unit +def fcf: Unit +def ff: Unit ================================================================================ askScopeCompletion at Completions.scala(38,6) ================================================================================ [response] askScopeCompletion at (38,6) retrieved 8 members -[accessible: true] `class Completion1test.Completion1` -[accessible: true] `class cCompletion1.this.c` -[accessible: true] `class fccfc.this.fcc` -[accessible: true] `class fcfc` -[accessible: true] `constructor fc()fc` -[accessible: true] `method f=> Unit` -[accessible: true] `method fcf=> Unit` -[accessible: true] `method ff=> Unit` +class Completion1 extends AnyRef +class c extends AnyRef +class fc extends AnyRef +class fcc extends AnyRef +def <init>(): fc +def f: Unit +def fcf: Unit +def ff: Unit ================================================================================ askScopeCompletion at Completions.scala(41,4) ================================================================================ [response] askScopeCompletion at (41,4) retrieved 6 members -[accessible: true] `class Completion1test.Completion1` -[accessible: true] `class cCompletion1.this.c` -[accessible: true] `class fcfc` -[accessible: true] `constructor Completion1()test.Completion1` -[accessible: true] `method f=> Unit` -[accessible: true] `method ff=> Unit` +class Completion1 extends AnyRef +class c extends AnyRef +class fc extends AnyRef +def <init>(): test.Completion1 +def f: Unit +def ff: Unit ================================================================================ askScopeCompletion at Completions.scala(44,2) ================================================================================ [response] askScopeCompletion at (44,2) retrieved 4 members -[accessible: true] `class Completion1test.Completion1` -[accessible: true] `class cCompletion1.this.c` -[accessible: true] `constructor Completion1()test.Completion1` -[accessible: true] `method f=> Unit` +class Completion1 extends AnyRef +class c extends AnyRef +def <init>(): test.Completion1 +def f: Unit ================================================================================ askScopeCompletion at Completions.scala(51,8) ================================================================================ [response] askScopeCompletion at (51,8) retrieved 8 members -[accessible: true] `class Completion1test.Completion1` -[accessible: true] `class cCompletion1.this.c` -[accessible: true] `class ccc.this.cc` -[accessible: true] `class ccccc.this.ccc` -[accessible: true] `constructor ccc()cc.this.ccc` -[accessible: true] `method ccf=> Unit` -[accessible: true] `method cf=> Unit` -[accessible: true] `method f=> Unit` +class Completion1 extends AnyRef +class c extends AnyRef +class cc extends AnyRef +class ccc extends AnyRef +def <init>(): cc.this.ccc +def ccf: Unit +def cf: Unit +def f: Unit ================================================================================ askScopeCompletion at Completions.scala(54,6) ================================================================================ [response] askScopeCompletion at (54,6) retrieved 8 members -[accessible: true] `class Completion1test.Completion1` -[accessible: true] `class cCompletion1.this.c` -[accessible: true] `class ccc.this.cc` -[accessible: true] `class ccccc.this.ccc` -[accessible: true] `constructor cc()c.this.cc` -[accessible: true] `method ccf=> Unit` -[accessible: true] `method cf=> Unit` -[accessible: true] `method f=> Unit` +class Completion1 extends AnyRef +class c extends AnyRef +class cc extends AnyRef +class ccc extends AnyRef +def <init>(): c.this.cc +def ccf: Unit +def cf: Unit +def f: Unit ================================================================================ askScopeCompletion at Completions.scala(57,8) ================================================================================ [response] askScopeCompletion at (57,8) retrieved 8 members -[accessible: true] `class Completion1test.Completion1` -[accessible: true] `class cCompletion1.this.c` -[accessible: true] `class ccc.this.cc` -[accessible: true] `class ccccc.this.ccc` -[accessible: true] `constructor cc()c.this.cc` -[accessible: true] `method ccf=> Unit` -[accessible: true] `method cf=> Unit` -[accessible: true] `method f=> Unit` +class Completion1 extends AnyRef +class c extends AnyRef +class cc extends AnyRef +class ccc extends AnyRef +def <init>(): c.this.cc +def ccf: Unit +def cf: Unit +def f: Unit ================================================================================ askScopeCompletion at Completions.scala(60,6) ================================================================================ [response] askScopeCompletion at (60,6) retrieved 8 members -[accessible: true] `class Completion1test.Completion1` -[accessible: true] `class cCompletion1.this.c` -[accessible: true] `class ccc.this.cc` -[accessible: true] `class ccccc.this.ccc` -[accessible: true] `constructor cc()c.this.cc` -[accessible: true] `method ccf=> Unit` -[accessible: true] `method cf=> Unit` -[accessible: true] `method f=> Unit` +class Completion1 extends AnyRef +class c extends AnyRef +class cc extends AnyRef +class ccc extends AnyRef +def <init>(): c.this.cc +def ccf: Unit +def cf: Unit +def f: Unit ================================================================================ askScopeCompletion at Completions.scala(63,4) ================================================================================ [response] askScopeCompletion at (63,4) retrieved 6 members -[accessible: true] `class Completion1test.Completion1` -[accessible: true] `class cCompletion1.this.c` -[accessible: true] `class ccc.this.cc` -[accessible: true] `constructor c()Completion1.this.c` -[accessible: true] `method cf=> Unit` -[accessible: true] `method f=> Unit` +class Completion1 extends AnyRef +class c extends AnyRef +class cc extends AnyRef +def <init>(): Completion1.this.c +def cf: Unit +def f: Unit ================================================================================ askScopeCompletion at Completions.scala(68,8) ================================================================================ [response] askScopeCompletion at (68,8) retrieved 8 members -[accessible: true] `class Completion1test.Completion1` -[accessible: true] `class cCompletion1.this.c` -[accessible: true] `class ccc.this.cc` -[accessible: true] `class cfccfc` -[accessible: true] `constructor cfc()cfc` -[accessible: true] `method cf=> Unit` -[accessible: true] `method cff=> Unit` -[accessible: true] `method f=> Unit` +class Completion1 extends AnyRef +class c extends AnyRef +class cc extends AnyRef +class cfc extends AnyRef +def <init>(): cfc +def cf: Unit +def cff: Unit +def f: Unit ================================================================================ askScopeCompletion at Completions.scala(71,6) ================================================================================ [response] askScopeCompletion at (71,6) retrieved 8 members -[accessible: true] `class Completion1test.Completion1` -[accessible: true] `class cCompletion1.this.c` -[accessible: true] `class ccc.this.cc` -[accessible: true] `class cfccfc` -[accessible: true] `constructor c()Completion1.this.c` -[accessible: true] `method cf=> Unit` -[accessible: true] `method cff=> Unit` -[accessible: true] `method f=> Unit` +class Completion1 extends AnyRef +class c extends AnyRef +class cc extends AnyRef +class cfc extends AnyRef +def <init>(): Completion1.this.c +def cf: Unit +def cff: Unit +def f: Unit ================================================================================ askScopeCompletion at Completions.scala(74,8) ================================================================================ [response] askScopeCompletion at (74,8) retrieved 8 members -[accessible: true] `class Completion1test.Completion1` -[accessible: true] `class cCompletion1.this.c` -[accessible: true] `class ccc.this.cc` -[accessible: true] `class cfccfc` -[accessible: true] `constructor c()Completion1.this.c` -[accessible: true] `method cf=> Unit` -[accessible: true] `method cff=> Unit` -[accessible: true] `method f=> Unit` +class Completion1 extends AnyRef +class c extends AnyRef +class cc extends AnyRef +class cfc extends AnyRef +def <init>(): Completion1.this.c +def cf: Unit +def cff: Unit +def f: Unit ================================================================================ askScopeCompletion at Completions.scala(77,6) ================================================================================ [response] askScopeCompletion at (77,6) retrieved 8 members -[accessible: true] `class Completion1test.Completion1` -[accessible: true] `class cCompletion1.this.c` -[accessible: true] `class ccc.this.cc` -[accessible: true] `class cfccfc` -[accessible: true] `constructor c()Completion1.this.c` -[accessible: true] `method cf=> Unit` -[accessible: true] `method cff=> Unit` -[accessible: true] `method f=> Unit` +class Completion1 extends AnyRef +class c extends AnyRef +class cc extends AnyRef +class cfc extends AnyRef +def <init>(): Completion1.this.c +def cf: Unit +def cff: Unit +def f: Unit ================================================================================ askScopeCompletion at Completions.scala(80,4) ================================================================================ [response] askScopeCompletion at (80,4) retrieved 6 members -[accessible: true] `class Completion1test.Completion1` -[accessible: true] `class cCompletion1.this.c` -[accessible: true] `class ccc.this.cc` -[accessible: true] `constructor c()Completion1.this.c` -[accessible: true] `method cf=> Unit` -[accessible: true] `method f=> Unit` +class Completion1 extends AnyRef +class c extends AnyRef +class cc extends AnyRef +def <init>(): Completion1.this.c +def cf: Unit +def f: Unit ================================================================================ askScopeCompletion at Completions.scala(83,2) ================================================================================ [response] askScopeCompletion at (83,2) retrieved 4 members -[accessible: true] `class Completion1test.Completion1` -[accessible: true] `class cCompletion1.this.c` -[accessible: true] `constructor Completion1()test.Completion1` -[accessible: true] `method f=> Unit` +class Completion1 extends AnyRef +class c extends AnyRef +def <init>(): test.Completion1 +def f: Unit ================================================================================ diff --git a/test/files/presentation/scope-completion-import.check b/test/files/presentation/scope-completion-import.check index 33b498c1ee..50197e5822 100644 --- a/test/files/presentation/scope-completion-import.check +++ b/test/files/presentation/scope-completion-import.check @@ -3,191 +3,183 @@ reload: Completions.scala askScopeCompletion at Completions.scala(23,4) ================================================================================ [response] askScopeCompletion at (23,4) -retrieved 18 members -[accessible: true] `class Ctest.C` -[accessible: true] `class Foo_1test.Foo_1` -[accessible: true] `class Foo_2test.Foo_2` -[accessible: true] `class Foo_3test.Foo_3` -[accessible: true] `class Footest.Foo` -[accessible: true] `constructor Foo()test.Foo` -[accessible: true] `method fCCC=> Int` -[accessible: true] `method fOOO=> Int` -[accessible: true] `object Otest.O.type` -[accessible: true] `value otest.O.type` -[accessible: true] `value vCCCInt` -[accessible: true] `value vOOOInt` -[accessible: true] `variable rCCCInt` -[accessible: true] `variable rOOOInt` -[accessible: false] `value pVCCCInt` -[accessible: false] `value pVOOOInt` -[accessible: false] `variable pRCCCInt` -[accessible: false] `variable pROOOInt` +retrieved 16 members +[inaccessible] private[this] val pVOOO: Int +[inaccessible] private[this] var pROOO: Int +class C extends AnyRef +class Foo extends AnyRef +class Foo_1 extends AnyRef +class Foo_2 extends AnyRef +class Foo_3 extends AnyRef +def <init>(): test.Foo +def fCCC: Int +def fOOO: Int +object O +private[this] val vCCC: Int +private[this] val vOOO: Int +private[this] var rCCC: Int +private[this] var rOOO: Int +val o: test.O.type ================================================================================ askScopeCompletion at Completions.scala(27,4) ================================================================================ [response] askScopeCompletion at (27,4) -retrieved 17 members -[accessible: true] `class Ctest.C` -[accessible: true] `class Foo_1test.Foo_1` -[accessible: true] `class Foo_2test.Foo_2` -[accessible: true] `class Foo_3test.Foo_3` -[accessible: true] `class Footest.Foo` -[accessible: true] `constructor Foo()test.Foo` -[accessible: true] `method fCCC=> Int` -[accessible: true] `method fOOO=> Int` -[accessible: true] `object Otest.O.type` -[accessible: true] `value vCCCInt` -[accessible: true] `value vOOOInt` -[accessible: true] `variable rCCCInt` -[accessible: true] `variable rOOOInt` -[accessible: false] `value pVCCCInt` -[accessible: false] `value pVOOOInt` -[accessible: false] `variable pRCCCInt` -[accessible: false] `variable pROOOInt` +retrieved 15 members +[inaccessible] private[this] val pVOOO: Int +[inaccessible] private[this] var pROOO: Int +class C extends AnyRef +class Foo extends AnyRef +class Foo_1 extends AnyRef +class Foo_2 extends AnyRef +class Foo_3 extends AnyRef +def <init>(): test.Foo +def fCCC: Int +def fOOO: Int +object O +private[this] val vCCC: Int +private[this] val vOOO: Int +private[this] var rCCC: Int +private[this] var rOOO: Int ================================================================================ askScopeCompletion at Completions.scala(32,4) ================================================================================ [response] askScopeCompletion at (32,4) retrieved 13 members -[accessible: true] `class Ctest.C` -[accessible: true] `class Foo_1test.Foo_1` -[accessible: true] `class Foo_2test.Foo_2` -[accessible: true] `class Foo_3test.Foo_3` -[accessible: true] `class Footest.Foo` -[accessible: true] `constructor Foo()test.Foo` -[accessible: true] `method fCCC=> Int` -[accessible: true] `object Otest.O.type` -[accessible: true] `value ctest.C` -[accessible: true] `value vCCCInt` -[accessible: true] `variable rCCCInt` -[accessible: false] `value pVCCCInt` -[accessible: false] `variable pRCCCInt` +[inaccessible] private[this] val pVCCC: Int +[inaccessible] private[this] var pRCCC: Int +class C extends AnyRef +class Foo extends AnyRef +class Foo_1 extends AnyRef +class Foo_2 extends AnyRef +class Foo_3 extends AnyRef +def <init>(): test.Foo +def fCCC: Int +object O +private[this] val vCCC: Int +private[this] var rCCC: Int +val c: test.C ================================================================================ askScopeCompletion at Completions.scala(35,5) ================================================================================ [response] askScopeCompletion at (35,5) retrieved 8 members -[accessible: true] `class Ctest.C` -[accessible: true] `class Foo_1test.Foo_1` -[accessible: true] `class Foo_2test.Foo_2` -[accessible: true] `class Foo_3test.Foo_3` -[accessible: true] `class Footest.Foo` -[accessible: true] `constructor Foo()test.Foo` -[accessible: true] `object Otest.O.type` -[accessible: true] `value ctest.C` +class C extends AnyRef +class Foo extends AnyRef +class Foo_1 extends AnyRef +class Foo_2 extends AnyRef +class Foo_3 extends AnyRef +def <init>(): test.Foo +object O +val c: test.C ================================================================================ askScopeCompletion at Completions.scala(38,5) ================================================================================ [response] askScopeCompletion at (38,5) retrieved 13 members -[accessible: true] `class Ctest.C` -[accessible: true] `class Foo_1test.Foo_1` -[accessible: true] `class Foo_2test.Foo_2` -[accessible: true] `class Foo_3test.Foo_3` -[accessible: true] `class Footest.Foo` -[accessible: true] `constructor Foo()test.Foo` -[accessible: true] `method fCCC=> Int` -[accessible: true] `object Otest.O.type` -[accessible: true] `value ctest.C` -[accessible: true] `value vCCCInt` -[accessible: true] `variable rCCCInt` -[accessible: false] `value pVCCCInt` -[accessible: false] `variable pRCCCInt` +[inaccessible] private[this] val pVCCC: Int +[inaccessible] private[this] var pRCCC: Int +class C extends AnyRef +class Foo extends AnyRef +class Foo_1 extends AnyRef +class Foo_2 extends AnyRef +class Foo_3 extends AnyRef +def <init>(): test.Foo +def fCCC: Int +object O +private[this] val vCCC: Int +private[this] var rCCC: Int +val c: test.C ================================================================================ askScopeCompletion at Completions.scala(40,5) ================================================================================ [response] askScopeCompletion at (40,5) retrieved 18 members -[accessible: true] `class Ctest.C` -[accessible: true] `class Foo_1test.Foo_1` -[accessible: true] `class Foo_2test.Foo_2` -[accessible: true] `class Foo_3test.Foo_3` -[accessible: true] `class Footest.Foo` -[accessible: true] `constructor Foo()test.Foo` -[accessible: true] `method fCCC=> Int` -[accessible: true] `method fOOO=> Int` -[accessible: true] `object Otest.O.type` -[accessible: true] `value ctest.C` -[accessible: true] `value vCCCInt` -[accessible: true] `value vOOOInt` -[accessible: true] `variable rCCCInt` -[accessible: true] `variable rOOOInt` -[accessible: false] `value pVCCCInt` -[accessible: false] `value pVOOOInt` -[accessible: false] `variable pRCCCInt` -[accessible: false] `variable pROOOInt` +[inaccessible] private[this] val pVCCC: Int +[inaccessible] private[this] val pVOOO: Int +[inaccessible] private[this] var pRCCC: Int +[inaccessible] private[this] var pROOO: Int +class C extends AnyRef +class Foo extends AnyRef +class Foo_1 extends AnyRef +class Foo_2 extends AnyRef +class Foo_3 extends AnyRef +def <init>(): test.Foo +def fCCC: Int +def fOOO: Int +object O +private[this] val vCCC: Int +private[this] val vOOO: Int +private[this] var rCCC: Int +private[this] var rOOO: Int +val c: test.C ================================================================================ askScopeCompletion at Completions.scala(49,4) ================================================================================ [response] askScopeCompletion at (49,4) -retrieved 18 members -[accessible: true] `class Ctest.C` -[accessible: true] `class Foo_1test.Foo_1` -[accessible: true] `class Foo_2test.Foo_2` -[accessible: true] `class Foo_3test.Foo_3` -[accessible: true] `class Footest.Foo` -[accessible: true] `constructor Foo_1()test.Foo_1` -[accessible: true] `method bar=> Unit` -[accessible: true] `method fCCC=> Int` -[accessible: true] `method fOOO=> Int` -[accessible: true] `object Otest.O.type` -[accessible: true] `value vCCCInt` -[accessible: true] `value vOOOInt` -[accessible: true] `variable rCCCInt` -[accessible: true] `variable rOOOInt` -[accessible: false] `value pVCCCInt` -[accessible: false] `value pVOOOInt` -[accessible: false] `variable pRCCCInt` -[accessible: false] `variable pROOOInt` +retrieved 16 members +[inaccessible] private[this] val pVOOO: Int +[inaccessible] private[this] var pROOO: Int +class C extends AnyRef +class Foo extends AnyRef +class Foo_1 extends AnyRef +class Foo_2 extends AnyRef +class Foo_3 extends AnyRef +def <init>(): test.Foo_1 +def bar: Unit +def fCCC: Int +def fOOO: Int +object O +private[this] val vCCC: Int +private[this] val vOOO: Int +private[this] var rCCC: Int +private[this] var rOOO: Int ================================================================================ askScopeCompletion at Completions.scala(59,4) ================================================================================ [response] askScopeCompletion at (59,4) -retrieved 19 members -[accessible: true] `class Ctest.C` -[accessible: true] `class Foo_1test.Foo_1` -[accessible: true] `class Foo_2test.Foo_2` -[accessible: true] `class Foo_3test.Foo_3` -[accessible: true] `class Footest.Foo` -[accessible: true] `constructor Foo_2()test.Foo_2` -[accessible: true] `method bar=> Unit` -[accessible: true] `method fCCC=> Int` -[accessible: true] `method fOOO=> Int` -[accessible: true] `object Otest.O.type` -[accessible: true] `value otest.O.type` -[accessible: true] `value vCCCInt` -[accessible: true] `value vOOOInt` -[accessible: true] `variable rCCCInt` -[accessible: true] `variable rOOOInt` -[accessible: false] `value pVCCCInt` -[accessible: false] `value pVOOOInt` -[accessible: false] `variable pRCCCInt` -[accessible: false] `variable pROOOInt` +retrieved 17 members +[inaccessible] private[this] val pVOOO: Int +[inaccessible] private[this] var pROOO: Int +class C extends AnyRef +class Foo extends AnyRef +class Foo_1 extends AnyRef +class Foo_2 extends AnyRef +class Foo_3 extends AnyRef +def <init>(): test.Foo_2 +def bar: Unit +def fCCC: Int +def fOOO: Int +object O +private[this] val o: test.O.type +private[this] val vCCC: Int +private[this] val vOOO: Int +private[this] var rCCC: Int +private[this] var rOOO: Int ================================================================================ askScopeCompletion at Completions.scala(69,4) ================================================================================ [response] askScopeCompletion at (69,4) retrieved 14 members -[accessible: true] `class Ctest.C` -[accessible: true] `class Foo_1test.Foo_1` -[accessible: true] `class Foo_2test.Foo_2` -[accessible: true] `class Foo_3test.Foo_3` -[accessible: true] `class Footest.Foo` -[accessible: true] `constructor Foo_3()test.Foo_3` -[accessible: true] `method bar=> Unit` -[accessible: true] `method fCCC=> Int` -[accessible: true] `object Otest.O.type` -[accessible: true] `value ctest.C` -[accessible: true] `value vCCCInt` -[accessible: true] `variable rCCCInt` -[accessible: false] `value pVCCCInt` -[accessible: false] `variable pRCCCInt` +[inaccessible] private[this] val pVCCC: Int +[inaccessible] private[this] var pRCCC: Int +class C extends AnyRef +class Foo extends AnyRef +class Foo_1 extends AnyRef +class Foo_2 extends AnyRef +class Foo_3 extends AnyRef +def <init>(): test.Foo_3 +def bar: Unit +def fCCC: Int +object O +private[this] val c: test.C +private[this] val vCCC: Int +private[this] var rCCC: Int ================================================================================ diff --git a/test/files/presentation/t1207.check b/test/files/presentation/t1207.check new file mode 100644 index 0000000000..0eed4ece04 --- /dev/null +++ b/test/files/presentation/t1207.check @@ -0,0 +1,53 @@ +reload: Completions.scala + +askTypeCompletion at Completions.scala(10,15) +================================================================================ +[response] askTypeCompletion at (10,15) +retrieved 3 members +final package bongo +final package lang +final package util +================================================================================ + +askTypeCompletion at Completions.scala(11,16) +================================================================================ +[response] askTypeCompletion at (11,16) +retrieved 3 members +final package bongo +final package lang +final package util +================================================================================ + +askTypeCompletion at Completions.scala(12,19) +================================================================================ +[response] askTypeCompletion at (12,19) +retrieved 3 members +final package bongo +final package lang +final package util +================================================================================ + +askTypeCompletion at Completions.scala(13,19) +================================================================================ +[response] askTypeCompletion at (13,19) +retrieved 3 members +final package bongo +final package lang +final package util +================================================================================ + +askTypeCompletion at Completions.scala(14,23) +================================================================================ +[response] askTypeCompletion at (14,23) +retrieved 3 members +final package bongo +final package lang +final package util +================================================================================ + +askTypeCompletion at Completions.scala(15,10) +================================================================================ +[response] askTypeCompletion at (15,10) +retrieved 0 members + +================================================================================ diff --git a/test/files/presentation/t1207/Test.scala b/test/files/presentation/t1207/Test.scala new file mode 100644 index 0000000000..bec1131c4c --- /dev/null +++ b/test/files/presentation/t1207/Test.scala @@ -0,0 +1,3 @@ +import scala.tools.nsc.interactive.tests.InteractiveTest + +object Test extends InteractiveTest
\ No newline at end of file diff --git a/test/files/presentation/t1207/src/Completions.scala b/test/files/presentation/t1207/src/Completions.scala new file mode 100644 index 0000000000..804d4fdc3d --- /dev/null +++ b/test/files/presentation/t1207/src/Completions.scala @@ -0,0 +1,20 @@ +package other { + package bongo { } + package lang { } + package util { + package boogly + } +} + +package ticket_1001207 { + import other./*!*/ + import other.u/*!*/ + import other.uti /*!*/ + import other.util/*!*/ + import other.{lang, u/*!*/} + import j/*!*/ + + class T1207 { + + } +} diff --git a/test/files/presentation/t4287.check b/test/files/presentation/t4287.check new file mode 100644 index 0000000000..a922421e18 --- /dev/null +++ b/test/files/presentation/t4287.check @@ -0,0 +1,11 @@ +reload: Foo.scala + +askHyperlinkPos for `B` at (1,24) Foo.scala +================================================================================ +[response] found askHyperlinkPos for `B` at (3,8) Foo.scala +================================================================================ + +askHyperlinkPos for `a` at (1,31) Foo.scala +================================================================================ +[response] found askHyperlinkPos for `a` at (4,7) Foo.scala +================================================================================ diff --git a/test/files/presentation/t4287/Test.scala b/test/files/presentation/t4287/Test.scala new file mode 100644 index 0000000000..bec1131c4c --- /dev/null +++ b/test/files/presentation/t4287/Test.scala @@ -0,0 +1,3 @@ +import scala.tools.nsc.interactive.tests.InteractiveTest + +object Test extends InteractiveTest
\ No newline at end of file diff --git a/test/files/presentation/t4287/src/Foo.scala b/test/files/presentation/t4287/src/Foo.scala new file mode 100644 index 0000000000..a744eaabe2 --- /dev/null +++ b/test/files/presentation/t4287/src/Foo.scala @@ -0,0 +1,5 @@ +class Baz(val f: Int = B/*#*/.a/*#*/) + +object B { + val a = 2 +} diff --git a/test/files/presentation/t4287b.check b/test/files/presentation/t4287b.check new file mode 100644 index 0000000000..d4b33650fd --- /dev/null +++ b/test/files/presentation/t4287b.check @@ -0,0 +1,6 @@ +reload: Foo.scala + +askHyperlinkPos for `i` at (14,11) Foo.scala +================================================================================ +[response] found askHyperlinkPos for `i` at (10,9) Foo.scala +================================================================================ diff --git a/test/files/presentation/t4287b/Test.scala b/test/files/presentation/t4287b/Test.scala new file mode 100644 index 0000000000..bec1131c4c --- /dev/null +++ b/test/files/presentation/t4287b/Test.scala @@ -0,0 +1,3 @@ +import scala.tools.nsc.interactive.tests.InteractiveTest + +object Test extends InteractiveTest
\ No newline at end of file diff --git a/test/files/presentation/t4287b/src/Foo.scala b/test/files/presentation/t4287b/src/Foo.scala new file mode 100644 index 0000000000..47c676e2a2 --- /dev/null +++ b/test/files/presentation/t4287b/src/Foo.scala @@ -0,0 +1,15 @@ +trait Greeting { + val name: String + val msg = "How are you, "+name +} + +object Greeting { + val hello = "hello" +} + +class C(i: Int) extends { + val nameElse = "Bob" +} with Greeting { + val name = "avc" + println(i/*#*/) +}
\ No newline at end of file diff --git a/test/files/presentation/t4287c.check b/test/files/presentation/t4287c.check new file mode 100644 index 0000000000..42fc30997d --- /dev/null +++ b/test/files/presentation/t4287c.check @@ -0,0 +1,11 @@ +reload: Foo.scala + +askHyperlinkPos for `A` at (1,18) Foo.scala +================================================================================ +[response] found askHyperlinkPos for `A` at (3,8) Foo.scala +================================================================================ + +askHyperlinkPos for `a` at (1,25) Foo.scala +================================================================================ +[response] found askHyperlinkPos for `a` at (4,7) Foo.scala +================================================================================ diff --git a/test/files/presentation/t4287c.flags b/test/files/presentation/t4287c.flags new file mode 100644 index 0000000000..d1a8244169 --- /dev/null +++ b/test/files/presentation/t4287c.flags @@ -0,0 +1 @@ +-Yinfer-argument-types
\ No newline at end of file diff --git a/test/files/presentation/t4287c/Test.scala b/test/files/presentation/t4287c/Test.scala new file mode 100644 index 0000000000..bec1131c4c --- /dev/null +++ b/test/files/presentation/t4287c/Test.scala @@ -0,0 +1,3 @@ +import scala.tools.nsc.interactive.tests.InteractiveTest + +object Test extends InteractiveTest
\ No newline at end of file diff --git a/test/files/presentation/t4287c/src/Foo.scala b/test/files/presentation/t4287c/src/Foo.scala new file mode 100644 index 0000000000..26870b5021 --- /dev/null +++ b/test/files/presentation/t4287c/src/Foo.scala @@ -0,0 +1,9 @@ +class A(a: Int = A/*#*/.a/*#*/) + +object A { + val a = 2 +} + +class B extends A { + def this(a) = this() +}
\ No newline at end of file diff --git a/test/files/presentation/t5708.check b/test/files/presentation/t5708.check index fe43f83cf4..4b33893e98 100644 --- a/test/files/presentation/t5708.check +++ b/test/files/presentation/t5708.check @@ -3,45 +3,39 @@ reload: Completions.scala askTypeCompletion at Completions.scala(17,9) ================================================================================ [response] askTypeCompletion at (17,9) -retrieved 44 members -[accessible: true] `lazy value fooInt` -[accessible: true] `method !=(x$1: Any)Boolean` -[accessible: true] `method !=(x$1: AnyRef)Boolean` -[accessible: true] `method ##()Int` -[accessible: true] `method +(other: String)String` -[accessible: true] `method ->[B](y: B)(test.Compat.type, B)` -[accessible: true] `method ==(x$1: Any)Boolean` -[accessible: true] `method ==(x$1: AnyRef)Boolean` -[accessible: true] `method asInstanceOf[T0]=> T0` -[accessible: true] `method ensuring(cond: Boolean)test.Compat.type` -[accessible: true] `method ensuring(cond: Boolean, msg: => Any)test.Compat.type` -[accessible: true] `method ensuring(cond: test.Compat.type => Boolean)test.Compat.type` -[accessible: true] `method ensuring(cond: test.Compat.type => Boolean, msg: => Any)test.Compat.type` -[accessible: true] `method eq(x$1: AnyRef)Boolean` -[accessible: true] `method equals(x$1: Any)Boolean` -[accessible: true] `method formatted(fmtstr: String)String` -[accessible: true] `method hashCode()Int` -[accessible: true] `method isInstanceOf[T0]=> Boolean` -[accessible: true] `method ne(x$1: AnyRef)Boolean` -[accessible: true] `method notify()Unit` -[accessible: true] `method notifyAll()Unit` -[accessible: true] `method pkgPrivateM=> String` -[accessible: true] `method synchronized[T0](x$1: T0)T0` -[accessible: true] `method toString()String` -[accessible: true] `method wait()Unit` -[accessible: true] `method wait(x$1: Long)Unit` -[accessible: true] `method wait(x$1: Long, x$2: Int)Unit` -[accessible: true] `method x=> test.Compat.type` -[accessible: true] `method →[B](y: B)(test.Compat.type, B)` -[accessible: true] `value CONST_STRINGString("constant")` -[accessible: true] `value __leftOfArrowtest.Compat.type` -[accessible: true] `value __resultOfEnsuringtest.Compat.type` -[accessible: true] `value pkgPrivateVString` -[accessible: true] `value selfAny` -[accessible: false] `method clone()Object` -[accessible: false] `method finalize()Unit` -[accessible: false] `method privateM=> String` -[accessible: false] `method protectedValM=> String` -[accessible: false] `value privateVString` -[accessible: false] `value protectedVString` +retrieved 37 members +[inaccessible] private def privateM: String +[inaccessible] private[this] val privateV: String +[inaccessible] private[this] val protectedV: String +[inaccessible] protected def protectedValM: String +[inaccessible] protected[package lang] def clone(): Object +[inaccessible] protected[package lang] def finalize(): Unit +def +(other: String): String +def ->[B](y: B): (test.Compat.type, B) +def ensuring(cond: Boolean): test.Compat.type +def ensuring(cond: Boolean,msg: => Any): test.Compat.type +def ensuring(cond: test.Compat.type => Boolean): test.Compat.type +def ensuring(cond: test.Compat.type => Boolean,msg: => Any): test.Compat.type +def equals(x$1: Any): Boolean +def formatted(fmtstr: String): String +def hashCode(): Int +def toString(): String +def →[B](y: B): (test.Compat.type, B) +final def !=(x$1: Any): Boolean +final def ##(): Int +final def ==(x$1: Any): Boolean +final def asInstanceOf[T0]: T0 +final def eq(x$1: AnyRef): Boolean +final def isInstanceOf[T0]: Boolean +final def ne(x$1: AnyRef): Boolean +final def notify(): Unit +final def notifyAll(): Unit +final def synchronized[T0](x$1: T0): T0 +final def wait(): Unit +final def wait(x$1: Long): Unit +final def wait(x$1: Long,x$2: Int): Unit +final private[this] val CONST_STRING: String("constant") +lazy private[this] var foo: Int +private[package test] def pkgPrivateM: String +private[this] val pkgPrivateV: String ================================================================================ diff --git a/test/files/presentation/t7678.check b/test/files/presentation/t7678.check new file mode 100644 index 0000000000..f06434b322 --- /dev/null +++ b/test/files/presentation/t7678.check @@ -0,0 +1 @@ +reload: TypeTag.scala diff --git a/test/files/presentation/t7678/Runner.scala b/test/files/presentation/t7678/Runner.scala new file mode 100644 index 0000000000..14d6dc2a70 --- /dev/null +++ b/test/files/presentation/t7678/Runner.scala @@ -0,0 +1,62 @@ +import scala.tools.nsc.interactive.tests._ +import scala.reflect.internal.util._ + +object Test extends InteractiveTest { + + import compiler._, definitions._ + + override def runDefaultTests() { + def resolveTypeTagHyperlink() { + val sym = compiler.askForResponse(() => compiler.currentRun.runDefinitions.TypeTagClass).get.left.get + val r = new Response[Position] + compiler.askLinkPos(sym, new BatchSourceFile("", source), r) + r.get + } + + def checkTypeTagSymbolConsistent() { + compiler.askForResponse { + () => { + val runDefinitions = currentRun.runDefinitions + import runDefinitions._ + assert(TypeTagsClass.map(sym => getMemberClass(sym, tpnme.TypeTag)) == TypeTagClass) + assert(TypeTagsClass.map(sym => getMemberClass(sym, tpnme.WeakTypeTag)) == WeakTypeTagClass) + assert(TypeTagsClass.map(sym => getMemberModule(sym, nme.WeakTypeTag)) == WeakTypeTagModule) + assert(getMemberMethod(ReflectPackage, nme.materializeClassTag) == materializeClassTag) + assert(ReflectApiPackage.map(sym => getMemberMethod(sym, nme.materializeWeakTypeTag)) == materializeWeakTypeTag) + assert(ReflectApiPackage.map(sym => getMemberMethod(sym, nme.materializeTypeTag)) == materializeTypeTag) + () + } + }.get match { + case Right(t) => t.printStackTrace + case Left(_) => + } + } + resolveTypeTagHyperlink() + // The presentation compiler loads TypeTags from source; we'll get new symbols for its members. + // Need to make sure we didn't cache the old ones in Definitions. + checkTypeTagSymbolConsistent() + } + + def source = + """ + |package scala + |package reflect + |package api + | + |trait TypeTags { self: Universe => + | import definitions._ + | + | @annotation.implicitNotFound(msg = "No WeakTypeTag available for ${T}") + | trait WeakTypeTag[T] extends Equals with Serializable { + | val mirror: Mirror + | def in[U <: Universe with Singleton](otherMirror: scala.reflect.api.Mirror[U]): U # WeakTypeTag[T] + | def tpe: Type + | } + | object WeakTypeTag + | + | trait TypeTag[T] extends WeakTypeTag[T] with Equals with Serializable { + | } + | object TypeTag + | + """.stripMargin +} diff --git a/test/files/presentation/t7678/src/TypeTag.scala b/test/files/presentation/t7678/src/TypeTag.scala new file mode 100644 index 0000000000..0b222f8851 --- /dev/null +++ b/test/files/presentation/t7678/src/TypeTag.scala @@ -0,0 +1,9 @@ +package test + +object Test { + import scala.reflect.runtime.{ universe => ru } + def getTypeTag(implicit tag: ru.TypeTag[Int] ) = () + locally { + getTypeTag/*?*/ + } +} diff --git a/test/files/presentation/t8085.check b/test/files/presentation/t8085.check index 79c1b2aa17..921ca7528b 100644 --- a/test/files/presentation/t8085.check +++ b/test/files/presentation/t8085.check @@ -1,3 +1,3 @@ reload: NodeScalaSuite.scala -open package module: package nodescala +open package module: package object nodescala Test OK diff --git a/test/files/presentation/t8085b.check b/test/files/presentation/t8085b.check index 79c1b2aa17..921ca7528b 100644 --- a/test/files/presentation/t8085b.check +++ b/test/files/presentation/t8085b.check @@ -1,3 +1,3 @@ reload: NodeScalaSuite.scala -open package module: package nodescala +open package module: package object nodescala Test OK diff --git a/test/files/presentation/visibility.check b/test/files/presentation/visibility.check index 221e3fc6a0..b77887f8f7 100644 --- a/test/files/presentation/visibility.check +++ b/test/files/presentation/visibility.check @@ -3,219 +3,188 @@ reload: Completions.scala askTypeCompletion at Completions.scala(14,12) ================================================================================ [response] askTypeCompletion at (14,12) -retrieved 42 members -[accessible: true] `method !=(x$1: Any)Boolean` -[accessible: true] `method !=(x$1: AnyRef)Boolean` -[accessible: true] `method ##()Int` -[accessible: true] `method +(other: String)String` -[accessible: true] `method ->[B](y: B)(accessibility.Foo, B)` -[accessible: true] `method ==(x$1: Any)Boolean` -[accessible: true] `method ==(x$1: AnyRef)Boolean` -[accessible: true] `method asInstanceOf[T0]=> T0` -[accessible: true] `method clone()Object` -[accessible: true] `method ensuring(cond: Boolean)accessibility.Foo` -[accessible: true] `method ensuring(cond: Boolean, msg: => Any)accessibility.Foo` -[accessible: true] `method ensuring(cond: accessibility.Foo => Boolean)accessibility.Foo` -[accessible: true] `method ensuring(cond: accessibility.Foo => Boolean, msg: => Any)accessibility.Foo` -[accessible: true] `method eq(x$1: AnyRef)Boolean` -[accessible: true] `method equals(x$1: Any)Boolean` -[accessible: true] `method finalize()Unit` -[accessible: true] `method formatted(fmtstr: String)String` -[accessible: true] `method hashCode()Int` -[accessible: true] `method isInstanceOf[T0]=> Boolean` -[accessible: true] `method ne(x$1: AnyRef)Boolean` -[accessible: true] `method notify()Unit` -[accessible: true] `method notifyAll()Unit` -[accessible: true] `method secretPrivate()Unit` -[accessible: true] `method secretProtected()Unit` -[accessible: true] `method secretProtectedInPackage()Unit` -[accessible: true] `method secretPublic()Unit` -[accessible: true] `method someTests(other: accessibility.Foo)Unit` -[accessible: true] `method synchronized[T0](x$1: T0)T0` -[accessible: true] `method toString()String` -[accessible: true] `method wait()Unit` -[accessible: true] `method wait(x$1: Long)Unit` -[accessible: true] `method wait(x$1: Long, x$2: Int)Unit` -[accessible: true] `method x=> accessibility.Foo` -[accessible: true] `method →[B](y: B)(accessibility.Foo, B)` -[accessible: true] `value __leftOfArrowaccessibility.Foo` -[accessible: true] `value __resultOfEnsuringaccessibility.Foo` -[accessible: true] `value selfAny` -[accessible: false] `method secretPrivateThis()Unit` +retrieved 35 members +[inaccessible] private[this] def secretPrivateThis(): Unit +def +(other: String): String +def ->[B](y: B): (accessibility.Foo, B) +def ensuring(cond: Boolean): accessibility.Foo +def ensuring(cond: Boolean,msg: => Any): accessibility.Foo +def ensuring(cond: accessibility.Foo => Boolean): accessibility.Foo +def ensuring(cond: accessibility.Foo => Boolean,msg: => Any): accessibility.Foo +def equals(x$1: Any): Boolean +def formatted(fmtstr: String): String +def hashCode(): Int +def secretPublic(): Unit +def someTests(other: accessibility.Foo): Unit +def toString(): String +def →[B](y: B): (accessibility.Foo, B) +final def !=(x$1: Any): Boolean +final def ##(): Int +final def ==(x$1: Any): Boolean +final def asInstanceOf[T0]: T0 +final def eq(x$1: AnyRef): Boolean +final def isInstanceOf[T0]: Boolean +final def ne(x$1: AnyRef): Boolean +final def notify(): Unit +final def notifyAll(): Unit +final def synchronized[T0](x$1: T0): T0 +final def wait(): Unit +final def wait(x$1: Long): Unit +final def wait(x$1: Long,x$2: Int): Unit +private def secretPrivate(): Unit +protected def secretProtected(): Unit +protected[package accessibility] def secretProtectedInPackage(): Unit +protected[package lang] def clone(): Object +protected[package lang] def finalize(): Unit ================================================================================ askTypeCompletion at Completions.scala(16,11) ================================================================================ [response] askTypeCompletion at (16,11) -retrieved 42 members -[accessible: true] `method !=(x$1: Any)Boolean` -[accessible: true] `method !=(x$1: AnyRef)Boolean` -[accessible: true] `method ##()Int` -[accessible: true] `method +(other: String)String` -[accessible: true] `method ->[B](y: B)(accessibility.Foo, B)` -[accessible: true] `method ==(x$1: Any)Boolean` -[accessible: true] `method ==(x$1: AnyRef)Boolean` -[accessible: true] `method asInstanceOf[T0]=> T0` -[accessible: true] `method clone()Object` -[accessible: true] `method ensuring(cond: Boolean)accessibility.Foo` -[accessible: true] `method ensuring(cond: Boolean, msg: => Any)accessibility.Foo` -[accessible: true] `method ensuring(cond: accessibility.Foo => Boolean)accessibility.Foo` -[accessible: true] `method ensuring(cond: accessibility.Foo => Boolean, msg: => Any)accessibility.Foo` -[accessible: true] `method eq(x$1: AnyRef)Boolean` -[accessible: true] `method equals(x$1: Any)Boolean` -[accessible: true] `method finalize()Unit` -[accessible: true] `method formatted(fmtstr: String)String` -[accessible: true] `method hashCode()Int` -[accessible: true] `method isInstanceOf[T0]=> Boolean` -[accessible: true] `method ne(x$1: AnyRef)Boolean` -[accessible: true] `method notify()Unit` -[accessible: true] `method notifyAll()Unit` -[accessible: true] `method secretPrivate()Unit` -[accessible: true] `method secretPrivateThis()Unit` -[accessible: true] `method secretProtected()Unit` -[accessible: true] `method secretProtectedInPackage()Unit` -[accessible: true] `method secretPublic()Unit` -[accessible: true] `method someTests(other: accessibility.Foo)Unit` -[accessible: true] `method synchronized[T0](x$1: T0)T0` -[accessible: true] `method toString()String` -[accessible: true] `method wait()Unit` -[accessible: true] `method wait(x$1: Long)Unit` -[accessible: true] `method wait(x$1: Long, x$2: Int)Unit` -[accessible: true] `method x=> accessibility.Foo` -[accessible: true] `method →[B](y: B)(accessibility.Foo, B)` -[accessible: true] `value __leftOfArrowaccessibility.Foo` -[accessible: true] `value __resultOfEnsuringaccessibility.Foo` -[accessible: true] `value selfAny` +retrieved 35 members +def +(other: String): String +def ->[B](y: B): (accessibility.Foo, B) +def ensuring(cond: Boolean): accessibility.Foo +def ensuring(cond: Boolean,msg: => Any): accessibility.Foo +def ensuring(cond: accessibility.Foo => Boolean): accessibility.Foo +def ensuring(cond: accessibility.Foo => Boolean,msg: => Any): accessibility.Foo +def equals(x$1: Any): Boolean +def formatted(fmtstr: String): String +def hashCode(): Int +def secretPublic(): Unit +def someTests(other: accessibility.Foo): Unit +def toString(): String +def →[B](y: B): (accessibility.Foo, B) +final def !=(x$1: Any): Boolean +final def ##(): Int +final def ==(x$1: Any): Boolean +final def asInstanceOf[T0]: T0 +final def eq(x$1: AnyRef): Boolean +final def isInstanceOf[T0]: Boolean +final def ne(x$1: AnyRef): Boolean +final def notify(): Unit +final def notifyAll(): Unit +final def synchronized[T0](x$1: T0): T0 +final def wait(): Unit +final def wait(x$1: Long): Unit +final def wait(x$1: Long,x$2: Int): Unit +private def secretPrivate(): Unit +private[this] def secretPrivateThis(): Unit +protected def secretProtected(): Unit +protected[package accessibility] def secretProtectedInPackage(): Unit +protected[package lang] def clone(): Object +protected[package lang] def finalize(): Unit ================================================================================ askTypeCompletion at Completions.scala(22,11) ================================================================================ [response] askTypeCompletion at (22,11) -retrieved 42 members -[accessible: true] `method !=(x$1: Any)Boolean` -[accessible: true] `method !=(x$1: AnyRef)Boolean` -[accessible: true] `method ##()Int` -[accessible: true] `method +(other: String)String` -[accessible: true] `method ->[B](y: B)(accessibility.AccessibilityChecks, B)` -[accessible: true] `method ==(x$1: Any)Boolean` -[accessible: true] `method ==(x$1: AnyRef)Boolean` -[accessible: true] `method asInstanceOf[T0]=> T0` -[accessible: true] `method clone()Object` -[accessible: true] `method ensuring(cond: Boolean)accessibility.AccessibilityChecks` -[accessible: true] `method ensuring(cond: Boolean, msg: => Any)accessibility.AccessibilityChecks` -[accessible: true] `method ensuring(cond: accessibility.AccessibilityChecks => Boolean)accessibility.AccessibilityChecks` -[accessible: true] `method ensuring(cond: accessibility.AccessibilityChecks => Boolean, msg: => Any)accessibility.AccessibilityChecks` -[accessible: true] `method eq(x$1: AnyRef)Boolean` -[accessible: true] `method equals(x$1: Any)Boolean` -[accessible: true] `method finalize()Unit` -[accessible: true] `method formatted(fmtstr: String)String` -[accessible: true] `method hashCode()Int` -[accessible: true] `method isInstanceOf[T0]=> Boolean` -[accessible: true] `method ne(x$1: AnyRef)Boolean` -[accessible: true] `method notify()Unit` -[accessible: true] `method notifyAll()Unit` -[accessible: true] `method secretProtected()Unit` -[accessible: true] `method secretProtectedInPackage()Unit` -[accessible: true] `method secretPublic()Unit` -[accessible: true] `method someTests(other: accessibility.Foo)Unit` -[accessible: true] `method someTests=> Unit` -[accessible: true] `method synchronized[T0](x$1: T0)T0` -[accessible: true] `method toString()String` -[accessible: true] `method wait()Unit` -[accessible: true] `method wait(x$1: Long)Unit` -[accessible: true] `method wait(x$1: Long, x$2: Int)Unit` -[accessible: true] `method x=> accessibility.AccessibilityChecks` -[accessible: true] `method →[B](y: B)(accessibility.AccessibilityChecks, B)` -[accessible: true] `value __leftOfArrowaccessibility.AccessibilityChecks` -[accessible: true] `value __resultOfEnsuringaccessibility.AccessibilityChecks` -[accessible: true] `value selfAny` -[accessible: false] `method secretPrivate()Unit` +retrieved 34 members +def +(other: String): String +def ->[B](y: B): (accessibility.AccessibilityChecks, B) +def ensuring(cond: Boolean): accessibility.AccessibilityChecks +def ensuring(cond: Boolean,msg: => Any): accessibility.AccessibilityChecks +def ensuring(cond: accessibility.AccessibilityChecks => Boolean): accessibility.AccessibilityChecks +def ensuring(cond: accessibility.AccessibilityChecks => Boolean,msg: => Any): accessibility.AccessibilityChecks +def equals(x$1: Any): Boolean +def formatted(fmtstr: String): String +def hashCode(): Int +def secretPublic(): Unit +def someTests(other: accessibility.Foo): Unit +def someTests: Unit +def toString(): String +def →[B](y: B): (accessibility.AccessibilityChecks, B) +final def !=(x$1: Any): Boolean +final def ##(): Int +final def ==(x$1: Any): Boolean +final def asInstanceOf[T0]: T0 +final def eq(x$1: AnyRef): Boolean +final def isInstanceOf[T0]: Boolean +final def ne(x$1: AnyRef): Boolean +final def notify(): Unit +final def notifyAll(): Unit +final def synchronized[T0](x$1: T0): T0 +final def wait(): Unit +final def wait(x$1: Long): Unit +final def wait(x$1: Long,x$2: Int): Unit +protected def secretProtected(): Unit +protected[package accessibility] def secretProtectedInPackage(): Unit +protected[package lang] def clone(): Object +protected[package lang] def finalize(): Unit ================================================================================ askTypeCompletion at Completions.scala(28,10) ================================================================================ [response] askTypeCompletion at (28,10) -retrieved 42 members -[accessible: true] `method !=(x$1: Any)Boolean` -[accessible: true] `method !=(x$1: AnyRef)Boolean` -[accessible: true] `method ##()Int` -[accessible: true] `method +(other: String)String` -[accessible: true] `method ->[B](y: B)(accessibility.Foo, B)` -[accessible: true] `method ==(x$1: Any)Boolean` -[accessible: true] `method ==(x$1: AnyRef)Boolean` -[accessible: true] `method asInstanceOf[T0]=> T0` -[accessible: true] `method ensuring(cond: Boolean)accessibility.Foo` -[accessible: true] `method ensuring(cond: Boolean, msg: => Any)accessibility.Foo` -[accessible: true] `method ensuring(cond: accessibility.Foo => Boolean)accessibility.Foo` -[accessible: true] `method ensuring(cond: accessibility.Foo => Boolean, msg: => Any)accessibility.Foo` -[accessible: true] `method eq(x$1: AnyRef)Boolean` -[accessible: true] `method equals(x$1: Any)Boolean` -[accessible: true] `method formatted(fmtstr: String)String` -[accessible: true] `method hashCode()Int` -[accessible: true] `method isInstanceOf[T0]=> Boolean` -[accessible: true] `method ne(x$1: AnyRef)Boolean` -[accessible: true] `method notify()Unit` -[accessible: true] `method notifyAll()Unit` -[accessible: true] `method secretProtectedInPackage()Unit` -[accessible: true] `method secretPublic()Unit` -[accessible: true] `method someTests(other: accessibility.Foo)Unit` -[accessible: true] `method synchronized[T0](x$1: T0)T0` -[accessible: true] `method toString()String` -[accessible: true] `method wait()Unit` -[accessible: true] `method wait(x$1: Long)Unit` -[accessible: true] `method wait(x$1: Long, x$2: Int)Unit` -[accessible: true] `method x=> accessibility.Foo` -[accessible: true] `method →[B](y: B)(accessibility.Foo, B)` -[accessible: true] `value __leftOfArrowaccessibility.Foo` -[accessible: true] `value __resultOfEnsuringaccessibility.Foo` -[accessible: true] `value selfAny` -[accessible: false] `method clone()Object` -[accessible: false] `method finalize()Unit` -[accessible: false] `method secretPrivate()Unit` -[accessible: false] `method secretPrivateThis()Unit` -[accessible: false] `method secretProtected()Unit` +retrieved 35 members +[inaccessible] private def secretPrivate(): Unit +[inaccessible] private[this] def secretPrivateThis(): Unit +[inaccessible] protected def secretProtected(): Unit +[inaccessible] protected[package lang] def clone(): Object +[inaccessible] protected[package lang] def finalize(): Unit +def +(other: String): String +def ->[B](y: B): (accessibility.Foo, B) +def ensuring(cond: Boolean): accessibility.Foo +def ensuring(cond: Boolean,msg: => Any): accessibility.Foo +def ensuring(cond: accessibility.Foo => Boolean): accessibility.Foo +def ensuring(cond: accessibility.Foo => Boolean,msg: => Any): accessibility.Foo +def equals(x$1: Any): Boolean +def formatted(fmtstr: String): String +def hashCode(): Int +def secretPublic(): Unit +def someTests(other: accessibility.Foo): Unit +def toString(): String +def →[B](y: B): (accessibility.Foo, B) +final def !=(x$1: Any): Boolean +final def ##(): Int +final def ==(x$1: Any): Boolean +final def asInstanceOf[T0]: T0 +final def eq(x$1: AnyRef): Boolean +final def isInstanceOf[T0]: Boolean +final def ne(x$1: AnyRef): Boolean +final def notify(): Unit +final def notifyAll(): Unit +final def synchronized[T0](x$1: T0): T0 +final def wait(): Unit +final def wait(x$1: Long): Unit +final def wait(x$1: Long,x$2: Int): Unit +protected[package accessibility] def secretProtectedInPackage(): Unit ================================================================================ askTypeCompletion at Completions.scala(37,8) ================================================================================ [response] askTypeCompletion at (37,8) -retrieved 42 members -[accessible: true] `method !=(x$1: Any)Boolean` -[accessible: true] `method !=(x$1: AnyRef)Boolean` -[accessible: true] `method ##()Int` -[accessible: true] `method +(other: String)String` -[accessible: true] `method ->[B](y: B)(accessibility.Foo, B)` -[accessible: true] `method ==(x$1: Any)Boolean` -[accessible: true] `method ==(x$1: AnyRef)Boolean` -[accessible: true] `method asInstanceOf[T0]=> T0` -[accessible: true] `method ensuring(cond: Boolean)accessibility.Foo` -[accessible: true] `method ensuring(cond: Boolean, msg: => Any)accessibility.Foo` -[accessible: true] `method ensuring(cond: accessibility.Foo => Boolean)accessibility.Foo` -[accessible: true] `method ensuring(cond: accessibility.Foo => Boolean, msg: => Any)accessibility.Foo` -[accessible: true] `method eq(x$1: AnyRef)Boolean` -[accessible: true] `method equals(x$1: Any)Boolean` -[accessible: true] `method formatted(fmtstr: String)String` -[accessible: true] `method hashCode()Int` -[accessible: true] `method isInstanceOf[T0]=> Boolean` -[accessible: true] `method ne(x$1: AnyRef)Boolean` -[accessible: true] `method notify()Unit` -[accessible: true] `method notifyAll()Unit` -[accessible: true] `method secretPublic()Unit` -[accessible: true] `method someTests(other: accessibility.Foo)Unit` -[accessible: true] `method synchronized[T0](x$1: T0)T0` -[accessible: true] `method toString()String` -[accessible: true] `method wait()Unit` -[accessible: true] `method wait(x$1: Long)Unit` -[accessible: true] `method wait(x$1: Long, x$2: Int)Unit` -[accessible: true] `method x=> accessibility.Foo` -[accessible: true] `method →[B](y: B)(accessibility.Foo, B)` -[accessible: true] `value __leftOfArrowaccessibility.Foo` -[accessible: true] `value __resultOfEnsuringaccessibility.Foo` -[accessible: true] `value selfAny` -[accessible: false] `method clone()Object` -[accessible: false] `method finalize()Unit` -[accessible: false] `method secretPrivate()Unit` -[accessible: false] `method secretPrivateThis()Unit` -[accessible: false] `method secretProtected()Unit` -[accessible: false] `method secretProtectedInPackage()Unit` +retrieved 35 members +[inaccessible] private def secretPrivate(): Unit +[inaccessible] private[this] def secretPrivateThis(): Unit +[inaccessible] protected def secretProtected(): Unit +[inaccessible] protected[package accessibility] def secretProtectedInPackage(): Unit +[inaccessible] protected[package lang] def clone(): Object +[inaccessible] protected[package lang] def finalize(): Unit +def +(other: String): String +def ->[B](y: B): (accessibility.Foo, B) +def ensuring(cond: Boolean): accessibility.Foo +def ensuring(cond: Boolean,msg: => Any): accessibility.Foo +def ensuring(cond: accessibility.Foo => Boolean): accessibility.Foo +def ensuring(cond: accessibility.Foo => Boolean,msg: => Any): accessibility.Foo +def equals(x$1: Any): Boolean +def formatted(fmtstr: String): String +def hashCode(): Int +def secretPublic(): Unit +def someTests(other: accessibility.Foo): Unit +def toString(): String +def →[B](y: B): (accessibility.Foo, B) +final def !=(x$1: Any): Boolean +final def ##(): Int +final def ==(x$1: Any): Boolean +final def asInstanceOf[T0]: T0 +final def eq(x$1: AnyRef): Boolean +final def isInstanceOf[T0]: Boolean +final def ne(x$1: AnyRef): Boolean +final def notify(): Unit +final def notifyAll(): Unit +final def synchronized[T0](x$1: T0): T0 +final def wait(): Unit +final def wait(x$1: Long): Unit +final def wait(x$1: Long,x$2: Int): Unit ================================================================================ diff --git a/test/files/presentation/visibility/src/Completions.scala b/test/files/presentation/visibility/src/Completions.scala index 098b98a0fd..8c07934915 100644 --- a/test/files/presentation/visibility/src/Completions.scala +++ b/test/files/presentation/visibility/src/Completions.scala @@ -22,7 +22,7 @@ package accessibility { this./*!*/ // should not list secretPrivate* } } - + class UnrelatedClass { def someTests(foo: Foo) { foo./*!*/ // should list public and protected[accessiblity] |