Permalink
Browse files

Reverse code fix introduced in commit f5409bf . The situation can no …

…longer occur.
  • Loading branch information...
iulianu committed Nov 30, 2015
1 parent 6d7297e commit 5d7ed397155ab61ab212780883c889ad1df9a18c
Showing with 5 additions and 5 deletions.
  1. +5 −5 slick/src/main/scala/slick/compiler/RemoveFieldNames.scala
@@ -14,11 +14,11 @@ class RemoveFieldNames(val alwaysKeepSubqueryNames: Boolean = false) extends Pha
val CollectionType(_, NominalType(top, StructType(fdefs))) = rsm.from.nodeType
val indexes = fdefs.iterator.zipWithIndex.map { case ((s, _), i) => (s, ElementSymbol(i+1)) }.toMap
val rsm2 = rsm.nodeMapServerSide(false, { n =>
val refTSyms = n.collect[ConstArray[TypeSymbol]] {
case Select(_ :@ NominalType(s, _), _) => ConstArray(s)
case Union(_ :@ CollectionType(_, NominalType(s1, _)), _ :@ CollectionType(_, NominalType(s2, _)), _) => ConstArray(s1, s2)
case Comprehension(_, _ :@ CollectionType(_, NominalType(s, _)), _, _, _, _, _, _, _, _) if alwaysKeepSubqueryNames => ConstArray(s)
}.flatten.toSet
val refTSyms = n.collect[TypeSymbol] {
case Select(_ :@ NominalType(s, _), _) => s
case Union(_, _ :@ CollectionType(_, NominalType(s, _)), _) => s
case Comprehension(_, _ :@ CollectionType(_, NominalType(s, _)), _, _, _, _, _, _, _, _) if alwaysKeepSubqueryNames => s
}.toSet
val allTSyms = n.collect[TypeSymbol] { case p: Pure => p.identity }.toSet
val unrefTSyms = allTSyms -- refTSyms
n.replaceInvalidate {

0 comments on commit 5d7ed39

Please sign in to comment.