getProtection gives different result when member is accessed via getMember

2018-08-04 Thread Yuxuan Shui via Digitalmars-d-learn
file1.d: import std.stdio; file2.d: import file1; pragma(msg, __traits(getProtection, __traits(getMember, m1, "std"))); // public pragma(msg, __traits(getProtection, m1.std)); // private Bug? Intended?

Re: Compiler build error

2018-08-04 Thread Nicholas Wilson via Digitalmars-d-learn
On Saturday, 4 August 2018 at 18:12:05 UTC, Alex wrote: On Saturday, 4 August 2018 at 13:26:01 UTC, Nicholas Wilson wrote: 0 ldc2 0x000106fcc4e7 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37 1 ldc2 0x000106fcb9ea llvm::sys::RunSignalHandle

Re: Eponymous template member from a template mixin

2018-08-04 Thread Yuxuan Shui via Digitalmars-d-learn
On Saturday, 4 August 2018 at 21:10:32 UTC, Steven Schveighoffer wrote: On 8/4/18 4:10 PM, Yuxuan Shui wrote: This doesn't work: template A() { void B() {}; } template B() { mixin A!(); } void main() { B!()(); } Is this intentional? I believe mixin templates introduce a new sy

Re: Compiler build error

2018-08-04 Thread Alex via Digitalmars-d-learn
On Saturday, 4 August 2018 at 22:50:49 UTC, kinke wrote: On Saturday, 4 August 2018 at 18:12:05 UTC, Alex wrote: /snap/ldc2/78/bin/ldc2(_start+0x29)[0x8b7ee9] You haven't specified the DMD version you are using. Your LDC is 'outdated', so make sure to first check whether it still fails with

Re: Compiler build error

2018-08-04 Thread kinke via Digitalmars-d-learn
On Saturday, 4 August 2018 at 18:12:05 UTC, Alex wrote: /snap/ldc2/78/bin/ldc2(_start+0x29)[0x8b7ee9] You haven't specified the DMD version you are using. Your LDC is 'outdated', so make sure to first check whether it still fails with an up-to-date version before potentially wasting time.

Re: Eponymous template member from a template mixin

2018-08-04 Thread Jonathan M Davis via Digitalmars-d-learn
On Saturday, August 04, 2018 17:10:32 Steven Schveighoffer via Digitalmars- d-learn wrote: > On 8/4/18 4:10 PM, Yuxuan Shui wrote: > > This doesn't work: > > > > template A() { > > > > void B() {}; > > > > } > > template B() { > > > > mixin A!(); > > > > } > > void main() { > > > > B

Re: Eponymous template member from a template mixin

2018-08-04 Thread Steven Schveighoffer via Digitalmars-d-learn
On 8/4/18 4:10 PM, Yuxuan Shui wrote: This doesn't work: template A() { void B() {}; } template B() { mixin A!(); } void main() { B!()(); } Is this intentional? I believe mixin templates introduce a new symbol namespace to a degree. I doubt you would be able to do something li

Eponymous template member from a template mixin

2018-08-04 Thread Yuxuan Shui via Digitalmars-d-learn
This doesn't work: template A() { void B() {}; } template B() { mixin A!(); } void main() { B!()(); } Is this intentional?

Re: Compiler build error

2018-08-04 Thread Alex via Digitalmars-d-learn
On Saturday, 4 August 2018 at 13:29:36 UTC, kinke wrote: You're most likely hitting an ICE in the front-end (as both compilers crash). What you can always do is invoke the compiler in a GDB session. That's especially useful with an LDC CI build (download: https://github.com/ldc-developers/ldc/

Re: Compiler build error

2018-08-04 Thread Alex via Digitalmars-d-learn
On Saturday, 4 August 2018 at 13:26:01 UTC, Nicholas Wilson wrote: 0 ldc2 0x000106fcc4e7 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37 1 ldc2 0x000106fcb9ea llvm::sys::RunSignalHandlers() + 83 2 ldc2 0x000106fcc90e

Re: Dub project has both .sdl and .json files. Is this normal or did I do something wrong?

2018-08-04 Thread Neia Neutuladh via Digitalmars-d-learn
On Friday, 3 August 2018 at 19:41:32 UTC, Bastiaan Veelo wrote: But if you commit it, and a compiler deprecation causes a dependency in that pinned version to fail to compile, then your app won't compile either, even though your code itself does not suffer from the deprecation and even though a

Re: Dub project has both .sdl and .json files. Is this normal or did I do something wrong?

2018-08-04 Thread Jacob Carlborg via Digitalmars-d-learn
On 2018-08-03 21:41, Bastiaan Veelo wrote: But if you commit it, and a compiler deprecation causes a dependency in that pinned version to fail to compile, then your app won't compile either, even though your code itself does not suffer from the deprecation and even though a newer release of the

Re: Compiler build error

2018-08-04 Thread kinke via Digitalmars-d-learn
On Saturday, 4 August 2018 at 13:29:36 UTC, kinke wrote: [...] as it features debuginfos Sorry, scrach that (it used to for the Windows CI build but doesn't anymore).

Re: Compiler build error

2018-08-04 Thread Nicholas Wilson via Digitalmars-d-learn
On Saturday, 4 August 2018 at 12:21:36 UTC, Alex wrote: I'm a little bit confused by following situation: I have code, say around 8000 lines. Now, I'm facing a build error which just says dmd failed with exit code -11, (same for ldc2, with some lines of stack information, which do not belon

Re: Compiler build error

2018-08-04 Thread kinke via Digitalmars-d-learn
You're most likely hitting an ICE in the front-end (as both compilers crash). What you can always do is invoke the compiler in a GDB session. That's especially useful with an LDC CI build (download: https://github.com/ldc-developers/ldc/releases/tag/CI), as it features debuginfos and enabled L

Re: Compiler build error

2018-08-04 Thread Alex via Digitalmars-d-learn
On Saturday, 4 August 2018 at 12:21:36 UTC, Alex wrote: Ok. Dustmite finished. But the result is again an empty file... :(

Re: Can you tell if an template alias parameter is of a specific template?

2018-08-04 Thread Steven Schveighoffer via Digitalmars-d-learn
On 8/3/18 12:17 PM, aliak wrote: Hi Is there a way to tell if an alias is to a template? I'm writing some algorithms and I need to distinguish between a binary predicate that provides "less than" and one that provides "equal to" semantics. So I have these two templates: template eq(alias pr

Compiler build error

2018-08-04 Thread Alex via Digitalmars-d-learn
I'm a little bit confused by following situation: I have code, say around 8000 lines. Now, I'm facing a build error which just says dmd failed with exit code -11, (same for ldc2, with some lines of stack information, which do not belong to my code) 0 ldc2 0x000106f