[Issue 17301] New: Unhelpful error message on template and non-template struct defined in separate modules
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Apr 7 02:20:28 PDT 2017
https://issues.dlang.org/show_bug.cgi?id=17301
Issue ID: 17301
Summary: Unhelpful error message on template and non-template
struct defined in separate modules
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: minor
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: mrsmith33 at yandex.ru
module moduleA;
import moduleB;
void main() {
HashMap!(int) map;
}
struct HashMap {}
module moduleB;
struct HashMap(Key) {}
moduleA.d(6): Error: template instance HashMap!int HashMap is not a template
declaration, it is a struct
But, when defined in one module:
void main() {
HashMap!(int) map;
}
struct HashMap {}
struct HashMap(Key) {}
hashmap.d(6): Error: struct hashmap.HashMap(Key) conflicts with struct
hashmap.HashMap at hashmap.d(5)
--
More information about the Digitalmars-d-bugs
mailing list