forked from tmikov/hermes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add error check for invalid JSX attr initializer
Summary: There was an invalid assert as a result of using `else if` instead of `else`. Fix the case and ensure that one of the two branches execute. Reviewed By: tmikov Differential Revision: D30710922 fbshipit-source-id: de48ece5a6d87deb3df72ba01e1a71d38076c607
- Loading branch information
1 parent
d8d2f36
commit 24f8451
Showing
2 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
// RUN: (! %hermes -parse-jsx -dump-ast -pretty-json %s 2>&1 ) | %FileCheck %s --match-full-lines | ||
|
||
<foo x=y></foo> | ||
// CHECK: {{.*}}:10:8: error: '{' expected in JSX attribute | ||
// CHECK-NEXT: <foo x=y></foo> | ||
// CHECK-NEXT: ~~^ |