d6bdd08002
the typechecker project can collect all the top level types from a file, which is pretty cool I think (except for pointers, those aren't implemented yet...)
18 lines
570 B
C#
18 lines
570 B
C#
namespace meowlang.typechecker;
|
|
|
|
public record GenericArrayTypeDescription : GenericTypeDescription
|
|
{
|
|
private readonly GenericTypeId _elementType;
|
|
private readonly uint _size;
|
|
|
|
public GenericArrayTypeDescription(List<string> genericNames, GenericTypeId elementType, uint size) : base(genericNames)
|
|
{
|
|
_elementType = elementType;
|
|
_size = size;
|
|
}
|
|
|
|
public override ArrayTypeDescription Concretize(List<Guid> typeParams)
|
|
{
|
|
return new ArrayTypeDescription(ConcretizeGenericType(_elementType, typeParams), _size);
|
|
}
|
|
} |