mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Deprecated inline generic types, deprecated tuple / triple types.
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user