// The following four lines in run.lang.io

int[] a;
alias T = long;
pragma(msg, is(typeof(a) : U[], U : T));
pragma(msg, is(typeof(a) : T[]));

// returns

true
false

But I'm not even sure what I'm looking at. Ali's book talks about the colon appearing for
:, associative array   ⬁
:, import   ⬁
:, inheritance   ⬁
:, label
but I'm pretty sure none apply here.

I know about alias (T is replaced with long), pragma, is, and typeof. But what is U and where does it come from? And what do the colons do here?

Reply via email to