parse TernaryIf as right associative, fix #68221 (#68416)

Summary:
Fixes https://github.com/pytorch/pytorch/issues/68221

Pull Request resolved: https://github.com/pytorch/pytorch/pull/68416

Reviewed By: gchanan

Differential Revision: D32819402

Pulled By: eellison

fbshipit-source-id: c32d9fcf49e24cc0df877b794dfcb8df7c7a6d78
(cherry picked from commit 8a5a1000859bb4bdbf84730b4b137a3ec171151f)
This commit is contained in:
bing
2022-03-01 15:22:12 -08:00
committed by PyTorch MergeBot
parent eb0d370f14
commit dc81ba1f9f
2 changed files with 8 additions and 0 deletions

View File

@ -291,6 +291,7 @@ struct TORCH_API SharedParserData {
switch (kind) {
case '?':
case TK_POW:
case TK_IF:
return true;
default:
return false;