digitalmars.D.bugs - [Issue 14693] New: property return type not generated in .di file
- via Digitalmars-d-bugs (27/27) Jun 12 2015 https://issues.dlang.org/show_bug.cgi?id=14693
https://issues.dlang.org/show_bug.cgi?id=14693 Issue ID: 14693 Summary: property return type not generated in .di file Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: andrei erdani.com Repro: struct A { property foo() { return 42; } } This is correct code, the fact that foo is a function is inferred from the presence of property, and the return type is deduced automatically from the body. However, if a .di file is generated it'll have this code: struct A { property foo(); } which is incorrect D. Solution: keep the bodies of functions with automatically inferred type in the .di file. --
Jun 12 2015