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


--- Comment #0 from Iain Buclaw <ibuclaw ubuntu.com> 2013-06-29 11:07:46 PDT ---
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


--- Comment #1 from Andrej Mitrovic <andrej.mitrovich gmail.com> 2013-06-29
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


--- Comment #2 from bearophile_hugs eml.cc 2013-06-29 17:08:11 PDT ---
(In reply to comment #1)
 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



--- Comment #3 from Iain Buclaw <ibuclaw ubuntu.com> 2013-06-29 17:13:35 PDT ---
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



--- Comment #4 from Iain Buclaw <ibuclaw ubuntu.com> 2013-06-29 17:19:15 PDT ---
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



--- Comment #5 from Iain Buclaw <ibuclaw ubuntu.com> 2013-06-29 17:59:05 PDT ---
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



--- Comment #6 from Kenji Hara <k.hara.pg gmail.com> 2013-06-30 01:27:42 PDT ---
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



--- Comment #7 from Iain Buclaw <ibuclaw ubuntu.com> 2013-06-30 04:41:23 PDT ---
(In reply to comment #6)
 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



--- Comment #8 from Kenji Hara <k.hara.pg gmail.com> 2013-06-30 06:03:50 PDT ---
(In reply to comment #7)
 (In reply to comment #6)
 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


--- Comment #9 from Kenji Hara <k.hara.pg gmail.com> 2013-09-28 23:13:19 PDT ---
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