aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Types.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-03-03 17:50:26 +0100
committerMartin Odersky <odersky@gmail.com>2014-03-03 17:50:26 +0100
commitf3dacf968bc28f5f47612f75562a1a600e511815 (patch)
tree59f93971f168360b5bbc53a1934535620b6847db /src/dotty/tools/dotc/core/Types.scala
parentf0d5662e3f8668ed33bc7442951558d861e56073 (diff)
downloaddotty-f3dacf968bc28f5f47612f75562a1a600e511815.tar.gz
dotty-f3dacf968bc28f5f47612f75562a1a600e511815.tar.bz2
dotty-f3dacf968bc28f5f47612f75562a1a600e511815.zip
Fix of #34
The root cause of #34 was that we took a type argument which was an existential type. These are returned as type bounds, which make no sense in the calling context. To avoid that problem in the future, `typeArgs` got renamed to `argInfos`, so it is clear we get an info, not necessarily a value type. There are also added method `argTypes`, `argTypesLo`, `argTypesHi`, which return a type, but either throw an exception or return a lower/upper approximation of the argument is an existential type. There's another issue that the existential type only arose when compiling the same couple fo files the seciond time. We need to chase that one down separately.
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r--src/dotty/tools/dotc/core/Types.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala
index bc8d7dfd2..4d26a6735 100644
--- a/src/dotty/tools/dotc/core/Types.scala
+++ b/src/dotty/tools/dotc/core/Types.scala
@@ -96,7 +96,7 @@ object Types {
else thissym eq sym
case this1: RefinedType =>
// make sure all refinements are type arguments
- this1.parent.isRef(sym) && this.typeArgs.nonEmpty
+ this1.parent.isRef(sym) && this.argInfos.nonEmpty
case _ =>
false
}