This repository has been archived by the owner on Jun 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix build error where aliasing argument to
_
in make function with …
…jsx v4 (#720)
- Loading branch information
Showing
4 changed files
with
58 additions
and
4 deletions.
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
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,11 @@ | ||
@@jsxConfig({version: 4, mode: "automatic"}) | ||
|
||
module C0 = { | ||
@react.component | ||
let make = (~priority as _, ~text="Test") => React.string(text) | ||
} | ||
|
||
module C1 = { | ||
@react.component | ||
let make = (~priority as p, ~text="Test") => React.string(p ++ text) | ||
} |
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,45 @@ | ||
@@jsxConfig({version: 4, mode: "automatic"}) | ||
|
||
module C0 = { | ||
type props<'priority, 'text> = { | ||
priority: 'priority, | ||
text?: 'text, | ||
} | ||
|
||
@react.component | ||
let make = ({priority: _, ?text, _}: props<'priority, 'text>) => { | ||
let text = switch text { | ||
| Some(text) => text | ||
| None => "Test" | ||
} | ||
|
||
React.string(text) | ||
} | ||
let make = { | ||
let \"AliasProps$C0" = (props: props<_>) => make(props) | ||
|
||
\"AliasProps$C0" | ||
} | ||
} | ||
|
||
module C1 = { | ||
type props<'priority, 'text> = { | ||
priority: 'priority, | ||
text?: 'text, | ||
} | ||
|
||
@react.component | ||
let make = ({priority: p, ?text, _}: props<'priority, 'text>) => { | ||
let text = switch text { | ||
| Some(text) => text | ||
| None => "Test" | ||
} | ||
|
||
React.string(p ++ text) | ||
} | ||
let make = { | ||
let \"AliasProps$C1" = (props: props<_>) => make(props) | ||
|
||
\"AliasProps$C1" | ||
} | ||
} |