Voldemort Types in D

Jacob Carlborg doob at me.com
Wed May 9 13:09:37 PDT 2012


On 2012-05-09 19:05, Adam Wilson wrote:

> This pull fixes this problem and a bunch of others:
> https://github.com/D-Programming-Language/dmd/pull/928. However, it
> currently fails to build on Linux and fails the unittests on Windows
> thanks to a problem with the dur template function in std.datetime. The
> solution used by this pull is to include the function body of the
> auto-function as that was needed to allow Phobos to build correctly
> using the DRT DI files. This is the only workable solution as DMD does
> not know the type of an auto-function when DI files are generated. No
> semantic analysis has been performed and since semantic analysis could
> change the layout of a module you wouldn't want it to be
> performed.
>

The correct way to solve this in the long run is to have the compiler 
replace "auto" with the inferred type. If the whole semantic analysis 
phase cannot be run the we need to have some kind of limited semantic 
analysis phase or some other phase to infer the types.

-- 
/Jacob Carlborg


More information about the Digitalmars-d-announce mailing list