www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4698] New: Can't add constraints to templated class that uses inheritance

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4698

           Summary: Can't add constraints to templated class that uses
                    inheritance
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: dsimcha yahoo.com


--- Comment #0 from David Simcha <dsimcha yahoo.com> 2010-08-20 17:48:36 PDT ---
import std.range;

class Foo {}
class Bar(T) : Foo if(isInputRange!T) {}

test9.d(4): members expected
test9.d(4): { } expected following aggregate declaration
test9.d(4): Declaration expected, not 'if'

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 20 2010
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4698


Kosmonaut <Kosmonaut tempinbox.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Kosmonaut tempinbox.com


--- Comment #1 from Kosmonaut <Kosmonaut tempinbox.com> 2010-08-20 20:52:33 PDT
---
This works:

---
class Foo {}
class Bar(T) if(isInputRange!T) : Foo {}
---

I'm pretty sure that someone already filled a bug about this issue. Couldn't
find it though.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 20 2010
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4698


Kosmonaut <Kosmonaut tempinbox.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE


--- Comment #2 from Kosmonaut <Kosmonaut tempinbox.com> 2010-08-20 20:55:45 PDT
---
*** This issue has been marked as a duplicate of issue 3673 ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 20 2010