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:
parent
047a6f8f29
commit
0ef8976a2a
2 changed files with 16 additions and 1 deletions
|
@ -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 {
|
||||
// };
|
||||
|
|
|
@ -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++) {
|
||||
|
|
Loading…
Add table
Reference in a new issue