Skip to content

Commit c599f41

Browse files
authored
CI Fix tests (#1250)
* CI Fix a C++23 template specialization issue * CI Work around requires support issue in GCC 10 * CI Add explanatory comments to type safety tests * CI Remove unused file
1 parent 8521e0c commit c599f41

9 files changed

+23
-370
lines changed

regression-tests/mixed-type-safety-1.cpp2

+7-5
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,14 @@ print: <T : type> ( msg: std::string, x: T ) =
1414

1515
main: () -> int =
1616
{
17-
print( "1.1 is int?", 1.1 is int );
18-
print( "1 is int?", 1 is int );
17+
// Full qualification is necessary to avoid ambiguity in C++23
18+
// C++23 defines std::print, which would be picked up here by ADL
19+
::print( "1.1 is int?", 1.1 is int );
20+
::print( "1 is int?", 1 is int );
1921

2022
c := new<Circle>(); // safe by construction
2123
s : * Shape = c.get(); // safe by Lifetime
22-
print("\ns* is Shape? ", s* is Shape );
23-
print( "s* is Circle?", s* is Circle );
24-
print( "s* is Square?", s* is Square );
24+
::print("\ns* is Shape? ", s* is Shape );
25+
::print( "s* is Circle?", s* is Circle );
26+
::print( "s* is Square?", s* is Square );
2527
}

regression-tests/pure2-type-safety-1.cpp2

+3-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ main: () -> int =
2323

2424
test_generic: ( x, msg ) = {
2525
msgx: std::string = msg;
26-
print( msgx + " is int? ", x is int );
26+
// Full qualification is necessary to avoid ambiguity in C++23
27+
// C++23 defines std::print, which would be picked up here by ADL
28+
::print( msgx + " is int? ", x is int );
2729
}
2830

2931
print: ( msg: std::string, b: bool ) = {

regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-ufcs-non-local.cpp.output.rej

-64
This file was deleted.

0 commit comments

Comments
 (0)