fix Issue 11010 - typeid doesn't work on a member of an instance

To distinguish the typeid context, add `bool intypeid` parameter on Type::resolve().