diff options
author | Martin Odersky <odersky@gmail.com> | 2015-06-28 19:33:35 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-07-06 17:02:17 +0200 |
commit | 175499537c87c78d0b926d84b7a9030011e42c00 (patch) | |
tree | 20d6897f2dc55689dc90650fba09259d228cb622 /tests/neg/selfInheritance.scala | |
parent | 1061743aaaf2b18419c8fdb1cc89cb1498c9673f (diff) | |
download | dotty-175499537c87c78d0b926d84b7a9030011e42c00.tar.gz dotty-175499537c87c78d0b926d84b7a9030011e42c00.tar.bz2 dotty-175499537c87c78d0b926d84b7a9030011e42c00.zip |
Check that a self type T is closed.
What is checked: A self type T is a subtype of all
selftypes of classes refernced by T. That is, a self type
has to subsume all self types of its required type. Ot,
otherwise said, requirements must be closed; you cannot
discover new ones in following them.
Diffstat (limited to 'tests/neg/selfInheritance.scala')
-rw-r--r-- | tests/neg/selfInheritance.scala | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/neg/selfInheritance.scala b/tests/neg/selfInheritance.scala index 5f61c5bbb..993765817 100644 --- a/tests/neg/selfInheritance.scala +++ b/tests/neg/selfInheritance.scala @@ -26,3 +26,7 @@ object Test { object M extends C // error } + +trait X { self: Y => } +trait Y { self: Z => } +trait Z |