package p.studio.compiler.source.tables;

import p.studio.compiler.source.identifiers.TypeSurfaceId;
import p.studio.utilities.structures.ReadOnlyList;

import java.util.Objects;

public record CallableShapeRef(
        ReadOnlyList<TypeSurfaceId> parameterTypeSurfaces,
        TypeSurfaceId outputTypeSurface) {
    public CallableShapeRef {
        parameterTypeSurfaces = parameterTypeSurfaces == null ? ReadOnlyList.empty() : parameterTypeSurfaces;
        outputTypeSurface = Objects.requireNonNull(outputTypeSurface, "outputTypeSurface");
    }
}
