Bug 15001 – Duplicate error message without line number on if statement

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-09-02T02:23:00Z
Last change time
2015-09-07T06:48:48Z
Keywords
diagnostic, pull
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2015-09-02T02:23:08Z
Test code: module test; // test.d import a; void main() { auto a = new A(); if (B b = a.foo()) {} } module a; // a.d import b; class A { B foo() { return null; } } module b; // b.d class B {} Command line: dmd -o- test.d Output: test.d(6): Error: undefined identifier 'B' Error: undefined identifier 'B'
Comment #1 by k.hara.pg — 2015-09-02T02:38:14Z
Comment #2 by github-bugzilla — 2015-09-07T06:48:48Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/36e83282e5c52e1f4dde667fd07138667ff69fea fix Issue 15001 - Duplicate error message without line number on if statement https://github.com/D-Programming-Language/dmd/commit/d1cff024654921f4bd1cdfe4f1974cbc013d1a9a Merge pull request #5020 from 9rnsr/fix15001 Issue 15001 - Duplicate error message without line number on if statement