Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/src/dmd/typesem.d
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ private void resolveHelper(TypeQualified mt, Loc loc, Scope* sc, Dsymbol s, Dsym
(id == Id._super && sc.getClassScope()))
error(loc, "undefined identifier `%s`, did you mean `typeof(%s)`?", p, p);
else
error(loc, "undefined identifier `%s`", p);
error(mt.loc, "undefined identifier `%s`", p);
}
else {
if (const n = cIncludeHint(id.toString()))
Expand Down
10 changes: 10 additions & 0 deletions compiler/test/fail_compilation/fix21165.d
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*
TEST_OUTPUT:
---
fail_compilation/fix21165.d(9): Error: undefined identifier `foo`
---
*/

// Test case from Issue #21165
foo
f() {}
Loading