// Semantic resolution public override void ResolveStatement(ISemanticResolver s) { m_stmtTry.ResolveStatement(s); for(int i = 0; i < CatchHandlers.Length; i++) { CatchHandler c = CatchHandlers[i]; c.ResolveHandler(s); // For each catch handler, make sure that it's type doesn't shadow // a previous handler. for(int j = 0; j < i; j++) { CatchHandler cPrev = CatchHandlers[j]; if (s.IsDerivedType(cPrev.CatchType, c.CatchType)) { //ThrowError_ShadowCatchHandlers(s, this.Location, c.CatchType.CLRType, cPrev.CatchType.CLRType); ThrowError(SymbolError.ShadowCatchHandlers(this.Location, c.CatchType.CLRType, cPrev.CatchType.CLRType)); } } } // end for if (m_stmtFinally != null) m_stmtFinally.ResolveStatement(s); }