[Nemerle 0001154]: Overload resolution not take into account type parameters constraints

1 view
Skip to first unread message

feed...@nemerle.org

unread,
Nov 27, 2008, 7:28:23 PM11/27/08
to nemerl...@googlegroups.com

The following issue has been SUBMITTED.
======================================================================
<http://nemerle.org/bugs/view.php?id=1154>
======================================================================
Reported By: VladD2
Assigned To:
======================================================================
Project: Nemerle
Issue ID: 1154
Category: Code Completion Engine
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 11-28-2008 01:28 CET
Last Modified: 11-28-2008 01:28 CET
======================================================================
Summary: Overload resolution not take into account type
parameters constraints
Description:
module A
{
Test() : void
{
System.Console.WriteLine(B().Foo("")); // E: string not a value type
System.Console.WriteLine(B().Foo(1));
}
}

class B { public Foo[T]( _ : T) : int where T : struct {
1 } }
module C { public Foo (this _ : B, _ : string) : string {
"A" } }

======================================================================

Issue History
Date Modified Username Field Change
======================================================================
11-28-08 01:28 VladD2 New Issue
======================================================================

feed...@nemerle.org

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

The following issue has been UPDATED.

======================================================================
<http://nemerle.org/bugs/view.php?id=1154>
======================================================================
Reported By: VladD2
Assigned To:
======================================================================
Project: Nemerle
Issue ID: 1154
Category: Compiler (type engine)

Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 11-28-2008 01:28 CET
Last Modified: 11-28-2008 01:29 CET

======================================================================
Summary: Overload resolution not take into account type
parameters constraints
Description:
module A
{
Test() : void
{
System.Console.WriteLine(B().Foo("")); // E: string not a value type
System.Console.WriteLine(B().Foo(1));
}
}

class B { public Foo[T]( _ : T) : int where T : struct {
1 } }
module C { public Foo (this _ : B, _ : string) : string {
"A" } }

======================================================================

Issue History
Date Modified Username Field Change
======================================================================
11-28-08 01:28 VladD2 New Issue

11-28-08 01:29 VladD2 Category Code Completion Engine =>
Compiler (type engine)
11-28-08 01:29 VladD2 Description Updated
======================================================================

feed...@nemerle.org

unread,
Nov 27, 2008, 8:14:31 PM11/27/08
to nemerl...@googlegroups.com

The following issue has been RESOLVED.

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

======================================================================
Project: Nemerle
Issue ID: 1154
Category: Compiler (type engine)
Reproducibility: always
Severity: minor
Priority: normal
Status: resolved
Resolution: fixed
Fixed in Version:
======================================================================
Date Submitted: 11-28-2008 01:28 CET
Last Modified: 11-28-2008 02:14 CET

======================================================================
Summary: Overload resolution not take into account type
parameters constraints
Description:
module A
{
Test() : void
{
System.Console.WriteLine(B().Foo("")); // E: string not a value type
System.Console.WriteLine(B().Foo(1));
}
}

class B { public Foo[T]( _ : T) : int where T : struct {
1 } }
module C { public Foo (this _ : B, _ : string) : string {
"A" } }

======================================================================

----------------------------------------------------------------------
VladD2 - 11-28-08 02:14
----------------------------------------------------------------------
Fixed in rev. 8157.

Issue History
Date Modified Username Field Change
======================================================================
11-28-08 01:28 VladD2 New Issue
11-28-08 01:29 VladD2 Category Code Completion Engine =>
Compiler (type engine)
11-28-08 01:29 VladD2 Description Updated

11-28-08 02:14 VladD2 Status new => resolved
11-28-08 02:14 VladD2 Resolution open => fixed
11-28-08 02:14 VladD2 Assigned To => VladD2
11-28-08 02:14 VladD2 Note Added: 0002141
======================================================================

Reply all
Reply to author
Forward
0 new messages