Skip to content

Commit

Permalink
playground: fix test by replacing bs.deriving with deriving
Browse files Browse the repository at this point in the history
  • Loading branch information
jchavarri committed Jun 5, 2023
1 parent 68cc036 commit a255638
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions test/blackbox-tests/playground.t
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ Prepare an input file to test some snippets to exercise common functionality
> console.log(ocaml.compile(\`let john = [%bs.obj { name = "john"; age = 99 }] let t = john##name\`));
> console.log(ocaml.compile(\`let foo = Belt.List.map\`));
> console.log(ocaml.compile(\`let +foo\`));
> console.log(ocaml.compile(\`let foo = "fpp" + 2\`));
> console.log(ocaml.compile(\`let foo = "" + 2\`));
> console.log(ocaml.compile(\`type person = {
> name: string ;
> age: int
> }[@@bs.deriving abstract]
> }[@@deriving abstract]
>
> let person1 = person ~name:"joe" ~last:"bar" ~age:10\`));
> let person1: person = person ~name:"joe" ~age:10\`));
> EOF
$ node input.js
Expand Down Expand Up @@ -77,21 +77,20 @@ Prepare an input file to test some snippets to exercise common functionality
row: 0,
column: 10,
endRow: 0,
endColumn: 15,
endColumn: 12,
text: 'This expression has type string but an expression was expected of type int',
type: 'error'
}
File "_none_", line 4, characters 4-15:
Alert unused: Unused attribute [@bs.deriving]
This means such annotation is not annotated properly.
For example, some annotations are only meaningful in externals
{
js_error_msg: 'Line 6, 14:\n Error Unbound value person',
row: 5,
column: 14,
endRow: 5,
endColumn: 20,
text: 'Unbound value person',
type: 'error'
js_code: '// Generated by Melange\n' +
"'use strict';\n" +
'\n' +
'\n' +
'var person1 = {\n' +
' name: "joe",\n' +
' age: 10\n' +
'};\n' +
'\n' +
'exports.person1 = person1;\n' +
'/* No side effect */\n'
}

0 comments on commit a255638

Please sign in to comment.