test: cover modern chained alias method calls
This commit is contained in:
@@ -22,6 +22,12 @@ class ValidateTypecheckDiagnosticsTests(unittest.TestCase):
|
||||
fixtures.add("tests/37_object_field_types.claro")
|
||||
self.assertEqual(listed, fixtures)
|
||||
|
||||
def test_includes_modern_chained_alias_method_success_fixture(self):
|
||||
self.assertIn(
|
||||
"tests/typecheck_object_alias_method_do_good.claro",
|
||||
MODULE.EXPECTED_OK,
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
CLASS Player
|
||||
HAS score NUMBER
|
||||
|
||||
TEACH add points
|
||||
CHECK TYPE points IS NUMBER
|
||||
END
|
||||
END
|
||||
|
||||
NEW Player player
|
||||
SET alias player
|
||||
SET second alias
|
||||
DO second.add 5
|
||||
Reference in New Issue
Block a user