Skip to content

tab complete on classOf[Foo] assertion failed (AndType.apply of HKTypeLambda) #9334

Closed
@bishabosha

Description

@bishabosha

Minimized code

scala> class Foo[T]
// defined class Foo

scala> classOf[Foo].<PRESS TAB>

Output (click arrow to expand)

Exception in thread "main" java.lang.AssertionError: assertion failed: Foo & Object / HKTypeLambda(List(T), List(TypeBounds(TypeRef(ThisType(TypeRef(NoPrefix,module class scala)),class Nothing),TypeRef(ThisType(TypeRef(NoPrefix,module class scala)),class Any))), AppliedType(TypeRef(TermRef(ThisType(TypeRef(NoPrefix,module class <empty>)),module rs$line$1),class Foo),List(TypeParamRef(T)))) & TypeRef(ThisType(TypeRef(NoPrefix,module class lang)),class Object)
	at dotty.DottyPredef$.assertFail(DottyPredef.scala:17)
	at dotty.tools.dotc.core.Types$AndType$.apply(Types.scala:2912)
	at dotty.tools.dotc.core.Types$AndType$.make(Types.scala:2931)
	at dotty.tools.dotc.core.Types$AndType.derivedAndType(Types.scala:2894)
	at dotty.tools.dotc.core.Types$ApproximatingTypeMap.derivedAndType(Types.scala:5270)
	at dotty.tools.dotc.core.Types$TypeMap.mapOver(Types.scala:4997)
	at dotty.tools.dotc.core.TypeOps$AsSeenFromMap.op$1(TypeOps.scala:108)
	at dotty.tools.dotc.core.TypeOps$AsSeenFromMap.apply(TypeOps.scala:110)
	at dotty.tools.dotc.core.Types$TypeMap.op$4(Types.scala:4935)
	at dotty.tools.dotc.core.Types$TypeMap.mapArgs$1(Types.scala:4935)
	at dotty.tools.dotc.core.Types$TypeMap.mapOver(Types.scala:4943)
	at dotty.tools.dotc.core.TypeOps$AsSeenFromMap.op$1(TypeOps.scala:108)
	at dotty.tools.dotc.core.TypeOps$AsSeenFromMap.apply(TypeOps.scala:110)
	at dotty.tools.dotc.core.Types$TypeMap.mapOverLambda$1(Types.scala:4974)
	at dotty.tools.dotc.core.Types$TypeMap.mapOver(Types.scala:4976)
	at dotty.tools.dotc.core.TypeOps$AsSeenFromMap.op$1(TypeOps.scala:108)
	at dotty.tools.dotc.core.TypeOps$AsSeenFromMap.apply(TypeOps.scala:110)
	at dotty.tools.dotc.core.TypeOps$.asSeenFrom(TypeOps.scala:55)
	at dotty.tools.dotc.core.Types$Type.asSeenFrom(Types.scala:901)
	at dotty.tools.dotc.core.Denotations$SingleDenotation.derived$1(Denotations.scala:1026)
	at dotty.tools.dotc.core.Denotations$SingleDenotation.computeAsSeenFrom(Denotations.scala:1030)
	at dotty.tools.dotc.core.Denotations$SingleDenotation.computeAsSeenFrom(Denotations.scala:1002)
	at dotty.tools.dotc.core.Denotations$PreDenotation.asSeenFrom(Denotations.scala:135)
	at dotty.tools.dotc.core.SymDenotations$ClassDenotation.findMember(SymDenotations.scala:1982)
	at dotty.tools.dotc.core.Types$Type.go$1(Types.scala:582)
	at dotty.tools.dotc.core.Types$Type.findMember(Types.scala:750)
	at dotty.tools.dotc.core.Types$Type.memberBasedOnFlags(Types.scala:565)
	at dotty.tools.dotc.core.Types$Type.member(Types.scala:549)
	at dotty.tools.dotc.interactive.Completion$CompletionBuffer.appendMemberSyms$1(Completion.scala:270)
	at dotty.tools.dotc.interactive.Completion$CompletionBuffer.accessibleMembers$$anonfun$2(Completion.scala:272)
	at dotty.runtime.function.JProcedure2.apply(JProcedure2.java:15)
	at dotty.runtime.function.JProcedure2.apply(JProcedure2.java:10)
	at dotty.tools.dotc.core.Types$Type.memberDenots$$anonfun$1(Types.scala:795)
	at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:15)
	at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:10)
	at scala.collection.immutable.BitmapIndexedSetNode.foreach(HashSet.scala:932)
	at scala.collection.immutable.HashSet.foreach(HashSet.scala:939)
	at dotty.tools.dotc.core.Types$Type.memberDenots(Types.scala:795)
	at dotty.tools.dotc.interactive.Completion$CompletionBuffer.accessibleMembers(Completion.scala:272)
	at dotty.tools.dotc.interactive.Completion$CompletionBuffer.addAccessibleMembers(Completion.scala:280)
	at dotty.tools.dotc.interactive.Completion$CompletionBuffer.addMemberCompletions(Completion.scala:209)
	at dotty.tools.dotc.interactive.Completion$.computeCompletions(Completion.scala:121)
	at dotty.tools.dotc.interactive.Completion$.completions(Completion.scala:47)
	at dotty.tools.repl.ReplDriver.completions$$anonfun$1(ReplDriver.scala:186)
	at scala.util.Either.map(Either.scala:382)
	at dotty.tools.repl.ReplDriver.completions(ReplDriver.scala:187)
	at dotty.tools.repl.ReplDriver.$anonfun$3(ReplDriver.scala:111)
	at org.jline.reader.impl.LineReaderImpl.doComplete(LineReaderImpl.java:4397)
	at org.jline.reader.impl.LineReaderImpl.doComplete(LineReaderImpl.java:4363)
	at org.jline.reader.impl.LineReaderImpl.expandOrComplete(LineReaderImpl.java:4302)
	at org.jline.reader.impl.LineReaderImpl$1.apply(LineReaderImpl.java:3797)
	at org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:665)
	at org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:454)
	at dotty.tools.repl.JLineTerminal.readLine(JLineTerminal.scala:71)
	at dotty.tools.repl.ReplDriver.readLine$1(ReplDriver.scala:116)
	at dotty.tools.repl.ReplDriver.loop$1(ReplDriver.scala:126)
	at dotty.tools.repl.ReplDriver.runUntilQuit$$anonfun$1(ReplDriver.scala:131)
	at dotty.tools.repl.ReplDriver.withRedirectedOutput(ReplDriver.scala:150)
	at dotty.tools.repl.ReplDriver.runUntilQuit(ReplDriver.scala:131)
	at dotty.tools.repl.Main$.main(Main.scala:6)
	at dotty.tools.repl.Main.main(Main.scala)

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions