Skip to content

docs still mention erased #12034

Closed
Closed
@johnynek

Description

@johnynek

http://dotty.epfl.ch/docs/reference/metaprogramming/inline.html#erasedvalue

see:

erased def erasedValue[T]: T = ???

The erasedValue function pretends to return a value of its type argument T. In fact, it would always raise a NotImplementedError exception when called. But the function can in fact never be called, since it is declared erased, so can only be used at compile-time during type checking.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions