[Issue 14089] New: [REG2.064] Assigning to AA has no value when overriding opAssign
https://issues.dlang.org/show_bug.cgi?id=14089 Issue ID: 14089 Summary: [REG2.064] Assigning to AA has no value when overriding opAssign Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: rejects-valid Severity: regression Priority: P1 Component: DMD Assignee: nob...@puremagic.com Reporter: sinkuup...@gmail.com Introduced in: https://github.com/D-Programming-Language/dmd/pull/2539 void test() { Test[int] aa; Test b = aa[1] = Test(); } struct Test { Test opAssign(Test val) // ok if remove this { return this; } } $ dmd test.d test.d(4): Error: expression 1 in aa ? aa[1].opAssign(Test()) : cast(void)(aa[1] = Test()) is void and has no value --
[Issue 14041] Refused writeln of a fixed size array of chars
https://issues.dlang.org/show_bug.cgi?id=14041 sinkuup...@gmail.com changed: What|Removed |Added Keywords||pull CC||sinkuup...@gmail.com --- Comment #1 from sinkuup...@gmail.com --- https://github.com/D-Programming-Language/phobos/pull/2940 --
[Issue 14042] std.conv.to of a immutable char pointer
https://issues.dlang.org/show_bug.cgi?id=14042 sinkuup...@gmail.com changed: What|Removed |Added Keywords||pull CC||sinkuup...@gmail.com --- Comment #1 from sinkuup...@gmail.com --- https://github.com/D-Programming-Language/phobos/pull/2942 --
[Issue 14037] Problem with BigInt and std.functional.memoize
https://issues.dlang.org/show_bug.cgi?id=14037 sinkuup...@gmail.com changed: What|Removed |Added CC||sinkuup...@gmail.com Hardware|x86 |All OS|Windows |All --- Comment #1 from sinkuup...@gmail.com --- Error on assigning to AA of BigInt seems a compiler problem: https://issues.dlang.org/show_bug.cgi?id=14089 However, memoize shouldn't assume that an overloaded opAssign returns the object. So I think your fix to memoize is necessary. --
[Issue 14042] std.conv.to of a immutable char pointer
https://issues.dlang.org/show_bug.cgi?id=14042 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/7cab71b22bd829db8712e9a4c4b9c7b62a51552a Fix Issue 14042 - std.conv.to of a immutable char pointer https://github.com/D-Programming-Language/phobos/commit/7b8c9b2e1a3dd44de769653b3f3b826b6e038181 Merge pull request #2942 from sinkuu/fix_14042 Fix Issue 14042 - std.conv.to of a immutable char pointer --
[Issue 14042] std.conv.to of a immutable char pointer
https://issues.dlang.org/show_bug.cgi?id=14042 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --
[Issue 14090] New: [REG2.067a] Incorrect recursive alias declaration
https://issues.dlang.org/show_bug.cgi?id=14090 Issue ID: 14090 Summary: [REG2.067a] Incorrect recursive alias declaration Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: rejects-valid Severity: regression Priority: P1 Component: DMD Assignee: nob...@puremagic.com Reporter: verylonglogin@gmail.com This code used to compile: --- import std.algorithm: min, max; import std.range: StoppingPolicy; import std.traits; template Template(alias Pred, int argumentsCount, EnumType = void) if(argumentsCount = -1) { static if(isSomeString!(typeof(Pred))) { template Template(Args...) if(argumentsCount == -1 || Args.length == argumentsCount) { static if(argumentsCount = 1 argumentsCount = 2) { static if(__traits(compiles, { enum e = Args[0]; })) enum a = Args[0]; else static if(is(Args[0])) alias T = Args[0]; else alias A = Args[0]; static if(argumentsCount == 2) { static if(__traits(compiles, { enum e = Args[1]; })) enum b = Args[1]; else static if(is(Args[1])) alias U = Args[1]; else alias B = Args[1]; } } static if(is(EnumType == void)) { static if(__traits(compiles, { enum e = mixin(Pred); })) enum Template = mixin(Pred); else mixin(`alias Template = `~Pred~`;`); } else { enum EnumType Template = mixin(Pred); } } } else alias Template = Pred; } alias UnaryTemplate(alias Pred, EnumType = void) = Template!(Pred, 1, EnumType); alias GenericTuple(Args...) = Args; template PackedGenericTuple(Args...) { alias Tuple = Args; static if(isTypeTuple!Args) alias Types = Args; else static if(isExpressionTuple!Args) alias expressions = Args; enum length = Tuple.length; enum empty = !length; } template packedExpressionTuple(expr...) if(isExpressionTuple!expr) { alias packedExpressionTuple = PackedGenericTuple!expr; } template RoundRobinTuple(packedTuples...) { struct _Empty; enum pred(alias A) = !is(A == _Empty); alias ChainFunc(alias packedTuple) = packedTuple.Tuple; alias RoundRobinTuple = MapTuple!(ChainFunc, ZipTuple!(StoppingPolicy.longest, GenericTuple!_Empty, packedTuples)); } template ZipTuple(StoppingPolicy stoppingPolicy : StoppingPolicy.longest, alias empty, packedTuples...) { alias ZipTuple = ZipTupleImpl!(stoppingPolicy, PackedGenericTuple!empty, packedTuples); } template ZipTuple(StoppingPolicy stoppingPolicy : StoppingPolicy.longest, empty, packedTuples...) { alias ZipTuple = ZipTupleImpl!(stoppingPolicy, PackedGenericTuple!empty, packedTuples); } template ZipTuple(StoppingPolicy stoppingPolicy, packedTuples...) if(stoppingPolicy != StoppingPolicy.longest) // probably a compiler @@@BUG@@@ workaround { alias ZipTuple = ZipTupleImpl!(stoppingPolicy, PackedGenericTuple!void, packedTuples); } template ZipTuple(packedTuples...) { alias ZipTuple = ZipTuple!(StoppingPolicy.shortest, packedTuples); } private template ZipTupleImpl(StoppingPolicy stoppingPolicy, alias default_, packedTuples...) { alias lengths = MapTuple!(`A.length`, packedTuples); template Impl(size_t n, packedTuples...) { static if(n) { template tupleFrontOrDefault(alias packedTuple) { static if(!packedTuple.empty) alias tupleFrontOrDefault = packedTuple.Tuple[0 .. 1]; else alias tupleFrontOrDefault = default_.Tuple; } alias Impl = GenericTuple!(PackedGenericTuple!(MapTuple!(tupleFrontOrDefault, packedTuples)), Impl!(n - 1, MapTuple!(`PackedGenericTuple!(A.Tuple[!A.empty .. $])`, packedTuples))); } else alias Impl = GenericTuple!(); } static if(packedTuples.length == 1 || stoppingPolicy == StoppingPolicy.requireSameLength) enum length = lengths[0]; else enum length = GenericTuple!(min, max) [stoppingPolicy == StoppingPolicy.longest](lengths); alias ZipTupleImpl = Impl!(length, packedTuples); } template MapTuple(alias Func, A...) { alias FuncTemplate = UnaryTemplate!Func; static if (A.length) alias MapTuple = GenericTuple!(FuncTemplate!(A[0]), MapTuple!(FuncTemplate, A[1 .. $])); else alias MapTuple = GenericTuple!(); } void main() { alias roundRobin = RoundRobinTuple!(packedExpressionTuple!(1, 2, 3),
[Issue 14091] New: Migrate Digger to D-Programming-Language/tools
https://issues.dlang.org/show_bug.cgi?id=14091 Issue ID: 14091 Summary: Migrate Digger to D-Programming-Language/tools Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: tools Assignee: nob...@puremagic.com Reporter: and...@erdani.com See also discussion in https://github.com/D-Programming-Language/tools/pull/158 --
[Issue 14091] Migrate Digger to D-Programming-Language/tools
https://issues.dlang.org/show_bug.cgi?id=14091 Andrei Alexandrescu and...@erdani.com changed: What|Removed |Added Assignee|nob...@puremagic.com|thecybersha...@gmail.com --
[Issue 13776] [REG2.067a] Incorrect recursive alias declaration error with `__traits(compiles, ...)`
https://issues.dlang.org/show_bug.cgi?id=13776 --- Comment #3 from Denis Shelomovskij verylonglogin@gmail.com --- (In reply to Kenji Hara from comment #2) (In reply to Kenji Hara from comment #1) https://github.com/D-Programming-Language/dmd/pull/4172 PR is merged and the issue is fixed. https://github.com/D-Programming-Language/dmd/commit/ 5ba2e4e4dc7de523352d0b61143d7c9bd2bd594a OK, but unstd.generictuple still doesn't compile. Opened Issue 14090. Sorry it's not that reduced. --
[Issue 14041] Refused writeln of a fixed size array of chars
https://issues.dlang.org/show_bug.cgi?id=14041 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --
[Issue 14041] Refused writeln of a fixed size array of chars
https://issues.dlang.org/show_bug.cgi?id=14041 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/6a3cd276b8a39d5cfc6fe7280accfe692c6d16f4 Fix issue 14041 - Refused writeln of a fixed size array of chars https://github.com/D-Programming-Language/phobos/commit/c3680e5bf8d701e4a0fca52f42106cf7113eedd7 Merge pull request #2940 from sinkuu/fix_14041 Fix issue 14041 - Refused writeln of a fixed size array of chars --
[Issue 14057] [REG2.066] opSlice not working correctly with AliasThis
https://issues.dlang.org/show_bug.cgi?id=14057 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/5e9006b90825453600b2080bca2ecd5f337deb14 Cleanup of #2724 Various semantic improvements Documentation improvements Disabled opSlice due to issue 14057 https://github.com/D-Programming-Language/phobos/commit/36cf60b4bf80ceca97ee13d4e16bdc499ccdd9c4 Re-enabled opSlice for std.exception.handle now that bug 14057 is fixed --
[Issue 14092] New: C++ mangling for struct nested inside same class as static function is broken when in namespace
https://issues.dlang.org/show_bug.cgi?id=14092 Issue ID: 14092 Summary: C++ mangling for struct nested inside same class as static function is broken when in namespace Product: D Version: D2 Hardware: x86_64 OS: Mac OS X Status: NEW Severity: normal Priority: P1 Component: DMD Assignee: nob...@puremagic.com Reporter: coldencul...@gmail.com On OSX (possibly other platforms, I haven't gotten to check), when a class in a namespace has a static extern(C++) function takes a struct nested inside the same class, the mangling for that struct ignores it's parent class, and just uses the namespace qualifier. Example: C++: --- namespace v8 { class Isolate { public: struct CreateParams { }; static Isolate* New(CreateParams params) { return 0; } }; } --- D: --- extern(C++, v8) { class Isolate { struct CreateParams { } static Isolate New(CreateParams params); } } void main() { auto o1 = Isolate.New( Isolate.CreateParams() ); } --- This results in the following error message: --- Undefined symbols for architecture x86_64: v8::Isolate::New(v8::CreateParams), referenced from: __Dmain in run_test.o ld: symbol(s) not found for architecture x86_64 --- It should be looking for v8::Isolate::New(v8::Isolate::CreateParams) instead. --
[Issue 14092] C++ mangling for struct nested inside same class as static function is broken when in namespace
https://issues.dlang.org/show_bug.cgi?id=14092 Colden Cullen coldencul...@gmail.com changed: What|Removed |Added Keywords||C++ --
[Issue 14093] New: __traits(compiles, cast(Object)(tuple)) is true even if it doesn't compile.
https://issues.dlang.org/show_bug.cgi?id=14093 Issue ID: 14093 Summary: __traits(compiles, cast(Object)(tuple)) is true even if it doesn't compile. Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: regression Priority: P1 Component: DMD Assignee: nob...@puremagic.com Reporter: kpierre+dl...@outlook.com This code does not compile on most DMD compiler version on Linux: import std.typecons; void main() { Tuple!(int, x, int, y) point; static if (__traits(compiles, {auto newPoint = cast(Object)(point);})) { {auto newPoint = cast(Object)(point);} } } The compiles trait evaluates to true, even though it's impossible to cast a tuple to object. The code compiles if I run it in DPaste version DMD 2.x Git (cfb5842b49). It doesn't work in 2.065.0 or commit 7c769ec517e8acc086d92c9dc0d6a680b83f69f0. Since this bug seems to come and go there should probably be a unit test for it. --
[Issue 14094] New: Using string import in map results in error message with __error
https://issues.dlang.org/show_bug.cgi?id=14094 Issue ID: 14094 Summary: Using string import in map results in error message with __error Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: DMD Assignee: nob...@puremagic.com Reporter: d...@me.com I'm not sure if this is supposed to compile but the following will result a compile error which includes __error in the error message: import std.algorithm; enum foo = [foo].map!((string e) = import(e)); The error message is: main.d(2): Error: variable e cannot be read at compile time main.d(2): Error: file name argument must be a string, not (__error) --
[Issue 14093] __traits(compiles, cast(Object)(tuple)) is true even if it doesn't compile.
https://issues.dlang.org/show_bug.cgi?id=14093 Pierre krafft kpierre+dl...@outlook.com changed: What|Removed |Added CC||kpierre+dl...@outlook.com --
[Issue 14096] ICE in toir.c: 187
https://issues.dlang.org/show_bug.cgi?id=14096 Vlad Levenfeld vlevenf...@gmail.com changed: What|Removed |Added CC||vlevenf...@gmail.com --
[Issue 14096] New: ICE in toir.c: 187
https://issues.dlang.org/show_bug.cgi?id=14096 Issue ID: 14096 Summary: ICE in toir.c: 187 Product: D Version: D1 D2 Hardware: x86_64 OS: Linux Status: NEW Severity: major Priority: P1 Component: DMD Assignee: nob...@puremagic.com Reporter: vlevenf...@gmail.com with dmd git head: --M1.d--- struct Baz (alias f) { void g (){} } auto baz (alias f)(void[]) { return Baz!f(); } auto bar () { return [].baz!(i = i); } --M2.d--- import M1; import std.typecons; auto x (alias s)() { typeof(s) p; } auto foo (T)(T t) {x!t;} void main () { tuple(bar).foo; } -result--- Internal error: toir.c 187 --
[Issue 14097] New: root/async.c: free after use
https://issues.dlang.org/show_bug.cgi?id=14097 Issue ID: 14097 Summary: root/async.c: free after use Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Severity: critical Priority: P1 Component: DMD Assignee: nob...@puremagic.com Reporter: ket...@ketmar.no-ip.org Created attachment 1473 -- https://issues.dlang.org/attachment.cgi?id=1473action=edit fix use after free in async.c async file reader (windows version at least) has a nasty bug: it uses `AsyncRead` structure after `free()`. this is what makes dmd.exe crash under my wine. i found that by inserting `printf`s everywhere. then i saw this: ..\dmd\src\dmd.exe -c -o- -Isrc -Iimport -Hfimport\core\sync\barrier.di src\core\sync\barrier.d AsyncRead::create: aw = 00242754; max=1 *** addFile(file = 00262510) filesdim = 0, filesmax = 1 addFile done: (f = 00242760; file = 00262510; result=0; event=003C) *** ::start aw-filesdim = 00242754 1 *** AsyncRead::read 000 i=0 (f=00242760; file = 00262510; event = 003C) *** aw-filesdim = 00242754 1 ++ aw-filesdim = 00242754 1 i=0 000: i=0; f=00242760; file=2499856; event=003C 001: i=0; f=00242760; file=2499856; event=003C AsyncRead::read 001 i=0 (f=00242760; file = 00262510; event = 003C; res=0) AsyncRead::read 002 i=0 (f=00242760; file = 00262510; event = 003C; res=0) AsyncRead::dispose; aw = 00242754 002: i=0; f=00242760; file=2499856; event=003C startthread done: aw-filesdim = 00242754 1 the line 002: i=0; f=00242760; file=2499856; event=003C is from `startthread`, it printed right after `SetEvent(f-event);` call. as you can see, `AsyncRead::dispose` was already called, yet `startthread` is still using `aw`. seems that this is highly depends on timing, 'cause SOMETIMES (very rarely) dmd works ok in my wine. but most of the time it crashes. yet it works fine on real windows. nevertheless, just commenting out `free(aw);` in `AsyncRead::dispose` fixes it all. as dmd.exe leaks memory as crazy anyway, there is no harm in leaking a little more, and it was the easiest fix. posix version of this seems to be protected from the bug, as posix `AsyncRead::dispose` correctly waits while all operations on all files are complete. more than that, posix `startthread` correctly caches `aw-filesdim`, so it will not use freed memory in loop condition check. so i attached a patch that waits for completion of all file operations before freeing `aw`. this seems to fix the issue, and this is what posix version do. --
[Issue 11488] FORTRAN FORI= Error
https://issues.dlang.org/show_bug.cgi?id=11488 --- Comment #2 from Manfred Nowak svv1...@hotmail.com --- (In reply to Stewart Gordon from comment #1) If chaining of -, --. + and ++ is used heavily, then disallowing to shoot oneself is okay. Hint: - -- -- -- - --- -- - -- - -- - --x is currently a legal expression and I doubt that one can _see_ in general the positions at which a significant space is wrongly placed or deleted. Disallowing chaining requires to use paired paranthesis in such cases, which doubles the number of wrongly placed characters needed to make an error slip through. BTW: allowing such chaining makes D similar to an esoteric language. If chaining of those operators will never be used heavily, then there is no ratio for allowing the chaining. --
[Issue 14097] root/async.c: free after use
https://issues.dlang.org/show_bug.cgi?id=14097 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added CC||bugzi...@digitalmars.com --- Comment #2 from Walter Bright bugzi...@digitalmars.com --- https://github.com/D-Programming-Language/dmd/pull/4363 --
[Issue 13969] [REG2.063] [ICE] (backend\cgcod.c 2309) with cycle(iota(a,b,s))
https://issues.dlang.org/show_bug.cgi?id=13969 --- Comment #5 from Walter Bright bugzi...@digitalmars.com --- https://github.com/D-Programming-Language/dmd/pull/4364 --
[Issue 13969] [REG2.063] [ICE] (backend\cgcod.c 2309) with cycle(iota(a,b,s))
https://issues.dlang.org/show_bug.cgi?id=13969 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Hardware|x86 |All OS|Windows |All --
[Issue 14095] explicitly exclude symbol from resolution consideration
https://issues.dlang.org/show_bug.cgi?id=14095 Jonathan M Davis issues.dl...@jmdavisprog.com changed: What|Removed |Added CC||issues.dl...@jmdavisprog.co ||m --- Comment #1 from Jonathan M Davis issues.dl...@jmdavisprog.com --- I would point out that if the bug that's causing the problem is bug# 314, then I'm pretty sure that pragma(excludeSymbol, std.array.array) wouldn't work anyway, because it would be viewed as being a member of whatever module had the selective import rather than std.array. If something else is causing the problem, then maybe your suggestion would work. I don't know. Regardless, it would be easier to diagnose what's causing your problem if you provide a code sample which exhibited it. The fact that you're not seeing a symbol conflict definitely makes me wonder what's going on. Unless UFCS is involved, you'd normally end up with a symbol conflict, and UFCS favors member functions over free functions, so it's unlikely that that would cause a free function like std.array.array to be favored. It may be some bug in overload resolution. But if you provide code, then maybe we could actually figure out what you're running into - and it may or may not be a previously reported bug. In any case, as a workaround, IIRC, alias array = myarray.array; at the module level will fix the problem so that within the module, array refers to myarray.array. regardless of the imports. So, you should probably try that. Or you could just use static imports for everything, but that would be pretty annoying. Of course, an even easier alternative would simply be to rename your array function to something else, as annoying as that might be. --
[Issue 13952] change in struct ctor lowering triggers codegen bug
https://issues.dlang.org/show_bug.cgi?id=13952 --- Comment #2 from Martin Nowak c...@dawg.eu --- (In reply to Walter Bright from comment #1) Please provide a reproducible example. I already spend almost a day on this and couldn't reduce it to less than compiling Higgs and running the tests. Will try again, but it's definitely cause by the mentioned commit. --
[Issue 14093] [REG2.065] __traits(compiles, cast(Object)(tuple)) is true even if it doesn't compile.
https://issues.dlang.org/show_bug.cgi?id=14093 sinkuup...@gmail.com changed: What|Removed |Added CC||sinkuup...@gmail.com Hardware|x86_64 |All Summary|__traits(compiles, |[REG2.065] |cast(Object)(tuple)) is |__traits(compiles, |true even if it doesn't |cast(Object)(tuple)) is |compile.|true even if it doesn't ||compile. OS|Linux |All --- Comment #1 from sinkuup...@gmail.com --- Introduced in https://github.com/D-Programming-Language/dmd/pull/3009 (In reply to Pierre krafft from comment #0) The code compiles if I run it in DPaste version DMD 2.x Git (cfb5842b49). commit cfb5842b49 seems to be DMD 2.063.x. --
[Issue 13969] [REG2.063] [ICE] (backend\cgcod.c 2309) with cycle(iota(a,b,s))
https://issues.dlang.org/show_bug.cgi?id=13969 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added CC||bugzi...@digitalmars.com --- Comment #4 from Walter Bright bugzi...@digitalmars.com --- Further reduction: struct Foo { int x, y; } int xxx(const Foo* f) { return 0 % ((f.y 0) ? f.x / f.y : f.x / -f.y); } --
[Issue 14097] root/async.c: free after use
https://issues.dlang.org/show_bug.cgi?id=14097 --- Comment #3 from Ketmar Dark ket...@ketmar.no-ip.org --- as i have no github account, i'll answer here: WalterBright added a note Feb 1, 2015 Why this change? 'cause `AsyncRead::dispose` can `free()` aw before loop in `startthread` completes, and then `startthread` will try to reference already freed memory in loop condition check. this is very unlikely, but still possible situation. so we have to cache the value. --
[Issue 13952] change in struct ctor lowering triggers codegen bug
https://issues.dlang.org/show_bug.cgi?id=13952 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added CC||bugzi...@digitalmars.com --- Comment #1 from Walter Bright bugzi...@digitalmars.com --- Please provide a reproducible example. --
[Issue 14098] std.typecons.wrap should allow wrapping a struct
https://issues.dlang.org/show_bug.cgi?id=14098 Jesse Phillips jesse.k.phillip...@gmail.com changed: What|Removed |Added Keywords||pull CC||jesse.k.phillip...@gmail.co ||m --- Comment #1 from Jesse Phillips jesse.k.phillip...@gmail.com --- Pull request added: https://github.com/D-Programming-Language/phobos/pull/2945 --
[Issue 14074] non-separate compilation fails, but separate compilation works
https://issues.dlang.org/show_bug.cgi?id=14074 sinkuup...@gmail.com changed: What|Removed |Added Keywords||link-failure CC||sinkuup...@gmail.com --- Comment #1 from sinkuup...@gmail.com --- This is introduced by pull: https://github.com/D-Programming-Language/dmd/pull/3948 I reduced into small source files: cbor.d void encodeCbor(R, E)(R sink, E value) { encodeCborInt(sink); encodeCborArray(sink, value); static assert(false); } void encodeLongType(R)(R sink) { import primitives; put(sink); } void encodeCborInt(R)(R sink) { encodeLongType(sink); } void encodeCborArrayHead(R)(R sink, ulong arrayLength) { encodeLongType(sink); } void encodeCborArray(R, A)(R sink, A) { encodeCborArrayHead(sink, __traits(compiles, { encodeCbor(cast(ubyte[])null, A.tupleof[0].init); })); } primitives.d void put(R)(R) { } test.d import primitives; // necessary import cbor; struct Inner { } struct Test { Inner inner; } void main () { ubyte[] buffer; Test test ; encodeCborArray(buffer, test); } $ ls cbor.d primitives.d test.d $ dmd test.d cbor.d test.o: In function `pure nothrow @nogc @safe void cbor.encodeLongType!(ubyte[]).encodeLongType(ubyte[])': cbor.d:(.text.pure nothrow @nogc @safe void cbor.encodeLongType!(ubyte[]).encodeLongType(ubyte[])+0x1c): undefined reference to `pure nothrow @nogc @safe void primitives.put!(ubyte[]).put(ubyte[])' collect2: error: ld returned 1 exit status --- errorlevel 1 $ dmd -allinst test.d cbor.d echo OK OK $ dmd -c cbor.d $ dmd test.d cbor.o echo OK OK --
[Issue 14095] explicitly exclude symbol from resolution consideration
https://issues.dlang.org/show_bug.cgi?id=14095 Vlad Levenfeld vlevenf...@gmail.com changed: What|Removed |Added CC||vlevenf...@gmail.com --
[Issue 14095] New: explicitly exclude symbol from resolution consideration
https://issues.dlang.org/show_bug.cgi?id=14095 Issue ID: 14095 Summary: explicitly exclude symbol from resolution consideration Product: D Version: D1 D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority: P1 Component: DMD Assignee: nob...@puremagic.com Reporter: vlevenf...@gmail.com There needs to be a mechanism for specifically excluding a particular symbol from resolution in a given scope. I've been struggling for months to chase std.array.array out of my codebase: I use a custom multidimensional array and, somehow, when I call .array on anything, std.array takes the call and subsequently fails to compile. My custom array isn't attempted, and no symbol conflict error is issued by the compiler. Sometimes .array will correctly route to my array, but its a coin toss. I suspect this has something to do with the longstanding import visibility bug, and I've been led to understand that fixing it is a massive and tricky undertaking, so until its solved, something like pragma (excludeSymbol, std.array.array); would be immensely helpful, if only as a stopgap measure. --
[Issue 14097] root/async.c: free after use
https://issues.dlang.org/show_bug.cgi?id=14097 Ketmar Dark ket...@ketmar.no-ip.org changed: What|Removed |Added CC||ket...@ketmar.no-ip.org --- Comment #1 from Ketmar Dark ket...@ketmar.no-ip.org --- p.s. note that printf log was taken from the version with `free()` commented, that's why it looks OK. the original version was simply crashing there. --
[Issue 14089] [REG2.064] Assigning to AA has no value when overriding opAssign
https://issues.dlang.org/show_bug.cgi?id=14089 --- Comment #1 from sinkuup...@gmail.com --- The behavior of AA assign before 2.064 was just returning rhs. But I noticed this is confusing as I unintentionally showed in #0(result of opAssign vs rhs). Please close this issue if the new behavior is intended. --
[Issue 14098] New: std.typecons.wrap should allow wrapping a struct
https://issues.dlang.org/show_bug.cgi?id=14098 Issue ID: 14098 Summary: std.typecons.wrap should allow wrapping a struct Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: Phobos Assignee: nob...@puremagic.com Reporter: jesse.k.phillip...@gmail.com The current implementation of wrap only allows for other classes to be wrapped into another interface. Structures are much more common in D so there is great value in supporting the ability to wrap a struct into a specified interface. This is similar to request #10404 but doesn't require a concrete type to be produced. For example: interface iRange { pure nothrow @nogc @property @safe int front(); void popFront(); pure nothrow @nogc @property @safe bool empty(); } void main() { import std.algorithm; import std.range; // Create a range type. auto squares = map!a * a(iota(10)); import std.typecons; // Wrap it in an interface. iRange squaresWrapped = squares.wrap!(iRange); } --
[Issue 13969] [REG2.063] [ICE] (backend\cgcod.c 2309) with cycle(iota(a,b,s))
https://issues.dlang.org/show_bug.cgi?id=13969 --- Comment #6 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/02f8cde5973b7cfc2e24e41e893068e4947edf06 fix Issue 13969 - [REG2.063] [ICE] (backend\cgcod.c 2309) with cycle(iota(a,b,s)) https://github.com/D-Programming-Language/dmd/commit/e542e145b9fac61233e98f9188532a563d62eda7 Merge pull request #4364 from WalterBright/fix13969 [REG]: fix Issue 13969 - [ICE] (backend\cgcod.c 2309) with cycle(iota(a,b,s)) --
[Issue 14062] Not pure std.variant.Variant ctor
https://issues.dlang.org/show_bug.cgi?id=14062 sinkuup...@gmail.com changed: What|Removed |Added CC||sinkuup...@gmail.com --- Comment #1 from sinkuup...@gmail.com --- introduced by: https://github.com/D-Programming-Language/phobos/pull/2147 I'm not sure this can be fixed. opAssign(called by constructor) and destructor of Variant are changed to call the handler, and it's impure. --