We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a75df2f commit 9ba9600Copy full SHA for 9ba9600
spec/examples/record_update
@@ -106,3 +106,22 @@ component Main {
106
""
107
}
108
109
+-------------------------------------------------------------------------------
110
+type A {
111
+ b: B
112
+}
113
+
114
+type B {
115
+ str: String
116
117
118
+component Main {
119
+ fun render {
120
+ let data = {b: {str: "text" }}
121
122
+ // let's create a copy updating only the "text"
123
+ let dataUpdated = { data | b: { data.b | str: "text2" } }
124
125
+ "ok"
126
+ }
127
src/parsers/record_update.cr
@@ -6,7 +6,7 @@ module Mint
6
next unless char! '{'
7
whitespace
8
9
- value = variable || self.expression
+ value = self.expression
10
11
12
next unless value
0 commit comments