<div dir="ltr"><div>Hi,</div><div><br></div><div>When access the `dynamicType` of a class inside one of its instance methods. We should be using `self.dynamicType`. I purpose that the dynamicType operator can be accessed without the need for the `self`.</div><div>So code like the following</div><div><br></div><div><div>class Foo {</div><div> static let SomeStaticConstantValue = 5</div><div> static func someStaticMethod() {</div><div> }</div><div><br></div><div> func bar() {</div><div> self.dynamicType.someStaticMethod()</div><div> print(self.dynamicType.SomeStaticConstantValue)</div><div> }</div><div>}</div></div><div><br></div><div>can be translated to </div><div><br></div><div><div>class Foo {</div><div> static let SomeStaticConstantValue = 5</div><div> static func someStaticMethod() {</div><div> }</div><div><br></div><div> func bar() {</div><div> dynamicType.someStaticMethod()</div><div> print(dynamicType.SomeStaticConstantValue)</div><div> }</div><div>}</div></div><div><br></div><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr">Best Regards,<div>Mohamed Afifi</div></div></div></div></div></div>
</div>