diff options
author | Iulian Dragos <jaguarul@gmail.com> | 2007-11-21 14:28:19 +0000 |
---|---|---|
committer | Iulian Dragos <jaguarul@gmail.com> | 2007-11-21 14:28:19 +0000 |
commit | e32400681a1370b5279afdae3a5501311a6bc340 (patch) | |
tree | 153114fe793141a0a7cab4025de7864236d6a27b /test/files/pos/protected-t1010.scala | |
parent | 1bdf2c4ebf0a863756192d4879102710e839fec2 (diff) | |
download | scala-e32400681a1370b5279afdae3a5501311a6bc340.tar.gz scala-e32400681a1370b5279afdae3a5501311a6bc340.tar.bz2 scala-e32400681a1370b5279afdae3a5501311a6bc340.zip |
Fixed ticket #10
Diffstat (limited to 'test/files/pos/protected-t1010.scala')
-rw-r--r-- | test/files/pos/protected-t1010.scala | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/files/pos/protected-t1010.scala b/test/files/pos/protected-t1010.scala new file mode 100644 index 0000000000..8575ddaaf7 --- /dev/null +++ b/test/files/pos/protected-t1010.scala @@ -0,0 +1,27 @@ +/** Check protected accessors involving polymorphic methods. */ + +package pkg2 { + +trait PresentationsX extends pkg1.Presentations { + trait ProjectImpl extends super.ProjectImpl { + trait FileImpl extends super.FileImpl { + lockTyper(Console.println) + } + } +} + +} // pkg2 + +package pkg1 { + +trait Presentations { + trait ProjectImpl { + trait FileImpl + protected def lockTyper[T](f : => T) = { + if (this == null) None + else Some(f) + } + } +} + +} // pkg1 |