Class: Steep::Subtyping::Result::Failure::UnsatisfiedConstraints

Inherits:
Object
  • Object
show all
Defined in:
lib/steep/subtyping/result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(error) ⇒ UnsatisfiedConstraints

Returns a new instance of UnsatisfiedConstraints.



241
242
243
# File 'lib/steep/subtyping/result.rb', line 241

def initialize(error)
  @error = error
end

Instance Attribute Details

#errorObject (readonly)

Returns the value of attribute error.



239
240
241
# File 'lib/steep/subtyping/result.rb', line 239

def error
  @error
end

Instance Method Details

#messageObject



261
262
263
# File 'lib/steep/subtyping/result.rb', line 261

def message
  "A constraint on #{var} cannot be solved: #{sub_type} <: #{super_type}"
end

#resultObject



257
258
259
# File 'lib/steep/subtyping/result.rb', line 257

def result
  error.result
end

#sub_typeObject



249
250
251
# File 'lib/steep/subtyping/result.rb', line 249

def sub_type
  error.sub_type
end

#super_typeObject



253
254
255
# File 'lib/steep/subtyping/result.rb', line 253

def super_type
  error.super_type
end

#varObject



245
246
247
# File 'lib/steep/subtyping/result.rb', line 245

def var
  error.var
end