mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-29 20:05:35 +02:00
add test case for missing problembinding when passing a (basic) type in a non-type context
This commit is contained in:
parent
1aa5e93de5
commit
03273b05c1
1 changed files with 9 additions and 0 deletions
|
@ -2784,4 +2784,13 @@ public class AST2TemplateTests extends AST2BaseTest {
|
||||||
assertInstance(args.keyAt(0), ICPPTemplateNonTypeParameter.class);
|
assertInstance(args.keyAt(0), ICPPTemplateNonTypeParameter.class);
|
||||||
assertInstance(args.getAt(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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue