Skip to content

Commit 5009b47

Browse files
committed
Added tests for interface files and externals.
1 parent c5a78cc commit 5009b47

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Fix issue where spreading record types with optional labels would not have their labels preserved as optional. https://github.com/rescript-lang/rescript-compiler/pull/6154
1919
- Fix error location to be the type with the spreads when spreading record types with duplicate labels. https://github.com/rescript-lang/rescript-compiler/pull/6157
2020
- Disable warning on `@inline` attibute on uncurried functions. https://github.com/rescript-lang/rescript-compiler/pull/6152
21+
- Support doc comments on arguments of function types. https://github.com/rescript-lang/rescript-compiler/pull/6161
2122

2223
# 11.0.0-alpha.3
2324

res_syntax/tests/printer/expr/DocComments.res

+9
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,12 @@ let doc1: (/** ddd */ ~x: int) => int = (~x) => x + 1
22
let doc2: @res.doc(" ddd ") int => int = x => x + 1
33
let doc3: /** ddd */ int => int = x => x + 1
44
let doc4: (/** ddd */ ~x: int, /** eee */ n) => int = (~x) => x + 1
5+
6+
module M : {
7+
let foo : (/** xxdoc */ ~x:int, /** yydoc */ ~y:int) => int
8+
} = {
9+
let foo= (~x, ~y) => x+y
10+
}
11+
12+
@val
13+
external ex : (/** ddd */ ~x: int, /** eee */ n) => int = "ex"

res_syntax/tests/printer/expr/expected/DocComments.res.txt

+9
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,12 @@ let doc1: (/** ddd */ ~x: int) => int = (~x) => x + 1
22
let doc2: /** ddd */ int => int = x => x + 1
33
let doc3: /** ddd */ int => int = x => x + 1
44
let doc4: (/** ddd */ ~x: int, /** eee */ n) => int = (~x) => x + 1
5+
6+
module M: {
7+
let foo: (/** xxdoc */ ~x: int, /** yydoc */ ~y: int) => int
8+
} = {
9+
let foo = (~x, ~y) => x + y
10+
}
11+
12+
@val
13+
external ex: (/** ddd */ ~x: int, /** eee */ n) => int = "ex"

0 commit comments

Comments
 (0)