www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10504] New: Tuple error: no property 'offsetof' for type 'int'

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

           Summary: Tuple error: no property 'offsetof' for type 'int'
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: ibuclaw ubuntu.com



This test is one of the unittests in std.typecons.

https://github.com/D-Programming-Language/phobos/blob/master/std/typecons.d#L622


The autotester passes, so apparently it *should* work *somehow*, but trying to
compile std.typecons alone with -unittest fails with:

Error: no property 'offsetof' for type 'int'
Error: no property 'offsetof' for type 'double'

Among some other errors and a nice SEGV, but I'll ignore that for the time
being... This particular error is a show stopper for the autotester for gdc
passing.


Reduced test:
---
import std.typecons;

void main()
{
  Tuple!(int, "a", double, "b") x;
  static assert(x.a.offsetof == x[0].offsetof);
  static assert(x.b.offsetof == x[1].offsetof);
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 29 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10504


Iain Buclaw <ibuclaw ubuntu.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |blocker


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 29 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10504


Andrej Mitrovic <andrej.mitrovich gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrej.mitrovich gmail.com



16:57:05 PDT ---
I've tried with 2.063.1, 2.063.2 and git-head but couldn't reproduce. I'm on
win32, perhaps it's a platform-specific bug, although I kind of doubt it.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 29 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10504


bearophile_hugs eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs eml.cc




 I've tried with 2.063.1, 2.063.2 and git-head but couldn't reproduce. I'm on
 win32, perhaps it's a platform-specific bug, although I kind of doubt it.
I have tried various combinations on dpaste (64 bit) and I have seen no errors. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 29 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10504




I do believe mine is dmd 2.063.0 64bit  (these point versions make things a bit
complicated when it comes to testers. =)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 29 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10504




Hmm... I can reproduce on all (debian package 2.063.0, 2.063.2, and zip
2.063.2).  Marking this as Linux-only if you windows guys have no problem.

Could be library bug rather than compiler perhaps...

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 29 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10504




Actually, I have just realised that was testing in the gdc libphobos folder, so
dmd would be pulling in gdc's libphobos, rather than dmd's.

I see there are lots of differences between std.typecons in 2.063.0->2.063.2 so
I'll upgrade my frontend to that new point release and retry...

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 29 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10504




Lack of fixing issue 10180?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 30 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10504





 Lack of fixing issue 10180?
Possibly... but that fixed isn't in 2.063.x -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 30 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10504






 Lack of fixing issue 10180?
Possibly... but that fixed isn't in 2.063.x
Yes. But, at the same time, 2.063.x Phobos does not contain my Tuple improvement. https://github.com/D-Programming-Language/phobos/pull/1308 So the issue would occur only with 2.063.x release dmd + git head Phobos -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 30 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10504


Kenji Hara <k.hara.pg gmail.com> changed:

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



This is already-fixed issue in git head.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 28 2013