some tests for #341
add the containing method's type arguments to type definitions #341
use Generic interface
work on #341