Skip to content

Assertion Error in the typer while inferring return type (parser stability) #6059

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
sir-wabbit opened this issue Mar 10, 2019 · 0 comments
Closed

Comments

@sir-wabbit
Copy link

def I0(I1: Int ) = I1
val I1 = I0(I0 i2
) => true
def I0(i1: Int) = i1
val i1 = I0( I0 i1
) => true

AE-cf6cdd19dd6230b2411b05591dcb89a7acb861db


exception occurred while typechecking test.scala
exception occurred while compiling test.scala
java.lang.AssertionError: assertion failed: Mode(Type,ImplicitsEnabled,InferringReturnType) while compiling test.scala
Exception in thread "main" java.lang.AssertionError: assertion failed: Mode(Type,ImplicitsEnabled,InferringReturnType)
	at scala.Predef$.assert(Predef.scala:223)
	at dotty.tools.dotc.ast.desugar$.apply(Desugar.scala:1356)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2054)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2066)
	at dotty.tools.dotc.typer.ProtoTypes$FunProto.$anonfun$typedArg$1(ProtoTypes.scala:333)
	at dotty.tools.dotc.typer.ProtoTypes$FunProto.cacheTypedArg(ProtoTypes.scala:296)
	at dotty.tools.dotc.typer.ProtoTypes$FunProto.typedArg(ProtoTypes.scala:333)
	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.typedArg(Applications.scala:753)
	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.typedArg(Applications.scala:751)
	at dotty.tools.dotc.typer.Applications$Application.addTyped$1(Applications.scala:519)
	at dotty.tools.dotc.typer.Applications$Application.matchArgs(Applications.scala:562)
	at dotty.tools.dotc.typer.Applications$Application.init(Applications.scala:340)
	at dotty.tools.dotc.typer.Applications$TypedApply.<init>(Applications.scala:654)
	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.<init>(Applications.scala:752)
	at dotty.tools.dotc.typer.Applications.simpleApply$1(Applications.scala:814)
	at dotty.tools.dotc.typer.Applications.$anonfun$typedApply$9(Applications.scala:843)
	at dotty.tools.dotc.typer.Typer.tryEither(Typer.scala:2192)
	at dotty.tools.dotc.typer.Applications.$anonfun$typedApply$1(Applications.scala:844)
	at dotty.tools.dotc.util.Stats$.track(Stats.scala:37)
	at dotty.tools.dotc.typer.Applications.realApply$1(Applications.scala:783)
	at dotty.tools.dotc.typer.Applications.typedApply(Applications.scala:889)
	at dotty.tools.dotc.typer.Applications.typedApply$(Applications.scala:781)
	at dotty.tools.dotc.typer.Typer.typedApply(Typer.scala:87)
odersky added a commit that referenced this issue Mar 19, 2019
Fix #6059: Use correct errors-reported condition in Desugar
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

2 participants