``` unittest {} pragma(msg, typeof(__unittest_L1_C1)); ``` Compile with `dmd test.d` and you get a segv. Compile with `dmd -unittest test.d` and it works just fine. Tested with DMD v2.090.1 & madteer as of 2020-03-03. Found while working on https://github.com/dlang/dmd/pull/10834
Digger: commit 081494aaf8251f37dc08960d40bfb159968ed729 Author: The Dlang Bot <code+dlang-bot@dawg.eu> Date: Fri Feb 2 00:16:54 2018 +0100 dmd: Merge pull request #7761 from atilaneves/fix_18097 https://github.com/dlang/dmd/pull/7761 Fix issue 18097 - unittest symbol names can be used before semantic merged-on-behalf-of: Iain Buclaw <ibuclaw@gdcproject.org>
What should typeof(__unittest_L1_C1) return, the actual function type or _error_?
(In reply to moonlightsentinel from comment #2) > What should typeof(__unittest_L1_C1) return, the actual function type or > _error_? Or void?
@MoonlightSentinel created dlang/dmd pull request #11145 "Fix Issue 20626 - ICE when using typeof of unittest symbol without -u…" fixing this issue: - Fix Issue 20626 - ICE when using typeof of unittest symbol without -unittest flag https://github.com/dlang/dmd/pull/11145
dlang/dmd pull request #11145 "Fix Issue 20626 - ICE when using typeof of unittest symbol without -u…" was merged into stable: - 71ce029a48caf897c463df0513f713af88eb42ed by MoonlightSentinel: Fix Issue 20626 - ICE when using typeof of unittest symbol without -unittest flag https://github.com/dlang/dmd/pull/11145