38 lines
641 B
Plaintext

A class declaration also creates a variable with the same name. It is possible to change the value of that variable but this is most likely an error. Even in the best-case scenario, where this is intentional, this is very confusing and should be avoided.
== Noncompliant Code Example
----
class Foo { }
Foo = 0; // Noncompliant
----
== Compliant Solution
----
let Foo = class { }
Foo = 0;
----
or
----
let Foo = class Foo { }
Foo = 0;
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::message.adoc[]
include::highlighting.adoc[]
endif::env-github,rspecator-view[]