[Nemerle 0001153]: Field of functional type does not compile in presence of extension method

1 view
Skip to first unread message

feed...@nemerle.org

unread,
Nov 27, 2008, 8:03:18 AM11/27/08
to nemerl...@googlegroups.com

The following issue has been SUBMITTED.
======================================================================
<http://nemerle.org/bugs/view.php?id=1153>
======================================================================
Reported By: nikov
Assigned To:
======================================================================
Project: Nemerle
Issue ID: 1153
Category: Compiler
Reproducibility: always
Severity: major
Priority: normal
Status: new
======================================================================
Date Submitted: 11-27-2008 14:03 CET
Last Modified: 11-27-2008 14:03 CET
======================================================================
Summary: Field of functional type does not compile in
presence of extension method
Description:
Try to compile this:

//////////////////////////////////////////
using System;
using System.Console;
using Nemerle.Utility;

module A {
class B {
public Foo : int -> int = fun(x) { x };
}
Main() : void { }
}

module C {
public Foo[T](this _ : T) : string { "A" }
}
//////////////////////////////////////////

Unexpected error occurs:
Error: needed a writable location for assignment target, got a yet-untyped
expression, which is read-only

If the extension method is removed, then the code compiles successfully.
======================================================================

Issue History
Date Modified Username Field Change
======================================================================
11-27-08 14:03 nikov New Issue
======================================================================

feed...@nemerle.org

unread,
Nov 27, 2008, 10:00:47 PM11/27/08
to nemerl...@googlegroups.com

The following issue has been RESOLVED.

======================================================================
<http://nemerle.org/bugs/view.php?id=1153>
======================================================================
Reported By: nikov
Assigned To: VladD2

======================================================================
Project: Nemerle
Issue ID: 1153
Category: Compiler
Reproducibility: always
Severity: major
Priority: normal
Status: resolved
Resolution: fixed
Fixed in Version:
======================================================================
Date Submitted: 11-27-2008 14:03 CET
Last Modified: 11-28-2008 04:00 CET

======================================================================
Summary: Field of functional type does not compile in
presence of extension method
Description:
Try to compile this:

//////////////////////////////////////////
using System;
using System.Console;
using Nemerle.Utility;

module A {
class B {
public Foo : int -> int = fun(x) { x };
}
Main() : void { }
}

module C {
public Foo[T](this _ : T) : string { "A" }
}
//////////////////////////////////////////

Unexpected error occurs:
Error: needed a writable location for assignment target, got a yet-untyped
expression, which is read-only

If the extension method is removed, then the code compiles successfully.
======================================================================

----------------------------------------------------------------------
VladD2 - 11-28-08 04:00
----------------------------------------------------------------------
Fixed in rev. 8158.

Issue History
Date Modified Username Field Change
======================================================================
11-27-08 14:03 nikov New Issue

11-28-08 04:00 VladD2 Status new => resolved
11-28-08 04:00 VladD2 Resolution open => fixed
11-28-08 04:00 VladD2 Assigned To => VladD2
11-28-08 04:00 VladD2 Note Added: 0002142
======================================================================

feed...@nemerle.org

unread,
Nov 27, 2008, 10:01:07 PM11/27/08
to nemerl...@googlegroups.com

The following issue has been set as RELATED TO issue 0001071.

Relationships ID Summary
----------------------------------------------------------------------
related to 0001071 Cannot assign to non-mutable field &quo...
======================================================================

----------------------------------------------------------------------
VladD2 - 11-28-08 04:00
----------------------------------------------------------------------
Fixed in rev. 8158.

Issue History
Date Modified Username Field Change
======================================================================
11-27-08 14:03 nikov New Issue
11-28-08 04:00 VladD2 Status new => resolved
11-28-08 04:00 VladD2 Resolution open => fixed
11-28-08 04:00 VladD2 Assigned To => VladD2
11-28-08 04:00 VladD2 Note Added: 0002142

11-28-08 04:00 VladD2 Description Updated
11-28-08 04:01 VladD2 Relationship added related to 0001071
======================================================================

Reply all
Reply to author
Forward
0 new messages