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 264ee7c commit 40ba378Copy full SHA for 40ba378
OSL Programs/tests/unit/typed-variables.test.js
@@ -125,7 +125,33 @@ const tests = [
125
log value
126
`,
127
{ expect: [15] }
128
- )
+ ),
129
+
130
+ helper.createTest(
131
+ 'Any typed variable functions like local variables',
132
+ `
133
+ def arrSum(arr) (
134
+ any out = 0
135
+ for i arr.len (
136
+ out += arr[i]
137
+ )
138
+ return out
139
140
141
+ log arrsum([1,2,3,4,5])
142
+ `,
143
+ { expect: [15] }
144
145
146
147
+ 'Any typed variable does affect local variables',
148
149
+ any lol = 10
150
+ local lol = 20
151
+ log lol
152
153
+ { expect: [20] }
154
155
];
156
157
module.exports = { tests };
0 commit comments