package p.studio.compiler.source.tables;

import java.util.Objects;

public record IntrinsicReference(
        String canonicalName,
        long canonicalVersion) {

    public IntrinsicReference {
        canonicalName = Objects.requireNonNull(canonicalName, "canonicalName");
        if (canonicalName.isBlank()) {
            throw new IllegalArgumentException("canonicalName must not be blank");
        }
        if (canonicalVersion < 0) {
            throw new IllegalArgumentException("canonicalVersion must be non-negative");
        }
    }
}
