diff options
author | Martin Odersky <odersky@gmail.com> | 2013-06-19 04:45:24 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-06-19 04:48:11 +0200 |
commit | b2dcc777e5a6a1e6d1fff89c7fa794129ad5d135 (patch) | |
tree | 2bac3a26ea6f7d62d713206687ba631c3c1cfad5 /test | |
parent | 928a2a99288c3aa425654e63aea5ddc70359d4ac (diff) | |
download | dotty-b2dcc777e5a6a1e6d1fff89c7fa794129ad5d135.tar.gz dotty-b2dcc777e5a6a1e6d1fff89c7fa794129ad5d135.tar.bz2 dotty-b2dcc777e5a6a1e6d1fff89c7fa794129ad5d135.zip |
Taking accessibility into account for &, |
Changed the algorithm for & (and also |) to take accessibility into account. Fixed various problems that opened up when doing this.
Under -debug, new and old behavior of & are checked side-by-side and any discrepancy is noted.
Diffstat (limited to 'test')
-rw-r--r-- | test/test/showClass.scala | 3 | ||||
-rw-r--r-- | test/x/cakes.scala | 49 |
2 files changed, 51 insertions, 1 deletions
diff --git a/test/test/showClass.scala b/test/test/showClass.scala index ac4a86536..2dbe1868f 100644 --- a/test/test/showClass.scala +++ b/test/test/showClass.scala @@ -6,7 +6,8 @@ object showClass extends ShowClassTests { def main(args: Array[String]) = { for (arg <- args) showPackage(ctx.requiredPackage(arg)) -// showClasses("scala.tools.reflect.Eval") +// showClasses("test.SyncOps") +// showClasses("scala.reflect.runtime.SynchronizedOps") // showPackage("scala.reflect") // showPackage("scala.collection") diff --git a/test/x/cakes.scala b/test/x/cakes.scala new file mode 100644 index 000000000..ff5e5d64f --- /dev/null +++ b/test/x/cakes.scala @@ -0,0 +1,49 @@ +package test + +trait API { + + type Name >: Null <: NameAPI + type Symbol >: Null <: SymbolAPI + type ScopeEntry >: Null <: ScopeEntryAPI + + class NameAPI + class SymbolAPI + class ScopeEntryAPI + +} + +trait Names { self: SymTab => + + class Name extends NameAPI + +} + +trait Symbols { self: SymTab => + + class Symbol extends SymbolAPI + +} + +trait Scopes { self: SymTab => + + class ScopeEntry extends ScopeEntryAPI + class Scope { + def unlink(e: ScopeEntry): Unit = ??? + def unlink(e: Symbol): Unit = ??? + } + +} + +trait SymTab extends API with Names with Scopes { + +} + + +trait SyncOps extends SymTab { + + trait SyncScope extends Scope { + override def unlink(e: ScopeEntry): Unit = ??? + override def unlink(e: Symbol): Unit = ??? + } + +} |