scala/scala — pull request #2297 by som-snytt (2013-03-23 21:31:18+00:00)
Title: SI-7261 BooleanSetting to Boolean conversion

Add an implicit for BooleanSetting to Boolean, since while we never expect the Spanish Inquisition, we do expect a boolean in an if clause.

The first cut put the implicit at AbsScalaSettings, but the more general case is at reflect/internal's MutableSettings. There was no particular desire to privilege mutability.

There is an additional implicit to convert BooleanSetting to BooleanFlag, in the second commit. Maybe you knew there was a BooleanFlag.

The second commit tries to be minimalist, just to 6x the .value. There are two or three spots where an expression has been restructured, but no intentional changes in behavior.

This PR is a rebase and resubmit of https://github.com/scala/scala/pull/2272.

Review by @paulp who liked the idea and @retronym who has already egged on.