warn if (x is a T) check does not make sense (i.e. if x cannot be a T)
WebDSL #189 - New Feature (by Eelco Visser on Jul 1)
currently one can do arbitrary 'is a' checks; however, for many combinations of expressions and types we can determine statically that this will always return false, i.e. if the type of the expression is not a supertype of the checked type. The editor/compiler should at least give a warning in such cases, or perhaps we can make this an error.
Constraint:
check : |[ e is a T ]| -> $[type of e should be supertype of T]
where require( e is supertype of T)

Log in to post comments

