https://issues.dlang.org/show_bug.cgi?id=21078
ag0aep6g <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #1 from ag0aep6g <[email protected]> --- (In reply to Adam D. Ruppe from comment #0) > And this is bizarre. If you do > > bool o = is(float FLOAT); > > outside the static if btw you get: > > Error: can only declare type aliases within static if conditionals or > tatic asserts > > > The spec is not clear on this. It says: > > https://dlang.org/spec/expression.html#IsExpression > > is ( Type Identifier ) > The condition is satisfied if Type is semantically correct. If so, > Identifier is declared to be an alias of Type. The spec is quite clear on this (third paragraph): "The Identifier forms can only be used if the IsExpression appears in a StaticIfCondition." Not saying that that rule makes any sense, but it's there. --
