Ignore:
Timestamp:
May 15, 2017, 11:30:26 AM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
d36c117
Parents:
65aca88
Message:

initial work on references: reference types passed through the system, very simple examples work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Validate.cc

    r65aca88 rce8c12f  
    818818                        }
    819819                        PointerType * ptrType = dynamic_cast< PointerType * >( params.front()->get_type() );
    820                         if ( ! ptrType || ptrType->is_array() ) {
     820                        ReferenceType * refType = dynamic_cast< ReferenceType * >( params.front()->get_type() );
     821                        if ( ( ! ptrType && ! refType ) || ( ptrType && ptrType->is_array() ) ) {
    821822                                throw SemanticError( "First parameter of a constructor, destructor, or assignment function must be a pointer ", funcDecl );
    822823                        }
Note: See TracChangeset for help on using the changeset viewer.