Fix infinite recursion in TestCodeError::TestInvalidDerivation()
commit963144034187813c810f345cf6720eac91e96992
authoraravind <aravind.menon@fb.com>
Mon, 12 Sep 2011 19:11:52 +0000 (12 12:11 -0700)
committermacvicar <macvicar@fb.com>
Fri, 23 Sep 2011 23:02:49 +0000 (23 16:02 -0700)
treef59b1910803f84bb4a15bcb9c5d3b2111f130dc3
parentc9e39a6d162e43a58de0b5e2c015127e17c76a31
Fix infinite recursion in TestCodeError::TestInvalidDerivation()

Summary:
We were using a case-sensitive hash set to store the set of seen base
classes in ClassScope::checkDerivation(). This was causing infiinte
recursion in test cases for invalid derivation such as the following:

class A extends class A {}

This was because the class name was lower case, whereas the parent name
was upper case. Fixed by using a case-insensitive hash map.

Test Plan: make fast_tests

Reviewers: mwilliams, myang

Reviewed By: myang

CC: ps, mwilliams, myang
Differential Revision: 322826

Revert Plan: OK
src/compiler/analysis/analysis_result.cpp
src/compiler/analysis/class_scope.cpp
src/compiler/analysis/class_scope.h
src/util/base.h