diff options
author | Paul Phillips <paulp@improving.org> | 2012-05-03 11:30:33 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-05-03 11:45:21 -0700 |
commit | 453d615fb3c6d0db3a0a43c9232bc12584e39107 (patch) | |
tree | 2698a7a2c09c47b3a0f25722fa47f90ef49641bc /src/compiler/scala/reflect/internal/Types.scala | |
parent | 03e3a40951ec7d1612cb668973f4d2e5e01872e9 (diff) | |
download | scala-453d615fb3c6d0db3a0a43c9232bc12584e39107.tar.gz scala-453d615fb3c6d0db3a0a43c9232bc12584e39107.tar.bz2 scala-453d615fb3c6d0db3a0a43c9232bc12584e39107.zip |
Fix for SI-5608, crasher with value classes.
Anyone who doubts the importance of avoiding duplication is
invited to look closely at the cause of this bug as revealed in
this one line patch.
Diffstat (limited to 'src/compiler/scala/reflect/internal/Types.scala')
-rw-r--r-- | src/compiler/scala/reflect/internal/Types.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/scala/reflect/internal/Types.scala b/src/compiler/scala/reflect/internal/Types.scala index 799671f9e3..9867c23c70 100644 --- a/src/compiler/scala/reflect/internal/Types.scala +++ b/src/compiler/scala/reflect/internal/Types.scala @@ -3276,8 +3276,10 @@ trait Types extends api.Types { self: SymbolTable => final class UniqueErasedValueType(sym: Symbol) extends ErasedValueType(sym) with UniqueType object ErasedValueType { - def apply(sym: Symbol): Type = + def apply(sym: Symbol): Type = { + assert(sym ne NoSymbol, "ErasedValueType cannot be NoSymbol") unique(new UniqueErasedValueType(sym)) + } } /** A class representing an as-yet unevaluated type. |