Skip to content

SOE implicitly #7758

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
som-snytt opened this issue Dec 14, 2019 · 0 comments
Closed

SOE implicitly #7758

som-snytt opened this issue Dec 14, 2019 · 0 comments

Comments

@som-snytt
Copy link
Contributor

som-snytt commented Dec 14, 2019

minimized code

scala> def f: Int = implicitly   // as seen on scala 9427
1 |def f: Int = implicitly
  |                       ^
  |no implicit argument of type T was found for parameter ev of method implicitly in object DottyPredef

scala> def f = implicitly: Int
Exception in thread "main" java.lang.StackOverflowError
Stack trace
scala> def f = implicitly: Int
Exception in thread "main" java.lang.StackOverflowError
	at dotty.tools.dotc.core.Flags$given_bits_of_FlagSet$.is(Flags.scala:68)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.is(SymDenotations.scala:207)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.isAbsent(SymDenotations.scala:574)
	at dotty.tools.dotc.core.SymDenotations$ClassDenotation.derivesFrom(SymDenotations.scala:1667)
	at dotty.tools.dotc.core.Annotations$Annotation.matches(Annotations.scala:22)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.dropOtherAnnotations(SymDenotations.scala:369)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.hasAnnotation(SymDenotations.scala:323)
	at dotty.tools.dotc.typer.Inliner$.bodyToInline(Inliner.scala:45)
	at dotty.tools.dotc.typer.Inliner$.isInlineable(Inliner.scala:52)
	at dotty.tools.dotc.typer.Inliner$.isInlineable(Inliner.scala:57)
	at dotty.tools.dotc.typer.Typer.adaptNoArgsOther$6(Typer.scala:2736)
	at dotty.tools.dotc.typer.Typer.adaptNoArgs$1(Typer.scala:2839)
	at dotty.tools.dotc.typer.Typer.adapt1(Typer.scala:3045)
	at dotty.tools.dotc.typer.Typer.adapt(Typer.scala:2451)
	at dotty.tools.dotc.typer.Typer.readapt$1(Typer.scala:2461)
	at dotty.tools.dotc.typer.Typer.readaptSimplified$1(Typer.scala:2462)
	at dotty.tools.dotc.typer.Typer.adaptNoArgsOther$6(Typer.scala:2742)
	at dotty.tools.dotc.typer.Typer.adaptNoArgs$1(Typer.scala:2839)
	at dotty.tools.dotc.typer.Typer.adapt1(Typer.scala:3045)
	at dotty.tools.dotc.typer.Typer.adapt(Typer.scala:2451)
anatoliykmetyuk added a commit that referenced this issue Dec 18, 2019
Fix #7758: Avoid stackoverflows after inline attempts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant