Skip to content

Commit

Permalink
CI Fix tests (#1250)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
jarzec authored Aug 27, 2024
1 parent 8521e0c commit c599f41
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 370 deletions.
12 changes: 7 additions & 5 deletions regression-tests/mixed-type-safety-1.cpp2
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ print: <T : type> ( msg: std::string, x: T ) =

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

c := new<Circle>(); // safe by construction
s : * Shape = c.get(); // safe by Lifetime
print("\ns* is Shape? ", s* is Shape );
print( "s* is Circle?", s* is Circle );
print( "s* is Square?", s* is Square );
::print("\ns* is Shape? ", s* is Shape );
::print( "s* is Circle?", s* is Circle );
::print( "s* is Square?", s* is Square );
}
4 changes: 3 additions & 1 deletion regression-tests/pure2-type-safety-1.cpp2
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ main: () -> int =

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

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

This file was deleted.

Loading

0 comments on commit c599f41

Please sign in to comment.