Skip to content

Commit 5d4404a

Browse files
committed
Pass annotations to constant
1 parent 390b408 commit 5d4404a

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

lib/rbs/prototype/rb.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,8 @@ def process(node, decls:, comments:, context:)
382382
name: const_name,
383383
type: type,
384384
location: nil,
385-
comment: comments[node.first_lineno - 1]
385+
comment: comments[node.first_lineno - 1],
386+
annotations: []
386387
)
387388

388389
when :IASGN

lib/rbs/prototype/rbi.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,8 @@ def process(node, outer: [], comments:)
257257
name: name,
258258
type: type,
259259
location: nil,
260-
comment: nil
260+
comment: nil,
261+
annotations: []
261262
)
262263
end
263264
when :ALIAS

lib/rbs/prototype/runtime.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,7 @@ def generate_constants(mod, decls)
462462
name: to_type_name(name.to_s),
463463
type: type,
464464
location: nil,
465+
annotations: [],
465466
comment: nil
466467
)
467468
end

0 commit comments

Comments
 (0)