Bug 321787 (MONO79075) - [ANONYMOUS METHODS] (FIXED) Iterators not working
Summary: [ANONYMOUS METHODS] (FIXED) Iterators not working
Status: RESOLVED FIXED
Alias: MONO79075
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 1.1
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Martin Baulig
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-15 09:13 UTC by Duncan Mak
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
iterator.cs (823 bytes, text/plain)
2006-08-15 09:14 UTC, Thomas Wiest
Details
get-attribute.cs (717 bytes, patch)
2006-08-15 09:27 UTC, Thomas Wiest
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 20:06:20 UTC


---- Reported by duncan@ximian.com 2006-08-15 02:13:31 MST ----

Iterators are not working.

Compile the following program with gmcs.

Expected Result:

c:\src> iterator.exe
1
2
3
YIELD
1
YIELD
2
YIELD
3

Actual Result:

duncan@sandhi:~/bugs> mono iterator.exe 
1
2
3
0



---- Additional Comments From duncan@ximian.com 2006-08-15 02:14:09 MST ----

Created an attachment (id=170251)
iterator.cs




---- Additional Comments From duncan@ximian.com 2006-08-15 02:20:51 MST ----

Addendum:

On Windows, I compiled with csc.

On Linux, I compiled with the latest gmcs from SVN.



---- Additional Comments From duncan@ximian.com 2006-08-15 02:27:31 MST ----

This might be the same bug.

With the next program, get-attribute.cs:

Expected result:
C:\src>get-attribute.exe
Expect: foo, Actual: foo
Expect bar, Actual: bar
Expecting BINGO, Actual: BINGO

Actual result:
duncan@sandhi:~/src/scratch> mono get-attribute.exe
Expect: foo, Actual: foo

Unhandled Exception: System.NullReferenceException: Object reference
not set to an instance of an object
  at System.Xml.XPath.XPathNodeIterator+<GetEnumerator>__0.MoveNext ()
[0x00000]
  at System.Xml.XPath.XPathNodeIterator+<GetEnumerator>__0.MoveNext ()
[0x00000]
  at Program.Main () [0x00000]




---- Additional Comments From duncan@ximian.com 2006-08-15 02:27:57 MST ----

Created an attachment (id=170252)
get-attribute.cs




---- Additional Comments From joncham@gmail.com 2006-08-15 09:03:21 MST ----

*** https://bugzilla.novell.com/show_bug.cgi?id=MONO78541 has been marked as a duplicate of this bug. ***



---- Additional Comments From duncan@ximian.com 2006-08-15 11:26:19 MST ----

Actually, I'm not sure if the non-XPath bug is the same bug as the
XPathNodeIterator one.

The non-XPath one seems to be calling the wrong method, maybe (see the
'0' output); whereas the XPathNodeIterator one has to do with a
NullReferenceException.

Either way, it's good that everyone's converged onto this bug now - we
can continue the future discussions on this problem here.



---- Additional Comments From martin@ximian.com 2006-08-31 14:31:20 MST ----

Setting Priority to a sane value and stealing the bug.



---- Additional Comments From martin@ximian.com 2006-10-04 18:19:17 MST ----

Fixed in SVN.

Imported an attachment (id=170251)
Imported an attachment (id=170252)

Unknown operating system unknown. Setting to default OS "Other".