Sha256: 6855c302599df30717aa403ee4c9e78fa4c4a62fe0f06a41850cc8d06b5381b8

Contents?: true

Size: 927 Bytes

Versions: 44

Compression:

Stored size: 927 Bytes

Contents

module RBS
  class VarianceCalculator
    type variance = :unused | :covariant | :contravariant | :invariant

    class Result
      attr_reader result: Hash[Symbol, variance]

      def initialize: (variables: Array[Symbol]) -> void

      def covariant: (Symbol) -> void

      def contravariant: (Symbol) -> void

      def invariant: (Symbol) -> void

      def each: () { ([Symbol, variance]) -> void } -> void

      def include?: (Symbol) -> bool

      def compatible?: (Symbol, with_annotation: variance) -> bool
    end

    attr_reader builder: DefinitionBuilder

    def initialize: (builder: DefinitionBuilder) -> void

    def env: () -> Environment

    def in_method_type: (method_type: MethodType, variables: Array[Symbol]) -> Result

    def in_inherit: (name: TypeName, args: Array[Types::t], variables: Array[Symbol]) -> Result

    def type: (Types::t, result: Result, context: variance) -> void
  end
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
rbs-1.1.0 sig/variance_calculator.rbs
rbs-1.0.6 sig/variance_calculator.rbs
rbs-1.0.5 sig/variance_calculator.rbs
rbs-1.0.4 sig/variance_calculator.rbs
rbs-1.0.3 sig/variance_calculator.rbs
rbs-1.0.2 sig/variance_calculator.rbs
rbs-1.0.1 sig/variance_calculator.rbs
rbs-1.0.0 sig/variance_calculator.rbs
rbs-1.0.0.pre2 sig/variance_calculator.rbs
rbs-1.0.0.pre sig/variance_calculator.rbs
rbs-0.20.1 sig/variance_calculator.rbs
rbs-0.20.0 sig/variance_calculator.rbs
rbs-0.19.0 sig/variance_calculator.rbs
rbs-0.18.1 sig/variance_calculator.rbs
rbs-0.18.0 sig/variance_calculator.rbs
rbs-0.17.0 sig/variance_calculator.rbs
rbs-0.16.0 sig/variance_calculator.rbs
rbs-0.15.0 sig/variance_calculator.rbs
rbs-0.14.0 sig/variance_calculator.rbs
rbs-0.13.1 sig/variance_calculator.rbs