Permalink
Browse files

Fix generics typo

  • Loading branch information...
1 parent 0a44001 commit c92f2a179917bd61f823a813ee9ec8746f84ff6d @ribrdb ribrdb committed Apr 18, 2012
Showing with 11 additions and 1 deletion.
  1. +2 −1 lib/bitescript/asm3/mirror.rb
  2. +1 −0 lib/bitescript/mirror.rb
  3. +8 −0 test/test_generics.rb
@@ -385,6 +385,7 @@ def initialize(klass, flags, return_type, name, parameters, exceptions, signatur
@return_type = return_type
@argument_types = parameters
@exception_types = exceptions
+ @signature = signature
end
def generic_parameter_types
@@ -593,7 +594,7 @@ def return_type(type)
end
def visitBaseType(desc)
- return_type(Type.getType(desc.chr))
+p return_type(Type.getType(desc.chr))
end
def visitArrayType
View
@@ -400,6 +400,7 @@ def initialize(klass, flags, return_type, name, parameters, exceptions, signatur
@return_type = return_type
@argument_types = parameters
@exception_types = exceptions
+ @signature = signature
end
def generic_parameter_types
View
@@ -124,4 +124,12 @@ def test_multiple_bounds
assert_equal "java.lang.Comparable<T>", t.bounds[0].to_s
assert_equal "java.lang.Iterable<T>", t.bounds[1].to_s
end
+
+ def test_generic_parameter_types
+ mirror = BiteScript::ClassMirror.load('java.util.ArrayList')
+ method = mirror.getDeclaredMethods('add')[0]
+ assert_not_nil method.generic_parameter_types
+ puts method.generic_parameter_types
+
+ end
end

0 comments on commit c92f2a1

Please sign in to comment.