HaxeFoundation / HaxeManual

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

Add `@:keep` to sample function #514

Closed player-03 closed 2 years ago

player-03 commented 2 years 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 2 years ago

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

player-03 commented 2 years ago

How does that wording look?

Simn commented 2 years ago

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

player-03 commented 2 years ago

Possible alternatives: