[nem-bug] [Nemerle 0000769]: Can't subscribe on event if
'Nemerle.Collections' namespace opened
feedback at nemerle.org
feedback at nemerle.org
Wed Nov 29 15:09:28 CET 2006
The following issue has been RESOLVED.
======================================================================
<http://nemerle.org/bugs/view.php?id=769>
======================================================================
Reported By: VladD2
Assigned To: malekith
======================================================================
Project: Nemerle
Issue ID: 769
Category: Compiler
Reproducibility: always
Severity: minor
Priority: normal
Status: resolved
Resolution: fixed
Fixed in Version:
======================================================================
Date Submitted: 09-27-2006 20:32 CEST
Last Modified: 11-29-2006 15:09 CET
======================================================================
Summary: Can't subscribe on event if 'Nemerle.Collections'
namespace opened
Description:
// REFERENCE: System.Windows.Forms.dll
using System.Windows.Forms;
using Nemerle.Collections; // If comments this line then compilation done
successful.
public class TestForm : Form
{
Tree : TreeView = TreeView();
public this()
{
Tree.AfterSelect += fun(_, _arg : TreeViewEventArgs) // error!
{
};
}
public static Main() : void { }
}
------------------------------------------------------------------
Main.n(10,5,10,21): error : event
`System.Windows.Forms.TreeView.AfterSelect' can only appear on the
left-side of a += or -=
Main.n(10,5,10,21): error : event
`System.Windows.Forms.TreeView.AfterSelect' can only appear on the
left-side of a += or -=
======================================================================
Relationships ID Summary
----------------------------------------------------------------------
duplicate of 0000415 Something is not properly interpreted w...
======================================================================
----------------------------------------------------------------------
malekith - 11-08-06 23:14
----------------------------------------------------------------------
The problem is not really related to events:
using Nemerle.Collections;
class A {
mutable x : int;
public Tree : A
{
get { System.Console.WriteLine ("Tree_get called"); this }
}
public Foo () : void
{
Tree.x += 3;
}
}
A().Foo();
This will call the Tree getter twice, because Tree happens to be a type
name. I'm not sure how to resolve that though.
----------------------------------------------------------------------
malekith - 11-29-06 15:09
----------------------------------------------------------------------
Resolved on trunk, r7016. This is the same issue as
http://nemerle.org/bugs/view.php?id=415.
Issue History
Date Modified Username Field Change
======================================================================
09-27-06 20:32 VladD2 New Issue
11-08-06 23:14 malekith Note Added: 0001498
11-08-06 23:14 malekith Status new => confirmed
11-08-06 23:14 malekith Summary Can't subscribe on event
if 'Nemerle.Collections' namespace opened => Can\'t subscribe on event if
\'Nemerle.Collections\' namespace opened
11-08-06 23:14 malekith Description Updated
11-29-06 15:09 malekith Relationship added duplicate of 0000415
11-29-06 15:09 malekith Duplicate ID 0 => 415
11-29-06 15:09 malekith Status confirmed => resolved
11-29-06 15:09 malekith Resolution open => fixed
11-29-06 15:09 malekith Assigned To => malekith
11-29-06 15:09 malekith Note Added: 0001531
======================================================================
More information about the bugs
mailing list