On Thursday, 10 July 2014 at 20:59:17 UTC, simendsjo wrote:
Strings behaves a bit odd with is(). The following passes:import std.stdio; void f(string a, string b) { assert(a is b); // also true } void main() { string a = "aoeu"; string b = "aoeu"; assert(a is b); // true f(a, b); writeln("passed"); } changing a and b to enum gives the same results.
Try other immutable variables (int arrays, structs), and non-immutable ones. They will probably behave differently.