fix anonymous class issue
Merge pull request #9002 from dahakawang/master

issue #8934 sovled