38 lines
641 B
Plaintext
Raw Normal View History

2021-04-28 16:49:39 +02:00
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.
2021-04-28 16:49:39 +02:00
== Noncompliant Code Example
----
class Foo { }
Foo = 0; // Noncompliant
----
2021-04-28 16:49:39 +02:00
== 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[]