| Thread overview | |||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
October 15, 2015 [Issue 15094] [REG2.063] __traits(getMember) fails when the source is a struct/class field | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=15094 Vladimir Panteleev <thecybershadow@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |thecybershadow@gmail.com Summary|__traits(getMember) fails |[REG2.063] |when the source is a |__traits(getMember) fails |struct/class field |when the source is a | |struct/class field --- Comment #1 from Vladimir Panteleev <thecybershadow@gmail.com> --- This appears to be a regression. Introduced in https://github.com/D-Programming-Language/dmd/pull/1687 -- | ||||
October 21, 2015 [Issue 15094] [REG2.063] __traits(getMember) fails when the source is a struct/class field | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=15094 Kenji Hara <k.hara.pg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rejects-valid --- Comment #2 from Kenji Hara <k.hara.pg@gmail.com> --- (In reply to Vladimir Panteleev from comment #1) > This appears to be a regression. > > Introduced in https://github.com/D-Programming-Language/dmd/pull/1687 Not correct. With 2.062, compiling example code with `dmd -c` will make: test.d(16): Error: need 'this' to access member foo PR 1687 had moved many "need this" errors in glue layer to front-end, but such the field access is not yet supported. I think it's a reject-valid bug. -- | ||||
October 21, 2015 [Issue 15094] __traits(getMember) fails when the source is a struct/class field | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=15094 Vladimir Panteleev <thecybershadow@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|[REG2.063] |__traits(getMember) fails |__traits(getMember) fails |when the source is a |when the source is a |struct/class field |struct/class field | --- Comment #3 from Vladimir Panteleev <thecybershadow@gmail.com> --- (In reply to Kenji Hara from comment #2) > PR 1687 had moved many "need this" errors in glue layer to front-end, but such the field access is not yet supported. I think it's a reject-valid bug. Oh, OK. -- | ||||
October 21, 2015 [Issue 15094] __traits(getMember) fails when the source is a struct/class field | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=15094 Kenji Hara <k.hara.pg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull Hardware|x86_64 |All OS|Linux |All --- Comment #4 from Kenji Hara <k.hara.pg@gmail.com> --- https://github.com/D-Programming-Language/dmd/pull/5215 -- | ||||
May 31, 2016 [Issue 15094] __traits(getMember) fails when the source is a struct/class field | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=15094 Eyal Lotem <eyal.lotem@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |eyal.lotem@gmail.com --- Comment #5 from Eyal Lotem <eyal.lotem@gmail.com> --- Even after applying the PR (https://github.com/D-Programming-Language/dmd/pull/5215): ``` struct S { int i; } S s; unittest { import std.meta : Alias; alias GetMember1 = Alias!(__traits(getMember, mixin(__MODULE__), "s")); alias GetMember2 = Alias!(__traits(getMember, GetMember1, "i")); alias GetMember3 = Alias!(__traits(getMember, __traits(getMember, mixin(__MODULE__), "s"), "i")); // Works: auto a1 = &GetMember1; // Fails: auto a2 = &GetMember2; // Fails: auto a3 = &GetMember3; // Works: auto a4 = &__traits(getMember, __traits(getMember, mixin(__MODULE__), "s"), "i"); } ``` fails (in a2, a3). -- | ||||
May 31, 2016 [Issue 15094] __traits(getMember) fails when the source is a struct/class field | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=15094 --- Comment #6 from Eyal Lotem <eyal.lotem@gmail.com> --- Even after applying the PR (https://github.com/D-Programming-Language/dmd/pull/5215): ``` struct S { int i; } S s; unittest { import std.meta : Alias; alias GetMember1 = Alias!(__traits(getMember, mixin(__MODULE__), "s")); alias GetMember2 = Alias!(__traits(getMember, GetMember1, "i")); alias GetMember3 = Alias!(__traits(getMember, __traits(getMember, mixin(__MODULE__), "s"), "i")); // Works: auto a1 = &GetMember1; // Fails: auto a2 = &GetMember2; // Fails: auto a3 = &GetMember3; // Works: auto a4 = &__traits(getMember, __traits(getMember, mixin(__MODULE__), "s"), "i"); } ``` fails (in a2, a3). -- | ||||
May 31, 2016 [Issue 15094] __traits(getMember) fails when the source is a struct/class field | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=15094 Johan Engelen <jbc.engelen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jbc.engelen@gmail.com -- | ||||
August 15, 2016 [Issue 15094] __traits(getMember) fails when the source is a struct/class field | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=15094 Ali Cehreli <acehreli@yahoo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |industry CC| |acehreli@yahoo.com -- | ||||
May 23, 2017 [Issue 15094] __traits(getMember) fails when the source is a struct/class field | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=15094 Eyal <eyal@weka.io> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |eyal@weka.io --- Comment #7 from Eyal <eyal@weka.io> --- This bit us in several places in the weka codebase. -- | ||||
November 26, 2017 [Issue 15094] __traits(getMember) fails when the source is a struct/class field | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=15094 --- Comment #8 from github-bugzilla@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/89c900316c02d7e845b151e02a460d89631a9d07 Fix Issue 15094 - __traits(getMember) fails when the source is a struct/class field https://github.com/dlang/dmd/commit/c9d988ebc0eca6137551eaacb961400acb2e7752 Merge pull request #7341 from JinShil/fix_15094 Fix Issue 15094 - __traits(getMember) fails when the source is a struct/class field -- | ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply