Skip to content

noreturn parameters are ignored when passed around #22249

@ibuclaw

Description

@ibuclaw

Probably related to #18124

module object;

alias noreturn = typeof(*null);

ulong test1 (ref noreturn key)
{
  return hashOf (key);  // code generated is: return 0
}
ulong test2 (const ref noreturn key)
{
  return hashOf (key);  // likewise
}
ulong test3 (noreturn key)
{
  return hashOf (key);  // likewise
}

ulong hashOf (const noreturn val)
{
  assert(false);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions