aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Typer.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-01-15 16:41:23 +0100
committerMartin Odersky <odersky@gmail.com>2014-01-15 16:41:23 +0100
commitf1cfe733d9d02dff975d2bde222db890ca6d15e6 (patch)
tree4dbc29905abb71c3b8a2228d49d432e52a4e0242 /src/dotty/tools/dotc/typer/Typer.scala
parent2112492ec908019d1515128c68f1c737518cac3c (diff)
downloaddotty-f1cfe733d9d02dff975d2bde222db890ca6d15e6.tar.gz
dotty-f1cfe733d9d02dff975d2bde222db890ca6d15e6.tar.bz2
dotty-f1cfe733d9d02dff975d2bde222db890ca6d15e6.zip
Allow views when matching the result type of a selection prototype.
More generally, a refactoring of the Compatibility trait to use value passing instead of inheritance.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Typer.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala
index 61ab0ed56..f565e72c9 100644
--- a/src/dotty/tools/dotc/typer/Typer.scala
+++ b/src/dotty/tools/dotc/typer/Typer.scala
@@ -371,7 +371,7 @@ class Typer extends Namer with Applications with Implicits {
}
def typedSelect(tree: untpd.Select, pt: Type)(implicit ctx: Context): Tree = track("typedSelect") {
- val qual1 = typedExpr(tree.qualifier, selectionProto(tree.name, pt))
+ val qual1 = typedExpr(tree.qualifier, selectionProto(tree.name, pt, this))
val ownType = checkedSelectionType(qual1, tree)
checkValue(ownType, pt, tree.pos)
cpy.Select(tree, qual1, tree.name).withType(ownType)
@@ -747,7 +747,7 @@ class Typer extends Namer with Applications with Implicits {
}
def typedSelectFromTypeTree(tree: untpd.SelectFromTypeTree, pt: Type)(implicit ctx: Context): SelectFromTypeTree = track("typedSelectFromTypeTree") {
- val qual1 = typedType(tree.qualifier, selectionProto(tree.name, pt))
+ val qual1 = typedType(tree.qualifier, selectionProto(tree.name, pt, this))
cpy.SelectFromTypeTree(tree, qual1, tree.name).withType(checkedSelectionType(qual1, tree))
}