- File:
-
- 1 edited
-
src/ResolvExpr/CandidateFinder.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/CandidateFinder.cpp
r39d8950 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.