syntax: extends 'as' and 'isa' warning to nullable
authorJean Privat <jean@pryen.org>
Thu, 18 Jun 2009 20:45:03 +0000 (16:45 -0400)
committerJean Privat <jean@pryen.org>
Wed, 24 Jun 2009 20:03:37 +0000 (16:03 -0400)
commitb201f0f644289f4608749638f312e2ac85da5ee6
tree547b647af46f3077ab1301122c014388d2f5cd0e
parent5d83af4c774406ce4a94d1c11dbc8cf11b8c4afc
syntax: extends 'as' and 'isa' warning to nullable

Example
  var x: nullable T
  var y = x.as(T) # Bad form
  var y = x.as(not null) # Good form
  if x isa T then ... # Bad form
  if x != null then ... # Good form

Signed-off-by: Jean Privat <jean@pryen.org>
src/syntax/typing.nit