Class: Duby::Compiler::JVM::ImplicitSelf

Inherits:
Object
  • Object
show all
Defined in:
lib/duby/jvm/compiler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type) ⇒ ImplicitSelf

Returns a new instance of ImplicitSelf.



38
39
40
# File 'lib/duby/jvm/compiler.rb', line 38

def initialize(type)
  @inferred_type = type
end

Instance Attribute Details

#inferred_typeObject (readonly)

Returns the value of attribute inferred_type.



36
37
38
# File 'lib/duby/jvm/compiler.rb', line 36

def inferred_type
  @inferred_type
end

Instance Method Details

#compile(compiler, expression) ⇒ Object



42
43
44
45
46
# File 'lib/duby/jvm/compiler.rb', line 42

def compile(compiler, expression)
  if expression
    compiler.method.aload(0)
  end
end