Skip to content

inline val of null #12177

Closed
Closed
@japgolly

Description

@japgolly

Compiler version

RC3

Minimized code

object Test1 {
  inline val v = null
  inline def d = null
}

Output

[error] 2 |  inline val v = null
[error]   |                 ^^^^
[error]   |                 inline value must contain a literal constant value.
[error]   |
[error]   |                 To inline more complex types consider using `inline def`
[error] one error found

Expectation

Want to check that this is really desired behaviour vs an oversight. null's are literal constants right? Literal(Constant(null)) is valid in the quoting API.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions