aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Types.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-12-24 11:59:34 +0100
committerMartin Odersky <odersky@gmail.com>2013-12-24 12:33:35 +0100
commitb23bc744ce9f8275fb6b433e40f14158eefc1abf (patch)
treecbeea6b180a011f05c169658f062dfc454eebb3f /src/dotty/tools/dotc/core/Types.scala
parent336a1fc56074b58c54951a4a351d258f23999281 (diff)
downloaddotty-b23bc744ce9f8275fb6b433e40f14158eefc1abf.tar.gz
dotty-b23bc744ce9f8275fb6b433e40f14158eefc1abf.tar.bz2
dotty-b23bc744ce9f8275fb6b433e40f14158eefc1abf.zip
Fixing problems in treatment of private symbols
1) Accessibility check was broken because it looked at symbol's owner, where it should have looked at context owner. 2) Refined treatement if members. Previously, nonPrivate member returned a subset of member, i.e. those denotations returned by member that were not private. This is not correct. In a situation like class A { def x: Int = 1 } class B { private def x: String = "" } extends A (new B).x the non-private member returned should be A#x. Changed membersNamed and friends as well as checkAccessible to account for that.
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r--src/dotty/tools/dotc/core/Types.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala
index 64fa4d3ec..9d3cf898d 100644
--- a/src/dotty/tools/dotc/core/Types.scala
+++ b/src/dotty/tools/dotc/core/Types.scala
@@ -596,7 +596,7 @@ object Types {
def underlyingIfRepeated(implicit ctx: Context): Type =
this.translateParameterized(defn.RepeatedParamClass, defn.SeqClass)
- /** If this is a (possibly aliased, annotated, and parameterized) reference to
+ /** If this is a (possibly aliased, annotated, and/or parameterized) reference to
* a class, the class type ref, otherwise NoType.
*/
def underlyingClassRef(implicit ctx: Context): Type = dealias match {