Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
odersky opened this issue Mar 3, 2014 · 2 comments
Closed

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

odersky opened this issue Mar 3, 2014 · 2 comments

Comments

@odersky
Copy link
Contributor

odersky commented Mar 3, 2014

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

scala dotty.tools.dotc.Bench #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 = [A](xs: A*)scala.collection.immutable.List[A],
[A1 >: String'](elem: A1)Boolean
;
constraint =
A
A1 >: String'
)
time elapsed: 2176ms
assertion failure for >: String <: String <:< A, frozen = false
: String <: String is a class dotty.tools.dotc.core.Types$CachedTypeBounds
polyparam A found in [A](self: A)ArrowAssoc[A]
assertion failure for (self: A)ArrowAssoc[A] <:< >: String <: String ?=>? >: String <: String, frozen = false
(self: A)ArrowAssoc[A] is a class dotty.tools.dotc.core.Types$CachedMethodType
: String <: String ?=>? >: String <: String is a class dotty.tools.dotc.typer.Inferencing$CachedViewProto
exception occured while typechecking dotc/config/PathResolver.scala
java.lang.AssertionError: assertion failed
at scala.Predef$.assert(Predef.scala:151)
at dotty.tools.dotc.core.Types$TypeBounds.(Types.scala:1870)
at dotty.tools.dotc.core.Types$CachedTypeBounds.(Types.scala:1962)
at dotty.tools.dotc.core.Uniques$TypeBoundsUniques.newBounds$1(Uniques.scala:84)
at dotty.tools.dotc.core.Uniques$TypeBoundsUniques.enterIfNew(Uniques.scala:90)
at dotty.tools.dotc.core.Types$TypeBounds$.apply(Types.scala:1978)`

@odersky odersky mentioned this issue Mar 3, 2014
odersky added a commit to odersky/dotty that referenced this issue Mar 3, 2014
Right now this one fails.
odersky added a commit to odersky/dotty that referenced this issue Mar 3, 2014
The root cause of scala#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.
DarkDimius added a commit that referenced this issue Mar 3, 2014
@odersky
Copy link
Contributor Author

odersky commented Mar 4, 2014

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.

@smarter
Copy link
Member

smarter commented Nov 18, 2015

Looks like it works now.

@smarter smarter closed this as completed Nov 18, 2015
noti0na1 pushed a commit to noti0na1/dotty that referenced this issue Oct 23, 2019
Merge Changes from Dotty Upstream (including changes to JavaParser)
szymon-rd pushed a commit that referenced this issue Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants