Skip to content

Commit f9adbfb

Browse files
committed
...
1 parent 08291f2 commit f9adbfb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

compiler/src/dmd/opover.d

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1289,9 +1289,11 @@ Expression op_overload(Expression e, Scope* sc, EXP* pop = null)
12891289
// If s.isTemplateDeclaration we should probe all overloads
12901290
// We can not just probe parameter type as it can be some template param (`opOpAssign(string op: "~")(T rhs)`)
12911291
// Instead we check all `implicitCastTo` of e2.type.
1292-
// Cast OPs are ion style of `T : int` so we shoult be able to try match on
1293-
// the `TemplateTypeParameter`, If we findf exactly one match we costruct this `opImplicitCast`
1292+
// Cast OPs are done like this `(T : int)` so we shoult be able to try match on
1293+
// the `TemplateTypeParameter`, If we find exactly one match we costruct this `opImplicitCast`
12941294
// and re-run the matching.
1295+
// TODO: we check first parameter for TemplateTypeParameter, should be good enough for `implicitCastTo`
1296+
// but better make more robust checks in th future.
12951297

12961298
if (auto tdIc = implicitCastFd.isTemplateDeclaration()) {
12971299

0 commit comments

Comments
 (0)