mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 01:15:29 +02:00
Bug 491748 - Name resolution problem with initializer list
Change-Id: Ib259f16a080c7f8848a7ce9e1c40c0153e99f387
This commit is contained in:
parent
47813ac881
commit
3c09a628a2
2 changed files with 22 additions and 0 deletions
|
@ -10834,6 +10834,15 @@ public class AST2CPPTests extends AST2TestBase {
|
|||
helper.assertNonProblemOnFirstIdentifier("fint({vchar");
|
||||
}
|
||||
|
||||
// void waldo(char x);
|
||||
//
|
||||
// void test() {
|
||||
// waldo({1});
|
||||
// }
|
||||
public void testNarrowingConversionInListInitialization_491748() throws Exception {
|
||||
parseAndCheckBindings();
|
||||
}
|
||||
|
||||
// namespace std {
|
||||
// struct string {};
|
||||
// struct exception {};
|
||||
|
|
|
@ -364,6 +364,19 @@ public abstract class ArithmeticConversion {
|
|||
}
|
||||
return n < (Integer.MAX_VALUE + 1L) * 2;
|
||||
|
||||
case eChar:
|
||||
return 0 <= n && n <= 0xFF;
|
||||
|
||||
case eChar16:
|
||||
case eWChar:
|
||||
return 0 <= n && n <= 0xFFFF;
|
||||
|
||||
case eChar32:
|
||||
return 0 <= n && n <= 0xFFFFFFFFL;
|
||||
|
||||
case eDecimal32:
|
||||
return Integer.MIN_VALUE <= n && n <= Integer.MAX_VALUE;
|
||||
|
||||
case eFloat:
|
||||
float f= n;
|
||||
return (long) f == n;
|
||||
|
|
Loading…
Add table
Reference in a new issue