From 2d9a21c72329b7b213fc9030f7bc392b4a2bbfd7 Mon Sep 17 00:00:00 2001 From: Kevin Leung Date: Wed, 2 Aug 2017 15:36:41 +0800 Subject: [PATCH] Add copy() to DynamicAccess (#5863) --- std/haxe/DynamicAccess.hx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/std/haxe/DynamicAccess.hx b/std/haxe/DynamicAccess.hx index 64924d71e49..28673749ece 100644 --- a/std/haxe/DynamicAccess.hx +++ b/std/haxe/DynamicAccess.hx @@ -91,4 +91,9 @@ abstract DynamicAccess(Dynamic) from Dynamic to Dynamic { Returns an array of `keys` in a structure. **/ public inline function keys():Array return Reflect.fields(this); + + /** + Returns a shallow copy of the structure + **/ + public inline function copy():DynamicAccess return Reflect.copy(this); }