pytorch/test/expect/TestScript.test_python_frontend.expect
Michael Suo 5dacf6b048 improve error message on inferred type (#21058)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/21058
ghimport-source-id: e7d6e082b0faf4f3d3e683f2c98863ee269439f0

Differential Revision: D15534670

Pulled By: suo

fbshipit-source-id: 8bbfd6e9c1afbc3006d7d55ed633e18618e05021
2019-05-29 14:47:00 -07:00

76 lines
1.5 KiB
Plaintext

(def
(ident fn)
(decl
(list
(param
(ident x)
(option)
(option)
(False))
(param
(ident y)
(option)
(option)
(False))
(param
(ident z)
(option)
(option)
(False)))
(option))
(list
(assign
(variable (ident q))
(None))
(assign
(variable (ident q))
(-
(+
(variable (ident x))
(variable (ident y)))
(apply
(.
(variable (ident z))
(ident sigmoid))
(list)
(list))))
(expression statement
(apply
(variable (ident print))
(list (variable (ident q)))
(list)))
(assign
(variable (ident w))
(unary minus
(variable (ident z))))
(if
(and
(and
(not (variable (ident x)))
(not (variable (ident y))))
(variable (ident z)))
(list
(assign
(variable (ident m))
(if
(not (variable (ident z)))
(variable (ident x))
(variable (ident y)))))
(list))
(while
(and
(<
(variable (ident x))
(variable (ident y)))
(>
(variable (ident y))
(variable (ident z))))
(list
(assign
(variable (ident q))
(variable (ident x)))))
(assert
(eq (const 1) (const 1))
(option (string_literal hello)))
(return (variable (ident x)))))