Assertion error when compiling config files in resident mode. #34

odersky opened this Issue Mar 3, 2014 · 2 comments

2 participants


using this command in directory src/dotty/tools/dotc:

scala #runs 2 config/Properties.scala config/PathResolver.scala

We get an assertion error on the second run. here's the full output:

max constraint = Constraint(
uninstVars = String';
constrained types = Ascala.collection.immutable.List[A],
A1 >: String'Boolean
constraint =
A1 >: String'
time elapsed: 2176ms
assertion failure for >: String <: String <:< A, frozen = false
: String <: String is a class$CachedTypeBounds
polyparam A found in AArrowAssoc[A]
assertion failure for (self: A)ArrowAssoc[A] <:< >: String <: String ?=>? >: String <: String, frozen = false
(self: A)ArrowAssoc[A] is a class$CachedMethodType
: String <: String ?=>? >: String <: String is a class$CachedViewProto
exception occured while typechecking dotc/config/PathResolver.scala
java.lang.AssertionError: assertion failed
at scala.Predef$.assert(Predef.scala:151)

@odersky odersky added a commit to odersky/dotty that referenced this issue Mar 3, 2014
@odersky odersky Add test case for #34
Right now this one fails.
@odersky odersky added a commit to odersky/dotty that referenced this issue Mar 3, 2014
@odersky odersky 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.

The build passes, but I leave the issue open because we still have to find out why the problem arises only during 2nd run, and how it depends on file order.

Programming Methods Laboratory EPFL member

Looks like it works now.

@smarter smarter closed this Nov 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment