warn if (x is a T) check does not make sense (i.e. if x cannot be a T)
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)
Submitted by Eelco Visser on 1 July 2010 at 13:02
Issue Log
On 19 July 2010 at 09:57 Lennart Kats closed this issue.
On 19 July 2010 at 09:57 Lennart Kats commented:
Duplicate of WebDSL/189.
Log in to post comments