Skip to content

OutOfMemoryError when missing inline modifier #12116

Closed
@note

Description

@note

Compiler version

3.0.0-RC2

Minimized code

Mind the missing inline before erasedValue[T]. With inline erasedValue[T] it works as expected

inline def length[T]: Int =
    erasedValue[T] match
        case _: (h *: t) => 1 + length[t]
        case _: EmptyTuple => 0

Output

[info] compiling 1 Scala source to /Users/michal/programming/scala/scala3-example-project/target/scala-3.0.0-RC2/classes 
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "classloader-cache-cleanup-0"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions