void () { doTest("Set[Union[str, int]]", """ def f(): expr = {'abc'} expr.add(1)""" ); doTest("Set[Union[int, str]]", """ def f(): expr = {1, 2} b = {'abc'} expr.update(b)""" ); doTest("Set[Union[int, str]]", """ def f(): expr = {1, 2} b = {2, 3} expr.update(b, ['a', 'b'], {1, 2})""" ); doTest("Set[str]", """ def f(): expr = {'m', 'n'} expr.update({'a': 1, 'b': 2})""" ); doTest("Set[Union[Union[int, str], Any]]", """ def f(): expr = {1, 2} b = {'a', 'b'} expr.update(b, var)""" ); doTest("Set[str]", """ def f(): expr, var = {'a', 'b'}, 'lala' expr.add('b')""" ); doTest("Set[int]", """ def f(): expr = {1, 2, 3} def inner(): expr.add('a') """ ); }