-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Ignore private/sealed abstract class/traits #14599
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
Conversation
lol def map[F[_]](self: Tuple, f: [t] => t => F[t]): Tuple = self match {
case EmptyTuple => self
case _ => fromIArray(self.productIterator.map(f(_).asInstanceOf[Object]).toArray.asInstanceOf[IArray[Object]]) // TODO use toIArray
}
Well the logic is right... outside of EmptyTuple, the Tuple class has no subclasses... 🙄 Do I special case tuple-vs-generic-tuple in SpaceEngine too?? |
def getChildren(sym: Symbol): List[Symbol] = | ||
sym.children.flatMap { child => | ||
if child eq sym then Nil // i3145: sealed trait Baz, val x = new Baz {}, Baz.children returns Baz... | ||
else if tp.classSymbol == defn.TupleClass || tp.classSymbol == defn.NonEmptyTupleClass then List(child) // Tuple is weird/different... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
else if tp.classSymbol == defn.TupleClass || tp.classSymbol == defn.NonEmptyTupleClass then List(child) // Tuple is weird/different... | |
else if tp.classSymbol == defn.TupleClass || tp.classSymbol == defn.NonEmptyTupleClass then List(child) // Tuple types are substituted for different classes at runtime |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, it makes me think: is there a reason TupleXXL doesn't extend Tuple and the TupleN classes made synthetically to extend Tuple? Then we wouldn't need this.
26ff039
to
9e3f86a
Compare
Fixes #14579