# test various typing situations with if()'s texpr and fexpr wrt to nil class Test def main is shared x as int = 5 # in all the if()s below, the resulting type should be String? t as String? = if(x, 'aoeu', nil) t = if(x, nil, 'aoeu') # nil and String t = if(x, 'aoeu', nil) # String and nil t = if(x, nil, t) # nil and String? t = if(x, t, nil) # String? and nil t = if(x, t, t) # String? and String? t = if(x, 'aoeu', t) # String and String? t = if(x, t, 'aoeu') # String? and String # TODO: if() should be smart # notNil as String = if(u, u, 'aoeu')