Closed sdboyer closed 1 year ago
The following CUE:
nullType: null @cuetsy(kind="type") nullInUnion: string | null @cuetsy(kind="type") nullDefault: "foo" | "bar" | *null @cuetsy(kind="type") obj: { nullField: null } @cuetsy(kind="interface")
Should this output, or something close:
export type nullType = null; export type nullInUnion = string | null; export type nullDefault = "foo" | "bar" | null; export const defaultnullDefault: nullDefault = null; export interface obj { nullField: null }
But instead, we get:
export type nullType = %!s(<nil>); export type nullInUnion = %!s(PANIC=String method: runtime error: invalid memory address or nil pointer dereference); export type nullDefault = %!s(PANIC=String method: runtime error: invalid memory address or nil pointer dereference); export const defaultnullDefault: nullDefault = %!s(<nil>); export interface obj %!s(PANIC=String method: runtime error: invalid memory address or nil pointer dereference)
This is now codified in the testdata/imports/nulltype.txtar test.
testdata/imports/nulltype.txtar
The following CUE:
Should this output, or something close:
But instead, we get:
This is now codified in the
testdata/imports/nulltype.txtar
test.