[Issue 8257] __traits(compiles) gives compile error

2012-10-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8257


Walter Bright  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
Version|D2  |D1 & D2
 Resolution||FIXED


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


[Issue 8549] Bad error message with const methods

2012-10-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8549



--- Comment #5 from bearophile_h...@eml.cc 2012-10-20 22:42:12 PDT ---
(In reply to comment #3)

> I would take a bigger pull to fix this since there's a lot of code duplication
> in DMD. Personally I would change the message to:
> 
> Error: function test.Foo.opSlice () is not callable using const(this)
> 
> What do you think?

Do you want me to reopen this bug report?

Maybe an error message that tells what to do is better (not complete error
message):

test.d(11): Error: function test.Foo.opSlice() needs to be const to [...]

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


[Issue 8860] New: DMD crashes in post-contract of auto function

2012-10-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8860

   Summary: DMD crashes in post-contract of auto function
   Product: D
   Version: D2
  Platform: x86_64
OS/Version: Windows
Status: NEW
  Keywords: contracts, ice
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: kekeni...@yahoo.co.jp


--- Comment #0 from kekeni...@yahoo.co.jp 2012-10-20 21:28:19 PDT ---
Test case:
-
class Any {
auto foo()
out  ( result ) { }
body { return 0; }
}
-

DMD crashes when compiling the above source.
DMD2.059 or older gives compile error against it. ( REJECT VALID? )

To reproduce:
 1. Class member
 2. Auto function
 3. Post-contract with parameter

Environment:
Windows 7 64-bit
DMD 2.060

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


[Issue 8257] __traits(compiles) gives compile error

2012-10-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8257



--- Comment #2 from github-bugzi...@puremagic.com 2012-10-20 20:27:21 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/95d00b2f0ae25d74e0091d17d5537232b8339fd4
Fix issue 8257 __traits(compiles) gives compile error

& v.staticfunc is a function pointer, not a delegate.
Change it into (v, &typeof(v).staticfunc)

https://github.com/D-Programming-Language/dmd/commit/349edf2f8fa130d49ce2361aad2ffa03f6cd55a7
Merge pull request #1194 from donc/bug8257_delegate_nonstatic

8257 x.staticfunc() is a function pointer, not a delegate

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


[Issue 8601] CTFE Assertion failure (interpret.c) on dstring[].toUpper

2012-10-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8601


Walter Bright  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
Version|D2  |D1 & D2
 Resolution||FIXED


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


[Issue 8601] CTFE Assertion failure (interpret.c) on dstring[].toUpper

2012-10-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8601



--- Comment #4 from github-bugzi...@puremagic.com 2012-10-20 19:26:01 PDT ---
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/c5e0be499bf9d1ecab59845409e1b8830e7c8376
Fix bug 8601: CTFE ICE on dstring[].toUpper

This error is spurious, the assert is incorrect.

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


[Issue 8801] assigning to __ctfe crashes the compiler

2012-10-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8801


Walter Bright  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
Version|unspecified |D2
 Resolution||FIXED


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


[Issue 8801] assigning to __ctfe crashes the compiler

2012-10-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8801



--- Comment #1 from github-bugzi...@puremagic.com 2012-10-20 18:20:44 PDT ---
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/f6d0cf50a5507de3b4dbd1803f757536d80c3f44
Fix issue 8801 assigning to __ctfe crashes the compiler

We need checks in two places, because constructing a variable doesn't call
toLvalue().

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


[Issue 6786] Bad error message in a wrong usage of ^^ pow operator

2012-10-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6786


Andrej Mitrovic  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||andrej.mitrov...@gmail.com
 Resolution||FIXED


--- Comment #1 from Andrej Mitrovic  2012-10-20 
18:20:19 PDT ---
The errors are now the same as the first error.

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


[Issue 8830] [CTFE] Incorrect slicing with pointer from sliced array

2012-10-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8830


Walter Bright  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
Version|unspecified |D1 & D2
 Resolution||FIXED


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


[Issue 6368] Too many error messages for a missing );

2012-10-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6368


Andrej Mitrovic  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||andrej.mitrov...@gmail.com
 Resolution||FIXED


--- Comment #1 from Andrej Mitrovic  2012-10-20 
18:16:44 PDT ---
This is now:

test.d(3): Error: expression expected, not '}'
test.d(4): Error: found 'EOF' when expecting ','
test.d(4): Error: found 'EOF' when expecting ')'
test.d(4): Error: found 'EOF' when expecting ';' following statement
test.d(4): Error: found 'EOF' when expecting '}' following compound statement

It seems like the minimal amount of error messages.

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


[Issue 6696] Error messages for const/immutable arrays given to immutable/const

2012-10-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6696


Andrej Mitrovic  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||andrej.mitrov...@gmail.com
 Resolution||FIXED


--- Comment #1 from Andrej Mitrovic  2012-10-20 
18:18:39 PDT ---
Only error now is:

Error: function test.foo (ref immutable(int[5u]) a) is not callable using
argument types (const(int[5u]))

line 7 is now allowed apparently.

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


[Issue 8859] New: Solaris port of the toolchain

2012-10-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8859

   Summary: Solaris port of the toolchain
   Product: D
   Version: D2
  Platform: All
OS/Version: Solaris
Status: NEW
  Severity: major
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: a...@lycus.org


--- Comment #0 from Alex R�nne Petersen  2012-10-21 03:00:08 
CEST ---
Creating this as a sort of meta-bug for porting the toolchain to Solaris.

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


[Issue 3413] DMD makefiles needs improvements

2012-10-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3413


Alex R�nne Petersen  changed:

   What|Removed |Added

 CC||a...@lycus.org


--- Comment #1 from Alex R�nne Petersen  2012-10-21 02:58:21 
CEST ---
Is this patch still relevant today?

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


[Issue 8830] [CTFE] Incorrect slicing with pointer from sliced array

2012-10-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8830



--- Comment #2 from github-bugzi...@puremagic.com 2012-10-20 17:18:49 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/abe37596dcfd0a150b86f703b582cfcf495c1727
Fix issue 8830 [CTFE] Incorrect slicing with pointer from sliced array

Simple bug -- the offset of the pointer needs to be added to the slice.

https://github.com/D-Programming-Language/dmd/commit/be5cae498f81c1e5965fd7755f432ffb7fdb5ec1
Minor code cleanup following bug 8830

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


[Issue 6755] Better wrong function pointer error message

2012-10-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6755


Andrej Mitrovic  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||andrej.mitrov...@gmail.com
 Resolution||FIXED


--- Comment #2 from Andrej Mitrovic  2012-10-20 
17:10:34 PDT ---
Seems fixed by some other pull, it's now:

test.d(4): Error: function test.bar (void function(const(int)) f) is not
callable using argument types (void function(const(float) c))

test.d(4): Error: cannot implicitly convert expression (& foo) of type void
function(const(float) c) to void function(const(int))

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


[Issue 8765] assert should print the source code for the condition when no message argument present

2012-10-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8765



--- Comment #2 from Andrej Mitrovic  2012-10-20 
16:44:41 PDT ---
(In reply to comment #1)
> (In reply to comment #0)
> > assert(5 == 4);

Actually wait a minute, it already does this in 2.060. Is there some other
example where this doesn't work?

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


[Issue 8765] assert should print the source code for the condition when no message argument present

2012-10-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8765


Andrej Mitrovic  changed:

   What|Removed |Added

 CC||andrej.mitrov...@gmail.com


--- Comment #1 from Andrej Mitrovic  2012-10-20 
16:33:23 PDT ---
(In reply to comment #0)
> assert(5 == 4);

When there is no message I can change this to:

core.exception.AssertError@test.d(5): assert(5 == 4)

Would this be ok with Walter? It's a 2 line change in the front-end.

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


[Issue 8788] The super constructor call can be prevented by mentioning "return".

2012-10-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8788


Walter Bright  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
 Resolution||FIXED


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


[Issue 8788] The super constructor call can be prevented by mentioning "return".

2012-10-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8788



--- Comment #3 from github-bugzi...@puremagic.com 2012-10-20 15:51:36 PDT ---
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/ecfb19e7d602594db174d9670416916b14b38466
Fix bug 8788 The super constructor call can be prevented by mentioning "return"

Fixes the flow analysis by clearly distinguishing "ALL branches have called a
constructor" from "ANY branches have called a ctor".
There are a large number of special cases.

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


[Issue 8818] CTFE fails to compare strings correctly

2012-10-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8818


Walter Bright  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
Version|D2  |D1 & D2
 Resolution||FIXED


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


[Issue 8770] Wrong error line number with immutable field

2012-10-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8770


Walter Bright  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
 Resolution||FIXED


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


[Issue 8770] Wrong error line number with immutable field

2012-10-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8770



--- Comment #1 from github-bugzi...@puremagic.com 2012-10-20 15:10:32 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/5db8f5fefd836291c21604b270b4893c44d4ce1f
Fixes Issue 8770

https://github.com/D-Programming-Language/dmd/commit/30a63578f8146cb5354994ac0b93a0c1f0123fac
Merge pull request #1195 from AndrejMitrovic/Fix8770

Fix Issue 8770 - Wrong error line number with immutable field

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


[Issue 8818] CTFE fails to compare strings correctly

2012-10-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8818



--- Comment #2 from github-bugzi...@puremagic.com 2012-10-20 15:14:05 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/81dfc8e45c6576c3711c77963da4744dad382cd6
fix issue 8818:  CTFE fails to compare strings correctly

https://github.com/D-Programming-Language/dmd/commit/fb6808ec01e95755aef5e68dbd9d99a5eaefa97b
Merge pull request #1190 from rainers/issue8818

fix issue 8818:  CTFE fails to compare strings correctly

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


[Issue 8178] Wrong line number in trying to modify enum string

2012-10-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8178


Walter Bright  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
 Resolution||FIXED


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


[Issue 8178] Wrong line number in trying to modify enum string

2012-10-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8178



--- Comment #1 from github-bugzi...@puremagic.com 2012-10-20 14:57:31 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/8e899db77b0b84f745cfed3d84dd33bba55a3e6c
Fixes Issue 8178

https://github.com/D-Programming-Language/dmd/commit/0ec078d388e4b929e9f38aed91e9b7857189fb61
Merge pull request #1196 from AndrejMitrovic/Fix8178

Fix Issue 8178 - Wrong line number in trying to modify enum string

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


[Issue 8271] [Ddoc] non-ascii character string macro names cannot be replaced

2012-10-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8271


Walter Bright  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


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


[Issue 8858] New: DMD's -v option doesn't output dependencies with imports inside functions

2012-10-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8858

   Summary: DMD's -v option doesn't output dependencies with
imports inside functions
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: thelastmamm...@gmail.com


--- Comment #0 from thelastmamm...@gmail.com 2012-10-20 10:49:48 PDT ---
this issue is the cause of issue
http://d.puremagic.com/issues/show_bug.cgi?id=8856 (import inside function
sometimes causes link errors)

I'm reproducing here Andrej Mitrovic's comment to the above issue:

DMD's -v option doesn't output dependencies when an import is
function local.

test.d:
module test;
import foo;
void main() { }

foo.d:
module foo;
import bar;

bar.d is empty

$ dmd -c -v test.d
> importfoo   (foo.d)
> importbar   (bar.d)

Now use a local import in foo.d:

foo.d:
module foo;
void loc() { import bar; }

$ dmd -c -v test.d
> importfoo   (foo.d)

DMD doesn't output the import to bar.d when using -v. That has to be fixed.

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


[Issue 4205] Strange error message when trying to call unknown method on string

2012-10-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4205


Andrej Mitrovic  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||andrej.mitrov...@gmail.com
 Resolution||FIXED


--- Comment #1 from Andrej Mitrovic  2012-10-20 
10:30:33 PDT ---
These are now:

test.d(11): Error: undefined identifier 'toHash'
test.d(12): Error: undefined identifier 'someFunc'
test.d(15): Error: undefined identifier 'someFunc'
test.d(17): Error: undefined identifier 'toHash'
test.d(18): Error: undefined identifier 'someFunc'

Which is one step forward and one step back. I'd prefer 'Error: no property
'toHash' for type 'int'', but I guess the new error is due to UFCS support.
Still the 'module' stuff is gone, so marking fixed.

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


[Issue 3350] Missing error message for bug 2788

2012-10-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3350


Andrej Mitrovic  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||andrej.mitrov...@gmail.com
 Resolution||FIXED


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


[Issue 3012] Bad error message when using string.format instead of std.string.format

2012-10-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3012


Andrej Mitrovic  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 CC||andrej.mitrov...@gmail.com
 Resolution||FIXED


--- Comment #5 from Andrej Mitrovic  2012-10-20 
10:00:26 PDT ---
Error is now:
test.d(5): Error: no property 'format' for type 'string'

This is clear enough now.

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


[Issue 2614] auto + templated structs = unhelpful error messages

2012-10-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2614


Andrej Mitrovic  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||andrej.mitrov...@gmail.com
 Resolution||FIXED


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


[Issue 8271] [Ddoc] non-ascii character string macro names cannot be replaced

2012-10-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8271



--- Comment #1 from github-bugzi...@puremagic.com 2012-10-20 09:35:46 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/f545e5de5c6cb7d59ef8b2a440066fc138877792
fix issue 8271 [Ddoc] non-ascii character string macro names cannot be replaced

https://github.com/D-Programming-Language/dmd/commit/ce40d5ceaf13f91728fdbcf3561e6dfef62472e8
Merge pull request #1192 from shoo/fix8271

fix issue 8271 [Ddoc] non-ascii character string macro names cannot be replaced

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


[Issue 3932] Title: A forward declaration error with a struct.init

2012-10-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3932


Andrej Mitrovic  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||andrej.mitrov...@gmail.com
 Resolution||FIXED


--- Comment #1 from Andrej Mitrovic  2012-10-20 
08:45:52 PDT ---
Seems to work in 2.061.

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


[Issue 4058] Wrong error message with __traits(getMember

2012-10-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4058


Andrej Mitrovic  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||andrej.mitrov...@gmail.com
 Resolution||FIXED


--- Comment #1 from Andrej Mitrovic  2012-10-20 
08:48:55 PDT ---
It now gives this generic error first:
test.d(7): Error: variable m cannot be read at compile time

I think that's clearer now.

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


[Issue 8857] New: [CTFE] Referring to a wrong member of a sruct in CTFE with -inline

2012-10-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8857

   Summary: [CTFE] Referring to a wrong member of a sruct in CTFE
with -inline
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: youx...@gmail.com


--- Comment #0 from Hisayuki Mima  2012-10-20 23:27:56 JST 
---
Code:

struct Result{ bool match; string next; }

void func1()(){
auto r = func2();
if(r.match){ // line 5
auto next = r.next;
}
}

Result func2(){
Result result;
result.match = true;
return result;
}

static assert({
func1();
return true;
}());

void main(){}



Compilation Output:

bug.d(5): Error: Result(true,null).next does not evaluate to a boolean.



The above code doesn't compiled by dmd 2.060 with -inline.
At the line 5, I surely wrote "r.match", but dmd seems to have recognized
"r.match" as "r.next".
This means that dmd is referring to a wrong member of the struct "Result".

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


[Issue 4542] [tdpl] TDPL NVI example results in linker error

2012-10-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4542


Jacob Carlborg  changed:

   What|Removed |Added

 CC||d...@me.com


--- Comment #14 from Jacob Carlborg  2012-10-20 06:35:47 PDT ---
(In reply to comment #13)

> Of course you'd have to fix your code and add 'virtual' to base methods, but
> this is practically an error-free refactoring since 'override' was already
> required. You would get CT errors rather than weird runtime behavior (like
> C++03).

It's really not. You can have a class that someone else inherits from, which
you don't control.

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


[Issue 8854] incomprehensible bug on windows with import side effect

2012-10-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8854



--- Comment #2 from Maxim Fomin  2012-10-20 04:12:53 PDT 
---
Forgot to mention - I cannot reproduce bug related to naming files and
directories.

Comparing disassembles of testfunc shows that they are same, except __lamda2.

Buggy version (presence of dummy import) boils down to following asm:

0x00419b84 <+0>:push   %rbp
0x00419b85 <+1>:mov%rsp,%rbp
0x00419b88 <+4>:sub$0x10,%rsp
0x00419b8c <+8>:mov(%rdi),%rax
0x00419b8f <+11>:leaveq 
0x00419b90 <+12>:retq 

However, in correct version of program without dummy import asm is:

0x00419c68 <+0>:push   %rbp
0x00419c69 <+1>:mov%rsp,%rbp
0x00419c6c <+4>:sub$0x10,%rsp
0x00419c70 <+8>:mov-0x30(%rdi),%rax
0x00419c74 <+12>:leaveq 
0x00419c75 <+13>:retq  

It seems that importing some code changes size of type.

In everything else assemblies look similar, except in changes of relatives
addresses (binaries are of different sizes.) May be worth mentioning that
running two version shows that differences started at calling opIndex of
MapStruct
(https://github.com/D-Programming-Language/phobos/blob/master/std/algorithm.d#L438).
In buggy version index=42_998_32, in correct version index=42_982_32. Both
function return same value.

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


[Issue 8854] incomprehensible bug on windows with import side effect

2012-10-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8854


Maxim Fomin  changed:

   What|Removed |Added

 CC||ma...@maxim-fomin.ru


--- Comment #1 from Maxim Fomin  2012-10-20 01:11:57 PDT 
---
This happens in linux too with both options -m32 and -m64 (dmd 2.060). Also if
dummy import of std.stdio is changed to other module (eg. bigint) the bug still
happens.

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