Skip to content

Commit

Permalink
Remove references to D1 opDot
Browse files Browse the repository at this point in the history
  • Loading branch information
dkorpel committed Jan 24, 2025
1 parent e5bd2d0 commit 715ba2f
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 48 deletions.
1 change: 0 additions & 1 deletion compiler/src/dmd/frontend.h
Original file line number Diff line number Diff line change
Expand Up @@ -8828,7 +8828,6 @@ struct Id final
static Identifier* opSliceAssign;
static Identifier* opCall;
static Identifier* opCast;
static Identifier* opDot;
static Identifier* opDispatch;
static Identifier* opDollar;
static Identifier* opUnary;
Expand Down
1 change: 0 additions & 1 deletion compiler/src/dmd/id.d
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ immutable Msgtable[] msgtable =
{ "opSliceAssign" },
{ "opCall" },
{ "opCast" },
{ "opDot" },
{ "opDispatch" },
{ "opDollar" },
{ "opUnary" },
Expand Down
17 changes: 1 addition & 16 deletions compiler/src/dmd/typesem.d
Original file line number Diff line number Diff line change
Expand Up @@ -4883,7 +4883,7 @@ Expression dotExp(Type mt, Scope* sc, Expression e, Identifier ident, DotExpFlag

/***************************************
* `ident` was not found as a member of `mt`.
* Attempt to use overloaded opDot(), overloaded opDispatch(), or `alias this`.
* Attempt to use overloaded opDispatch() or `alias this`.
* If that fails, forward to visitType().
* Params:
* mt = class or struct
Expand Down Expand Up @@ -4939,21 +4939,6 @@ Expression dotExp(Type mt, Scope* sc, Expression e, Identifier ident, DotExpFlag
ident != Id.postblit &&
ident != Id.__xpostblit)
{
/* Look for overloaded opDot() to see if we should forward request
* to it.
*/
if (auto fd = search_function(sym, Id.opDot))
{
/* Rewrite e.ident as:
* e.opDot().ident
*/
e = build_overload(e.loc, sc, e, null, fd);
// @@@DEPRECATED_2.110@@@.
// Deprecated in 2.082, made an error in 2.100.
error(e.loc, "`opDot` is obsolete. Use `alias this`");
return ErrorExp.get();
}

/* Look for overloaded opDispatch to see if we should forward request
* to it.
*/
Expand Down
30 changes: 0 additions & 30 deletions compiler/test/fail_compilation/deprecateopdot.d

This file was deleted.

0 comments on commit 715ba2f

Please sign in to comment.