Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHannes Vogt2019-01-29 15:36:42 -0500
committerHannes Vogt2019-02-01 01:18:02 -0500
commite5466b8204c8c903c36e43e0c9d5c4ea9d83a942 (patch)
tree1f7c757561654b02515fa16ca81e1d5a93d6f86f /core/org.eclipse.cdt.core.tests
parent740496c20ff25c43e53d5e3629721b761b2fcb8b (diff)
downloadorg.eclipse.cdt-e5466b8204c8c903c36e43e0c9d5c4ea9d83a942.tar.gz
org.eclipse.cdt-e5466b8204c8c903c36e43e0c9d5c4ea9d83a942.tar.xz
org.eclipse.cdt-e5466b8204c8c903c36e43e0c9d5c4ea9d83a942.zip
Bug 543913 - False negative in ctor with wrong arguments
Change-Id: I3a9c692383c5c9d8c465d9ecbc66463b39d5199d Signed-off-by: Hannes Vogt <hannes@havogt.de>
Diffstat (limited to 'core/org.eclipse.cdt.core.tests')
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java
index 3134508e077..b32453e95e7 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java
@@ -12834,4 +12834,20 @@ public class AST2CPPTests extends AST2CPPTestBase {
// which is explicit
bh.assertImplicitName("a0", 2, IProblemBinding.class);
}
+
+ // struct type {
+ // type(int a) {}
+ // };
+ //
+ // struct other_type {};
+ //
+ // int main() {
+ // type(1, 2);
+ // type(other_type());
+ // }
+ public void testCtorWithWrongArguments_543913() throws Exception {
+ BindingAssertionHelper bh = getAssertionHelper();
+ bh.assertImplicitName("type(1, 2)", 4, IProblemBinding.class);
+ bh.assertImplicitName("type(other_type())", 4, IProblemBinding.class);
+ }
}

Back to the top