diff --git a/compiler/src/dmd/frontend.h b/compiler/src/dmd/frontend.h index 70c3007214b4..02adaed0e769 100644 --- a/compiler/src/dmd/frontend.h +++ b/compiler/src/dmd/frontend.h @@ -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; diff --git a/compiler/src/dmd/id.d b/compiler/src/dmd/id.d index e74ce37b4c62..9833e1980ed9 100644 --- a/compiler/src/dmd/id.d +++ b/compiler/src/dmd/id.d @@ -232,7 +232,6 @@ immutable Msgtable[] msgtable = { "opSliceAssign" }, { "opCall" }, { "opCast" }, - { "opDot" }, { "opDispatch" }, { "opDollar" }, { "opUnary" }, diff --git a/compiler/src/dmd/typesem.d b/compiler/src/dmd/typesem.d index 3a52985d2c25..65d267f155a3 100644 --- a/compiler/src/dmd/typesem.d +++ b/compiler/src/dmd/typesem.d @@ -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 @@ -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. */ diff --git a/compiler/test/fail_compilation/deprecateopdot.d b/compiler/test/fail_compilation/deprecateopdot.d deleted file mode 100644 index 46c949376e35..000000000000 --- a/compiler/test/fail_compilation/deprecateopdot.d +++ /dev/null @@ -1,30 +0,0 @@ -/* -REQUIRED_ARGS: -de -TEST_OUTPUT: ---- -fail_compilation/deprecateopdot.d(27): Error: `opDot` is obsolete. Use `alias this` -fail_compilation/deprecateopdot.d(28): Error: `opDot` is obsolete. Use `alias this` -fail_compilation/deprecateopdot.d(29): Error: `opDot` is obsolete. Use `alias this` ---- -*/ -struct S6 -{ - int a, b; -} -struct T6 -{ - S6 s; - - S6* opDot() return - { - return &s; - } -} - -void test6() -{ - T6 t; - t.a = 4; - assert(t.a == 4); - t.b = 5; -}