1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 17:05:26 +02:00

add test case for missing problembinding when passing a (basic) type in a non-type context

This commit is contained in:
Andrew Ferguson 2008-05-27 14:22:58 +00:00
parent 1aa5e93de5
commit 03273b05c1

View file

@ -2784,4 +2784,13 @@ public class AST2TemplateTests extends AST2BaseTest {
assertInstance(args.keyAt(0), ICPPTemplateNonTypeParameter.class);
assertInstance(args.getAt(0), ICPPTemplateNonTypeParameter.class);
}
// template<int x>
// class A {};
//
// A<int> aint; // should be an error
public void _testTypeArgumentToNonTypeParameter() throws Exception {
BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
ba.assertProblem("A<int>", 6);
}
}