HaxeFoundation / HaxeManual

The official Haxe manual
https://haxe.org/manual/
Creative Commons Attribution 4.0 International
221 stars 153 forks source link

Add `@:keep` to sample function #514

Closed player-03 closed 1 year ago

player-03 commented 1 year ago

Otherwise, DCE would clean it up and break the sample. Granted, you wouldn't typically run a sample with DCE, but if users were to copy the code into their own project, they could run into the issue there.

Resolves #475.

Simn commented 1 year ago

In that case we should probably also mention why we have @:keep there.

player-03 commented 1 year ago

How does that wording look?

Simn commented 1 year ago

"anywhere else" sounds somewhat imprecise, but I don't want to make this too complicated here. Thank you!

player-03 commented 1 year ago

Possible alternatives: