"Fossies" - the Fresh Open Source Software Archive

Member "dmd-2.089.0/test/runnable/link10425.d" (2 Nov 2019, 843 Bytes) of package /linux/misc/dmd-2.089.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) D source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 // COMPILE_SEPARATELY
    2 // EXTRA_SOURCES: imports/bug10425.d
    3 
    4 import imports.bug10425;
    5 
    6 void main()
    7 {
    8     auto ti = typeid(A!());
    9     /* Today, taking TypeInfo object address by using `typeid` always generates
   10      * the TypeInfo object on comdat section (done by TypeInfoDeclaration::toObjFile),
   11      * even if the associated struct belongs *non-root modules*.
   12      *
   13      * And, from 2.062, issue 7511 is implemented.
   14      * The attribute inference for member functions in instantiated struct may modify
   15      * their actual mangled names. Then TypeInfo object compiled in this module would
   16      * use wrong symbol names, to link non-template opEquals/opCmp/toHash/toString
   17      * member functions.
   18      *
   19      * To fix the issue, we should run semantic3 to calculate the correct symbol names
   20      * of the specific member functions.
   21      */
   22 }