Changeset 4678c1ec for src


Ignore:
Timestamp:
Oct 18, 2022, 4:19:45 PM (19 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, ast-experimental, master
Children:
ce7d197
Parents:
fad1f14
Message:

check for non-homogeneous nodes in buildList processing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/ParseNode.h

    rfad1f14 r4678c1ec  
    1010// Created On       : Sat May 16 13:28:16 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Feb  2 09:15:49 2022
    13 // Update Count     : 905
     12// Last Modified On : Tue Oct 18 14:15:37 2022
     13// Update Count     : 936
    1414//
    1515
     
    463463                        errors.append( e );
    464464                } // try
    465                 cur = dynamic_cast< NodeType * >( cur->get_next() );
     465                const ParseNode * temp = (cur->get_next());
     466                cur = dynamic_cast< const NodeType * >( temp ); // should not return nullptr
     467                if ( ! cur && temp ) {                                                  // non-homogeneous nodes ?
     468                        SemanticError( cur->location, "internal error, non-homogeneous nodes founds in buildList processing." );
     469                } // if
    466470        } // while
    467471        if ( ! errors.isEmpty() ) {
Note: See TracChangeset for help on using the changeset viewer.