On Saturday, 16 October 2021 at 19:29:59 UTC, Dennis wrote:
On Saturday, 16 October 2021 at 19:28:04 UTC, DLearner wrote:How does one obtain from strVar: 1. The type of fooVar;`typeof(mixin(strVar))`2. The value of fooVar?`mixin(strVar)`
``` void main() { import std.stdio; int fooVar = 4; string strVar; strVar = "fooVar"; writeln(typeof(mixin(strVar))); writeln(mixin(strVar)); } ```Failed with 2x "Error: variable `strVar` cannot be read at compile time".