Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading