Changeset fc134a48 for src/ResolvExpr/CandidateFinder.cpp
- Timestamp:
- Jun 2, 2022, 4:12:53 AM (2 years ago)
- Branches:
- ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
- Children:
- 1df492a, 90a8125, e5d9274
- Parents:
- 01f6a06
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/CandidateFinder.cpp
r01f6a06 rfc134a48 899 899 900 900 if (argType.as<ast::PointerType>()) funcFinder.otypeKeys.insert(Mangle::Encoding::pointer); 901 else if (const ast::EnumInstType * enumInst = argType.as<ast::EnumInstType>()) { 902 const ast::EnumDecl * enumDecl = enumInst->base; 903 if ( const ast::Type* enumType = enumDecl->base ) { 904 // instance of enum (T) is a instance of type (T) 905 funcFinder.otypeKeys.insert(Mangle::mangle(enumType, Mangle::NoGenericParams | Mangle::Type)); 906 } else { 907 // instance of an untyped enum is techically int 908 funcFinder.otypeKeys.insert(Mangle::mangle(enumDecl, Mangle::NoGenericParams | Mangle::Type)); 909 } 910 } 901 911 else funcFinder.otypeKeys.insert(Mangle::mangle(argType, Mangle::NoGenericParams | Mangle::Type)); 902 912 } … … 918 928 919 929 // find function operators 920 ast::ptr< ast::Expr > opExpr = new ast::NameExpr{ untypedExpr->location, "?()" }; 930 ast::ptr< ast::Expr > opExpr = new ast::NameExpr{ untypedExpr->location, "?()" }; // ??? why not ?{} 921 931 CandidateFinder opFinder( context, tenv ); 922 932 // okay if there aren't any function operations
Note: See TracChangeset
for help on using the changeset viewer.