Skip to main content
This annotation is intended for complex cases and is primarily designed to be used by the built-in annotations.

Overview

copy_result marks a function such as table.Copy that returns a new table starting with the contents of its first argument. The copy keeps the original’s fields and methods. Fields you add to the copy stay on the copy and never show on the original.

Syntax

Put it after the @return line.

Example


See also