Ignore:
Timestamp:
Aug 16, 2024, 12:25:53 PM (3 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
3ac5fd8
Parents:
5b643ea
Message:

Added a check to make sure that optional parameters to not appear on function types not attached to function declarations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/DeclarationNode.cpp

    r5b643ea rafb15cf  
    999999        assert( type );
    10001000
     1001        // Some types are parsed as declarations and, syntactically, can have
     1002        // initializers. However, semantically, this is meaningless.
     1003        if ( initializer ) {
     1004                SemanticError( this, "Initializer on type declaration " );
     1005        }
     1006
    10011007        switch ( type->kind ) {
    10021008        case TypeData::Aggregate: {
Note: See TracChangeset for help on using the changeset viewer.