Please sign in to comment.
Remove misguided performance optimization from NominalType.
Putting the structural view into a second parameter list was done to speed up equality and hash code computation for NominalType, on the grounds that structural views have to be consistent anyway throughout the tree. However, this invariant only holds between phases. Inside a phase, the structural expansions may be temporarily inconsistent, causing Node.nodeTypedOrCopy to overwrite a type that has already been seen when replacing a NominalType with a new NominalType that has the same TypeSymbol but a different expansion. Fixes #912. Test in UnionTest.testBasic.
- Loading branch information
Showing with 21 additions and 15 deletions.
- +6 −0 slick-testkit/src/main/scala/com/typesafe/slick/testkit/tests/UnionTest.scala
- +3 −3 src/main/scala/scala/slick/ast/Node.scala
- +3 −3 src/main/scala/scala/slick/ast/Type.scala
- +7 −7 src/main/scala/scala/slick/compiler/Columnizer.scala
- +2 −2 src/main/scala/scala/slick/compiler/CreateResultSetMapping.scala