""" This test assigns the results of various method calls and property accesses to a non-nilable target to verify that the methods and properties are non-nil. These are methods and properties from the System library (which unfortunately does not indicate "non null" return values). """ use System.Reflection class Test var _x = 1 to Object def main is shared # cover other items already set in the compiler pass def testString s = 'aoeu' _x = s.replace('x', 'y') def testCollections t = List() _x = t.getRange(0, 1) _x = t[0:2] d = Dictionary() _x = d.keys _x = d.values id = Dictionary() to IDictionary _x = id.keys _x = id.values def testFile assert false # just to make sure this is not executed _x = File.create('aoeu') _x = File.createText('aoeu') _x = File.open('aoeu', FileMode.Open) _x = File.openRead('aoeu') _x = File.openText('aoeu') _x = File.openWrite('aoeu') _x = File.readAllBytes('aoeu') _x = File.readAllLines('aoeu') _x = File.readAllText('aoeu') def testAssembly _x = Assembly.getEntryAssembly