{"action":"opened","issue":{"url":"https://api.github.com/repos/lampepfl/dotty/issues/2533","repository_url":"https://api.github.com/repos/lampepfl/dotty","labels_url":"https://api.github.com/repos/lampepfl/dotty/issues/2533/labels{/name}","comments_url":"https://api.github.com/repos/lampepfl/dotty/issues/2533/comments","events_url":"https://api.github.com/repos/lampepfl/dotty/issues/2533/events","html_url":"https://github.com/lampepfl/dotty/issues/2533","id":231556660,"number":2533,"title":"Cyclic reference crashing compiler after emitted error","user":{"login":"nicolasstucki","id":3648029,"avatar_url":"https://avatars1.githubusercontent.com/u/3648029?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolasstucki","html_url":"https://github.com/nicolasstucki","followers_url":"https://api.github.com/users/nicolasstucki/followers","following_url":"https://api.github.com/users/nicolasstucki/following{/other_user}","gists_url":"https://api.github.com/users/nicolasstucki/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolasstucki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolasstucki/subscriptions","organizations_url":"https://api.github.com/users/nicolasstucki/orgs","repos_url":"https://api.github.com/users/nicolasstucki/repos","events_url":"https://api.github.com/users/nicolasstucki/events{/privacy}","received_events_url":"https://api.github.com/users/nicolasstucki/received_events","type":"User","site_admin":false},"labels":[{"id":288606644,"url":"https://api.github.com/repos/lampepfl/dotty/labels/area:typer","name":"area:typer","color":"006b75","default":false},{"id":21379537,"url":"https://api.github.com/repos/lampepfl/dotty/labels/itype:bug","name":"itype:bug","color":"cc317c","default":false},{"id":455449852,"url":"https://api.github.com/repos/lampepfl/dotty/labels/prio:medium","name":"prio:medium","color":"1d76db","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-05-26T08:14:38Z","updated_at":"2017-05-26T08:14:38Z","closed_at":null,"body":"```scala\r\nobject Foo {\r\n  def test(f: { type A = A }): Int = ???\r\n}\r\n```\r\n\r\ncrashes after emitting error\r\n\r\n```scala\r\n-- Error: foo.scala:4:21 -------------------------------------------------------\r\n4 |  def test(f: { type A = A }): Int = ???\r\n  |                     ^\r\n  |illegal cyclic reference: alias <refinement>.this.A of type A refers back to the type itself\r\n\r\nexception occurred while typechecking foo.scala\r\n\r\nexception occurred while compiling foo.scala\r\nException in thread \"main\" java.lang.AssertionError: assertion failed\r\n\tat scala.Predef$.assert(Predef.scala:156)\r\n\tat dotty.tools.dotc.core.Types$RefinedType.<init>(Types.scala:2159)\r\n\tat dotty.tools.dotc.core.Types$CachedRefinedType.<init>(Types.scala:2190)\r\n\tat dotty.tools.dotc.core.Uniques$RefinedUniques.newType$2(Uniques.scala:110)\r\n\tat dotty.tools.dotc.core.Uniques$RefinedUniques.enterIfNew(Uniques.scala:112)\r\n\tat dotty.tools.dotc.core.Types$RefinedType$.apply(Types.scala:2202)\r\n\tat dotty.tools.dotc.typer.TypeAssigner$class.addRefinement$1(TypeAssigner.scala:468)\r\n\tat dotty.tools.dotc.typer.TypeAssigner$$anonfun$19.apply(TypeAssigner.scala:470)\r\n\tat dotty.tools.dotc.typer.TypeAssigner$$anonfun$19.apply(TypeAssigner.scala:470)\r\n\tat scala.collection.LinearSeqOptimized$class.foldLeft(LinearSeqOptimized.scala:124)\r\n\tat scala.collection.immutable.List.foldLeft(List.scala:84)\r\n\tat scala.collection.TraversableOnce$class.$div$colon(TraversableOnce.scala:151)\r\n\tat scala.collection.AbstractTraversable.$div$colon(Traversable.scala:104)\r\n\tat dotty.tools.dotc.typer.TypeAssigner$class.assignType(TypeAssigner.scala:470)\r\n\tat dotty.tools.dotc.typer.Typer.assignType(Typer.scala:65)\r\n\tat dotty.tools.dotc.typer.Typer$$anonfun$typedRefinedTypeTree$1.apply(Typer.scala:1048)\r\n\tat dotty.tools.dotc.typer.Typer$$anonfun$typedRefinedTypeTree$1.apply(Typer.scala:1034)\r\n\tat dotty.tools.dotc.util.Stats$.track(Stats.scala:35)\r\n\tat dotty.tools.dotc.typer.Typer.typedRefinedTypeTree(Typer.scala:1034)\r\n\tat dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:1550)\r\n\tat dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1572)\r\n\tat dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1587)\r\n\tat dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1585)\r\n\tat dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:140)\r\n\tat dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)\r\n\tat dotty.tools.dotc.typer.Typer.typed(Typer.scala:1585)\r\n\tat dotty.tools.dotc.typer.Namer$$anonfun$typedAheadType$1.apply(Namer.scala:931)\r\n\tat dotty.tools.dotc.typer.Namer$$anonfun$typedAheadType$1.apply(Namer.scala:931)\r\n\tat dotty.tools.dotc.typer.Namer.typedAheadImpl(Namer.scala:924)\r\n\tat dotty.tools.dotc.typer.Namer.typedAheadType(Namer.scala:931)\r\n\tat dotty.tools.dotc.typer.Namer.valOrDefDefSig(Namer.scala:1096)\r\n\tat dotty.tools.dotc.typer.Namer$Completer.typeSig(Namer.scala:729)\r\n\tat dotty.tools.dotc.typer.Namer$Completer.completeInCreationContext(Namer.scala:777)\r\n\tat dotty.tools.dotc.typer.Namer$Completer.complete(Namer.scala:755)\r\n\tat dotty.tools.dotc.core.SymDenotations$SymDenotation.completeFrom(SymDenotations.scala:219)\r\n\tat dotty.tools.dotc.core.SymDenotations$SymDenotation.info(SymDenotations.scala:197)\r\n\tat dotty.tools.dotc.core.SymDenotations$SymDenotation.ensureCompleted(SymDenotations.scala:336)\r\n\tat dotty.tools.dotc.typer.Typer.retrieveSym(Typer.scala:1479)\r\n\tat dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:1504)\r\n\tat dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1571)\r\n\tat dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1587)\r\n\tat dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1585)\r\n\tat dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:140)\r\n\tat dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)\r\n\tat dotty.tools.dotc.typer.Typer.typed(Typer.scala:1585)\r\n\tat dotty.tools.dotc.typer.Namer$$anonfun$typedAheadExpr$1.apply(Namer.scala:934)\r\n\tat dotty.tools.dotc.typer.Namer$$anonfun$typedAheadExpr$1.apply(Namer.scala:934)\r\n\tat dotty.tools.dotc.typer.Namer.typedAheadImpl(Namer.scala:924)\r\n\tat dotty.tools.dotc.typer.Namer.typedAheadExpr(Namer.scala:934)\r\n\tat dotty.tools.dotc.typer.Namer$$anonfun$completeParams$1.apply(Namer.scala:946)\r\n\tat dotty.tools.dotc.typer.Namer$$anonfun$completeParams$1.apply(Namer.scala:946)\r\n\tat scala.collection.immutable.List.foreach(List.scala:392)\r\n\tat dotty.tools.dotc.typer.Namer.completeParams(Namer.scala:946)\r\n\tat dotty.tools.dotc.typer.Namer$$anonfun$defDefSig$3.apply(Namer.scala:1131)\r\n\tat dotty.tools.dotc.typer.Namer$$anonfun$defDefSig$3.apply(Namer.scala:1131)\r\n\tat scala.collection.immutable.List.foreach(List.scala:392)\r\n\tat dotty.tools.dotc.typer.Namer.defDefSig(Namer.scala:1131)\r\n\tat dotty.tools.dotc.typer.Namer$Completer.typeSig(Namer.scala:733)\r\n\tat dotty.tools.dotc.typer.Namer$Completer.completeInCreationContext(Namer.scala:777)\r\n\tat dotty.tools.dotc.typer.Namer$Completer.complete(Namer.scala:755)\r\n\tat dotty.tools.dotc.core.SymDenotations$SymDenotation.completeFrom(SymDenotations.scala:219)\r\n\tat dotty.tools.dotc.core.SymDenotations$SymDenotation.info(SymDenotations.scala:197)\r\n\tat dotty.tools.dotc.core.SymDenotations$SymDenotation.ensureCompleted(SymDenotations.scala:336)\r\n\tat dotty.tools.dotc.typer.Typer.retrieveSym(Typer.scala:1479)\r\n\tat dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:1504)\r\n\tat dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1571)\r\n\tat dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1587)\r\n\tat dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1585)\r\n\tat dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:140)\r\n\tat dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)\r\n\tat dotty.tools.dotc.typer.Typer.typed(Typer.scala:1585)\r\n\tat dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:1609)\r\n\tat dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:1629)\r\n\tat dotty.tools.dotc.typer.Typer$$anonfun$typedClassDef$1.apply(Typer.scala:1319)\r\n\tat dotty.tools.dotc.typer.Typer$$anonfun$typedClassDef$1.apply(Typer.scala:1267)\r\n\tat dotty.tools.dotc.util.Stats$.track(Stats.scala:35)\r\n\tat dotty.tools.dotc.typer.Typer.typedClassDef(Typer.scala:1267)\r\n\tat dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:1517)\r\n\tat dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1571)\r\n\tat dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1587)\r\n\tat dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1585)\r\n\tat dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:140)\r\n\tat dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)\r\n\tat dotty.tools.dotc.typer.Typer.typed(Typer.scala:1585)\r\n\tat dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:1609)\r\n\tat dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:1629)\r\n\tat dotty.tools.dotc.typer.Typer$$anonfun$typedPackageDef$1.apply(Typer.scala:1432)\r\n\tat dotty.tools.dotc.typer.Typer$$anonfun$typedPackageDef$1.apply(Typer.scala:1419)\r\n\tat dotty.tools.dotc.util.Stats$.track(Stats.scala:35)\r\n\tat dotty.tools.dotc.typer.Typer.typedPackageDef(Typer.scala:1419)\r\n\tat dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:1556)\r\n\tat dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1572)\r\n\tat dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1587)\r\n\tat dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1585)\r\n\tat dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:140)\r\n\tat dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)\r\n\tat dotty.tools.dotc.typer.Typer.typed(Typer.scala:1585)\r\n\tat dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:1641)\r\n\tat dotty.tools.dotc.typer.FrontEnd$$anonfun$typeCheck$1.apply$mcV$sp(FrontEnd.scala:64)\r\n\tat dotty.tools.dotc.typer.FrontEnd.monitor(FrontEnd.scala:32)\r\n\tat dotty.tools.dotc.typer.FrontEnd.typeCheck(FrontEnd.scala:62)\r\n\tat dotty.tools.dotc.typer.FrontEnd$$anonfun$runOn$3.apply(FrontEnd.scala:93)\r\n\tat dotty.tools.dotc.typer.FrontEnd$$anonfun$runOn$3.apply(FrontEnd.scala:93)\r\n\tat scala.collection.immutable.List.foreach(List.scala:392)\r\n\tat dotty.tools.dotc.typer.FrontEnd.runOn(FrontEnd.scala:93)\r\n\tat dotty.tools.dotc.Run$$anonfun$compileUnits$1$$anonfun$apply$mcV$sp$1.apply(Run.scala:82)\r\n\tat dotty.tools.dotc.Run$$anonfun$compileUnits$1$$anonfun$apply$mcV$sp$1.apply(Run.scala:79)\r\n\tat scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)\r\n\tat scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186)\r\n\tat dotty.tools.dotc.Run$$anonfun$compileUnits$1.apply$mcV$sp(Run.scala:79)\r\n\tat dotty.tools.dotc.Run$$anonfun$compileUnits$1.apply(Run.scala:67)\r\n\tat dotty.tools.dotc.Run$$anonfun$compileUnits$1.apply(Run.scala:67)\r\n\tat dotty.tools.dotc.util.Stats$.monitorHeartBeat(Stats.scala:76)\r\n\tat dotty.tools.dotc.Run.compileUnits(Run.scala:67)\r\n\tat dotty.tools.dotc.Run.compileSources(Run.scala:64)\r\n\tat dotty.tools.dotc.Run.compile(Run.scala:48)\r\n\tat dotty.tools.dotc.Driver.doCompile(Driver.scala:26)\r\n\tat dotty.tools.dotc.Driver.process(Driver.scala:124)\r\n\tat dotty.tools.dotc.Driver.process(Driver.scala:93)\r\n\tat dotty.tools.dotc.Driver.process(Driver.scala:105)\r\n\tat dotty.tools.dotc.Driver.main(Driver.scala:132)\r\n\tat dotty.tools.dotc.Main.main(Main.scala)\r\n```"}}
{"actor":{"display_login":"nicolasstucki"}}