From ccf824796d371c55beb7b4d569e5cb8a188aad24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20M=C3=BCller?= Date: Thu, 26 Sep 2024 14:55:39 -0700 Subject: [PATCH] fix order in example --- docs/language/resources.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/language/resources.mdx b/docs/language/resources.mdx index 45872eb..1023a40 100644 --- a/docs/language/resources.mdx +++ b/docs/language/resources.mdx @@ -280,9 +280,9 @@ Instead, use a swap statement to replace the resource with another resource. ```cadence let child <- create Child(name: "Child 1") -let parent <- create Parent(name: "Parent", child: <-child) - child.name // is "Child 1" + +let parent <- create Parent(name: "Parent", child: <-child) parent.child.name // is "Child 1" // Invalid: Cannot move resource out of variable resource field.