Skip to content

Commit

Permalink
bug fixed gereric base class, for issue 604. #604
Browse files Browse the repository at this point in the history
  • Loading branch information
wenshao committed May 4, 2016
1 parent 4792fb2 commit 4488fbb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@ private void _get(MethodVisitor mw, Context context, FieldInfo fieldInfo) {
mw.visitVarInsn(ALOAD, context.var("entity"));
Class<?> declaringClass = method.getDeclaringClass();
mw.visitMethodInsn(INVOKEVIRTUAL, type(declaringClass), method.getName(), desc(method));
if (!declaringClass.equals(fieldInfo.fieldClass)) {
if (!method.getReturnType().equals(fieldInfo.fieldClass)) {
mw.visitTypeInsn(CHECKCAST, type(fieldInfo.fieldClass)); // cast
}
} else {
Expand Down

0 comments on commit 4488fbb

Please sign in to comment.