From af4200aaa9f6410f191fa0197175ac0a2dabe48a Mon Sep 17 00:00:00 2001 From: Soutaro Matsumoto Date: Fri, 12 Mar 2021 13:22:26 +0900 Subject: [PATCH] Add RBS comment --- sig/types.rbs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sig/types.rbs b/sig/types.rbs index 8868c3174..fa94a1a6c 100644 --- a/sig/types.rbs +++ b/sig/types.rbs @@ -134,7 +134,13 @@ module RBS def self.build: (Symbol) -> Variable | (Array[Symbol]) -> Array[Variable] - def self.fresh: (?Symbol) -> Variable + # Returns fresh type variable with prefix (if given.) + # + # Variable.fresh(:S) # => S@1 + # Variable.fresh(:S) # => S@2 + # Variable.fresh() # => T@3 + # + def self.fresh: (?Symbol prefix) -> Variable end class ClassSingleton