1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 18:26:01 +02:00

Bug 397494 - Error evaluating decltype of constant lambda

Change-Id: Ib9f5b09d331db9b7686c7d1c3a0c124cb235131f

Reviewed-on: https://git.eclipse.org/r/9478
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
This commit is contained in:
Nathan Ridge 2013-01-29 15:09:59 -08:00 committed by Sergey Prigogin
parent 047a6f8f29
commit 0ef8976a2a
2 changed files with 16 additions and 1 deletions

View file

@ -10125,6 +10125,21 @@ public class AST2CPPTests extends AST2TestBase {
parseAndCheckBindings(getAboveComment(), CPP, true);
}
// template <typename T>
// T bar();
// struct S {
// void waldo();
// };
// int main() {
// auto L = [](S s) { return s; };
// typedef decltype(L) lambda_type;
// decltype(bar<const lambda_type>()(S())) v;
// v.waldo();
// }
public void testDecltypeWithConstantLambda_397494() throws Exception {
parseAndCheckBindings();
}
// template <bool>
// struct enable_if {
// };

View file

@ -103,7 +103,7 @@ public class CPPClosureType extends PlatformObject implements ICPPClassType, ICP
// Function call operator
final IType returnType= getReturnType();
final IType[] parameterTypes= getParameterTypes();
ft= new CPPFunctionType(returnType, parameterTypes, isMutable(), false, false);
ft= new CPPFunctionType(returnType, parameterTypes, !isMutable(), false, false);
ICPPParameter[] params = new ICPPParameter[parameterTypes.length];
for (int i = 0; i < params.length; i++) {