[Issue 23105] `__trait(getMember)` and `mixin()` of the same code as a string behave differently

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri May 13 05:14:37 UTC 2022


https://issues.dlang.org/show_bug.cgi?id=23105

Dlang Bot <dlang-bot at dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #3 from Dlang Bot <dlang-bot at dlang.rocks> ---
@BorisCarvajal created dlang/dmd pull request #14119 "Fix Issue 23105 -
`__trait(getMember)` and `mixin()` of the same code as a string behave
differently" fixing this issue:

- Fix Issue 23105 - `__trait(getMember)` and `mixin()` of the same code as a
string behave differently

  The fix is to remove the `SCOPE.alias_` dependency when resolving
  TypeTraits on certain conditions, it's not necessary, the trait
  resolves to type or symbol naturally.

  Changes:
  - Remove `SCOPE.alias_` as it is no longer used.
  - Remove a huge `if` with an early error from `TypeTraits` typeSemantic.
  - Cache not only symbols but also types in TypeTraits
  (TypeTraits.sym -> TypeTraits.obj).
  - Move `TypeTraits.typeSemantic` logic to `TypeTraits.resolve` since
  `typeSemantic` should only care about giving a type and `resolve`
  about maybe something else (like TypeMixin logic).

https://github.com/dlang/dmd/pull/14119

--


More information about the Digitalmars-d-bugs mailing list