protected Map . Entry < PType , AMultiBindListDefinition > typecheckLetBeSt ( INode node , ILexLocation nodeLocation , PMultipleBind bind , PExp suchThat , INode body , TypeCheckInfo question ) throws AnalysisException { final PDefinition def = AstFactory . newAMultiBindListDefinition ( nodeLocation , question . assistantFactory . createPMultipleBindAssistant ( ) . getMultipleBindList ( ( PMultipleBind ) bind ) ) ; def . apply ( THIS , question . newConstraint ( null ) ) ; List < PDefinition > qualified = new Vector < PDefinition > ( ) ; for ( PDefinition d : question . assistantFactory . createPDefinitionAssistant ( ) . getDefinitions ( def ) ) { PDefinition copy = d . clone ( ) ; copy . setNameScope ( NameScope . LOCAL ) ; qualified . add ( copy ) ; } Environment local = new FlatCheckedEnvironment ( question . assistantFactory , qualified , question . env , question . scope ) ; TypeCheckInfo newInfo = new TypeCheckInfo ( question . assistantFactory , local , question . scope , question . qualifiers , question . constraint , null ) ; if ( suchThat != null && ! question . assistantFactory . createPTypeAssistant ( ) . isType ( suchThat . apply ( THIS , newInfo . newConstraint ( null ) ) , ABooleanBasicType . class ) ) { boolean isExpression = node instanceof PExp ; TypeCheckerErrors . report ( ( isExpression ? 3117 : 3225 ) , "Such that clause is not boolean" , nodeLocation , node ) ; } newInfo . qualifiers = null ; final PType r = body . apply ( THIS , newInfo ) ; local . unusedCheck ( ) ; return new Map . Entry < PType , AMultiBindListDefinition > ( ) { @ Override public AMultiBindListDefinition setValue ( AMultiBindListDefinition value ) { return null ; } @ Override public AMultiBindListDefinition getValue ( ) { return ( AMultiBindListDefinition ) def ; } @ Override public PType getKey ( ) { return r ; } } ; }
Type check method for let be such that