Skip to content

Stack overflow error on compile #8357

@gzoller

Description

@gzoller

Issue description

Something I changed in my code now causes a StackOverflowError on compile.
Dotty: 0.23.0-bin-20200220-228e593-NIGHTLY
Code: https://github.com/gzoller/dotty_reflection/tree/broken

Should be noted that I'm not using any macro/metaprogramming in the code (that I'm aware of)

I'm using a custom build of scalameta munit, but you don't need test code to reproduce this issue--you can safely comment out this dependency in build.sbt.

I've been trying to narrow down what I changed to cause it to do this, but thus far haven't found a culprit. Will continue narrowing and post any learnings on this bug report.

Steps

  1. Download repo
  2. sbt compile

Crash output (click arrow to expand)

[error] ## Exception when compiling 14 sources to /Users/wmy965/git/dotty_reflection/target/scala-0.23/classes
[error] java.lang.StackOverflowError
[error] java.base/java.util.WeakHashMap.getTable(WeakHashMap.java:350)
[error] java.base/java.util.WeakHashMap.put(WeakHashMap.java:451)
[error] dotty.tools.dotc.core.SymDenotations$InheritedCacheImpl.addDependent(SymDenotations.scala:2436)
[error] dotty.tools.dotc.core.SymDenotations$BaseDataImpl.apply(SymDenotations.scala:2526)
[error] dotty.tools.dotc.core.SymDenotations$ClassDenotation.baseData(SymDenotations.scala:1673)
[error] dotty.tools.dotc.core.SymDenotations$ClassDenotation.baseClassSet(SymDenotations.scala:1684)
[error] dotty.tools.dotc.core.SymDenotations$ClassDenotation.derivesFrom(SymDenotations.scala:1709)
[error] dotty.tools.dotc.core.TypeComparer.provablyDisjoint(TypeComparer.scala:2261)
[error] dotty.tools.dotc.core.TypeComparer.provablyDisjoint(TypeComparer.scala:2333)
[error] dotty.tools.dotc.core.TypeComparer.provablyDisjoint$$anonfun$1(TypeComparer.scala:2274)
[error] scala.collection.immutable.List.forall(List.scala:358)
[error] dotty.tools.dotc.core.TypeComparer.provablyDisjoint(TypeComparer.scala:2274)
[error] dotty.tools.dotc.core.TypeComparer.provablyDisjoint(TypeComparer.scala:2333)
[error] dotty.tools.dotc.core.TypeComparer.provablyDisjoint$$anonfun$1(TypeComparer.scala:2274)
[error] scala.collection.immutable.List.forall(List.scala:358)
(repeats)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions