diff options
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 |