scala/scala — pull request #1905 by adriaanm (2013-01-15 23:51:00+00:00)
Title: SI-6956 determine switchability by type, not tree

Constant folding will set the type of a constant tree
to `ConstantType(Constant(folded))`, while the tree
itself can be many different things (in casu, an Ident).

We used to look at the tree directly when deciding whether
to emit a switch. Now we look at the tree's type. Voilà.

review by @paulp