Permalink
Browse files

Implicit vars should have non-implicit setters.

Otherwise they trigger spurious feature warnings.

    scala> trait T { implicit var a: Any }
    <console>:7: warning: implicit conversion method a_= should
    be enabled by making the implicit value
    language.implicitConversions visible.
  • Loading branch information...
1 parent 14b8045 commit b53c35c0660527a978dc44ea49fd66766e1a126d @retronym retronym committed Dec 19, 2012
@@ -262,7 +262,7 @@ class Flags extends ModifierFlags {
* Getters of immutable values also get STABLE.
*/
final val GetterFlags = ~(PRESUPER | MUTABLE)
- final val SetterFlags = ~(PRESUPER | MUTABLE | STABLE | CASEACCESSOR)
+ final val SetterFlags = ~(PRESUPER | MUTABLE | STABLE | CASEACCESSOR | IMPLICIT)
/** When a symbol for a default getter is created, it inherits these
* flags from the method with the default. Other flags applied at creation
@@ -0,0 +1 @@
+-feature -Xfatal-warnings
@@ -0,0 +1,3 @@
+object O {
+ implicit var x: Int = 0
+}

0 comments on commit b53c35c

Please sign in to comment.