Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

Commented Issue: Unable to use IEnumerator objects from script [14]

$
0
0
When trying to enumerator elements by using collection.GetEnumerator(), the script engine cannot find the enumerator's MoveNext() method even though it is public accessible.

E.g. for List<Foo>, it will produce the following error:
'System.Collections.Generic.IEnumerator<Foo>' does not contain a definition for 'MoveNext'
for the following script:
var enumerator = list.GetEnumerator();
while (enumerator.MoveNext()) { ... }

I tried to debug into the source code. It indeed find the public MoveNext() method, but later in binder.Bind() it generates a throw expression.
Comments: Fixed in [Version 5.3.5](https://clearscript.codeplex.com/SourceControl/changeset/f961ab5a428cd1b6ffa92c9c4c7c35a9f3322a2c).

Viewing all articles
Browse latest Browse all 2297

Latest Images

Trending Articles





Latest Images