Skip to content

Commit

Permalink
fix: correction
Browse files Browse the repository at this point in the history
  • Loading branch information
erights committed Jun 15, 2023
1 parent 2acdc48 commit 4388a2f
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions packages/patterns/src/patterns/patternMatchers.js
Original file line number Diff line number Diff line change
Expand Up @@ -941,26 +941,26 @@ const makePatternKit = () => {
return false;
}
const { label } = remotableDesc;
const passStyle = passStyleOf(specimen);
const kindDetails =
passStyle !== 'tagged'
? // Pass style can be embedded in details without quotes.
b(passStyle)
: // Tag must be quoted because it is potentially attacker-controlled
// (unlike `kindOf`, this does not reject unrecognized tags).
q(getTag(specimen));
return check(
false,
// `label` can be embedded without quotes because it is provided by
// local code like `M.remotable("...")`.
X`${specimen} - Must be a remotable (${b(label)})`,
X`${kindDetails} ${specimen} - Must be a remotable (${b(label)})`,
);
// We would like to use the commented out code below rather than the
// the similar code immediately above. The new code improves the error
// message, which is great. However, currently agoric-sdk has tests that
// depend on the error message emitted by the code above.
// TODO use the code below when we can.
//
// const passStyle = passStyleOf(specimen);
// const kindDetails =
// passStyle !== 'tagged'
// ? // Pass style can be embedded in details without quotes.
// b(passStyle)
// : // Tag must be quoted because it is potentially attacker-controlled
// // (unlike `kindOf`, this does not reject unrecognized tags).
// q(getTag(specimen));
// return check(
// false,
// // `label` can be embedded without quotes because it is provided by
Expand Down

0 comments on commit 4388a2f

Please sign in to comment.