aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Typer.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-10-12 14:18:02 +0200
committerMartin Odersky <odersky@gmail.com>2013-10-12 14:18:02 +0200
commit15a63974d23511a3a879c3354552bed504061617 (patch)
tree1df3952f745970e732d888cdf0298cb19d62e600 /src/dotty/tools/dotc/typer/Typer.scala
parent54a1bce87b4682ccfb97504e2daa7c36cbf207b2 (diff)
downloaddotty-15a63974d23511a3a879c3354552bed504061617.tar.gz
dotty-15a63974d23511a3a879c3354552bed504061617.tar.bz2
dotty-15a63974d23511a3a879c3354552bed504061617.zip
New invariant: refined types must have a refined info that's more specific than the previous bounds.
Making use of this to make comparisons of refined types with the same names more efficient. Also, to make findMember on refined type with type refinement more efficient.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Typer.scala1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala
index 0e246480c..1e3049f7e 100644
--- a/src/dotty/tools/dotc/typer/Typer.scala
+++ b/src/dotty/tools/dotc/typer/Typer.scala
@@ -669,6 +669,7 @@ class Typer extends Namer with Applications with Implicits {
val rsym = refinement.symbol
val rinfo = if (rsym is Accessor) rsym.info.resultType else rsym.info
RefinedType(parent, rsym.name, rt => rinfo.substThis(refineCls, RefinedThis(rt)))
+ // todo later: check that refinement is within bounds
}
cpy.RefinedTypeTree(tree, tpt1, refinements1) withType
(tpt1.tpe /: refinements1)(addRefinement)