mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
Add type annotation in where_ident test
This commit is contained in:
parent
ebc3aab91f
commit
c22c2259c0
3 changed files with 51 additions and 9 deletions
|
@ -1,2 +1,4 @@
|
|||
where : { where : I32 }
|
||||
where = { where: 1 }
|
||||
|
||||
where.where
|
|
@ -1,10 +1,10 @@
|
|||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
Index(2147483648),
|
||||
Index(2147483649),
|
||||
],
|
||||
regions: [
|
||||
@0-18,
|
||||
@0-39,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
|
@ -15,25 +15,62 @@ Defs(
|
|||
spaces: [],
|
||||
type_defs: [],
|
||||
value_defs: [
|
||||
Body(
|
||||
Annotation(
|
||||
@0-5 Identifier(
|
||||
"where",
|
||||
),
|
||||
@8-18 Record(
|
||||
[
|
||||
@9-17 RequiredValue(
|
||||
@8-20 Record {
|
||||
fields: [
|
||||
@9-19 RequiredValue(
|
||||
@9-14 "where",
|
||||
[],
|
||||
@16-17 Num(
|
||||
@16-19 Apply(
|
||||
"",
|
||||
"I32",
|
||||
[],
|
||||
),
|
||||
),
|
||||
],
|
||||
ext: None,
|
||||
},
|
||||
),
|
||||
AnnotatedBody {
|
||||
ann_pattern: @0-5 Identifier(
|
||||
"where",
|
||||
),
|
||||
ann_type: @8-20 Record {
|
||||
fields: [
|
||||
@9-19 RequiredValue(
|
||||
@9-14 "where",
|
||||
[],
|
||||
@16-19 Apply(
|
||||
"",
|
||||
"I32",
|
||||
[],
|
||||
),
|
||||
),
|
||||
],
|
||||
ext: None,
|
||||
},
|
||||
comment: None,
|
||||
body_pattern: @21-26 Identifier(
|
||||
"where",
|
||||
),
|
||||
body_expr: @29-39 Record(
|
||||
[
|
||||
@30-38 RequiredValue(
|
||||
@30-35 "where",
|
||||
[],
|
||||
@37-38 Num(
|
||||
"1",
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
@19-30 SpaceBefore(
|
||||
@41-52 SpaceBefore(
|
||||
RecordAccess(
|
||||
Var {
|
||||
module_name: "",
|
||||
|
@ -43,6 +80,7 @@ Defs(
|
|||
),
|
||||
[
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
)
|
||||
|
|
|
@ -1,2 +1,4 @@
|
|||
where : {where: I32}
|
||||
where = {where: 1}
|
||||
|
||||
where.where
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue