aboutsummaryrefslogtreecommitdiff
path: root/tests/neg
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2017-01-05 16:02:09 +0700
committerMartin Odersky <odersky@gmail.com>2017-01-05 18:00:06 +0700
commitaa6ebe938639f07dd6f5612e645f1449f37a86eb (patch)
tree24d257c1f12d0f5cb9b76102043046e3a904d98a /tests/neg
parent42eb864dc752254fc3b8b0428570fe94aa1dafc7 (diff)
downloaddotty-aa6ebe938639f07dd6f5612e645f1449f37a86eb.tar.gz
dotty-aa6ebe938639f07dd6f5612e645f1449f37a86eb.tar.bz2
dotty-aa6ebe938639f07dd6f5612e645f1449f37a86eb.zip
Implement structural type member access
New scheme for implementing structural type member access.
Diffstat (limited to 'tests/neg')
-rw-r--r--tests/neg/zoo.scala14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/neg/zoo.scala b/tests/neg/zoo.scala
index 19efcc1d7..1674548e8 100644
--- a/tests/neg/zoo.scala
+++ b/tests/neg/zoo.scala
@@ -7,19 +7,19 @@ type Grass = {
}
type Animal = {
type Food
- def eats(food: Food): Unit // error
- def gets: Food // error
+ def eats(food: Food): Unit
+ def gets: Food
}
type Cow = {
type IsMeat = Any
type Food <: Grass
- def eats(food: Grass): Unit // error
- def gets: Grass // error
+ def eats(food: Grass): Unit
+ def gets: Grass
}
type Lion = {
type Food = Meat
- def eats(food: Meat): Unit // error
- def gets: Meat // error
+ def eats(food: Meat): Unit
+ def gets: Meat
}
def newMeat: Meat = new {
type IsMeat = Any
@@ -40,5 +40,5 @@ def newLion: Lion = new {
}
val milka = newCow
val leo = newLion
-leo.eats(milka) // structural select not supported
+leo.eats(milka) // error: no projector found
}