Deprecated inline generic types, deprecated tuple / triple types.

This commit is contained in:
Christoffer Lerno
2024-09-05 23:42:20 +02:00
parent ed5d338a39
commit ad0e97ab7b
8 changed files with 21 additions and 6 deletions

View File

@@ -2,8 +2,10 @@ import std::thread;
import std::io;
import std::atomic::types;
Atomic(<uint>) a;
Atomic(<float>) fa;
def AtomicUint = Atomic(<uint>);
def AtomicFloat = Atomic(<float>);
AtomicUint a;
AtomicFloat fa;
fn void! add() @test
{

View File

@@ -2,6 +2,7 @@ module test;
import std::io;
import std::collections::map;
def IntMap = HashMap(<String, int>);
fn void! copy_map() @test
{
TrackingAllocator alloc;
@@ -9,7 +10,7 @@ fn void! copy_map() @test
assert(alloc.allocated() == 0);
mem::@scoped(&alloc)
{
HashMap(<String, int>) x;
IntMap x;
x.new_init();
DString y;
y.append("hello");

View File

@@ -9,9 +9,10 @@ struct Overalign
float[<4>] x @align(128);
}
def OveralignList = List(<Overalign>);
fn void overaligned_type()
{
List(<Overalign>) l;
OveralignList l;
Overalign y;
for (int i = 0; i < 1000; i++) l.push(y);
assert((usz)l.get_ref(2) - (usz)l.get_ref(1) == Overalign.sizeof);