Class: Jade::Frontend::TypeChecking::ResultAcc

Inherits:
Data
  • Object
show all
Defined in:
lib/jade/frontend/type_checking/result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#constraintsObject (readonly)

Returns the value of attribute constraints

Returns:

  • (Object)

    the current value of constraints



31
32
33
# File 'lib/jade/frontend/type_checking/result.rb', line 31

def constraints
  @constraints
end

#typesObject (readonly)

Returns the value of attribute types

Returns:

  • (Object)

    the current value of types



31
32
33
# File 'lib/jade/frontend/type_checking/result.rb', line 31

def types
  @types
end

Instance Method Details

#add(result) ⇒ Object



32
33
34
35
36
37
# File 'lib/jade/frontend/type_checking/result.rb', line 32

def add(result)
  with(
    types: types + [result.type],
    constraints: constraints + result.constraints,
  )
end