[nem-bug] [Nemerle 0000769]: Can't subscribe on event if
'Nemerle.Collections' namespace opened
feedback at nemerle.org
feedback at nemerle.org
Wed Nov 8 23:14:32 CET 2006
The following issue has been CONFIRMED.
======================================================================
<http://nemerle.org/bugs/view.php?id=769>
======================================================================
Reported By: VladD2
Assigned To:
======================================================================
Project: Nemerle
Issue ID: 769
Category: Compiler
Reproducibility: always
Severity: minor
Priority: normal
Status: confirmed
======================================================================
Date Submitted: 09-27-2006 20:32 CEST
Last Modified: 11-08-2006 23:14 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 -=
======================================================================
----------------------------------------------------------------------
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.
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
======================================================================
More information about the bugs
mailing list