42 lines
736 B
Plaintext
42 lines
736 B
Plaintext
Even though this is syntactically correct, the ``++void++`` return type should not be used in the signature of a constructor. Indeed some developers might be confused by this syntax, believing that the constructor is in fact a standard function.
|
|
|
|
|
|
== Noncompliant Code Example
|
|
|
|
[source,flex]
|
|
----
|
|
public class Foo
|
|
{
|
|
public function Foo() : void
|
|
{...}
|
|
}
|
|
----
|
|
|
|
|
|
== Compliant Solution
|
|
|
|
[source,flex]
|
|
----
|
|
public class Foo
|
|
{
|
|
public function Foo()
|
|
{...}
|
|
}
|
|
----
|
|
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::message.adoc[]
|
|
|
|
'''
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
include::comments-and-links.adoc[]
|
|
endif::env-github,rspecator-view[]
|