Skip to content

inline in inline if should not be highlighted as a declaration #133

Closed
@nicolasstucki

Description

@nicolasstucki
    inline def power(x: Double, inline n: Int): Double =
//  ^^^^^^ declaration
//                              ^^^^^^ declaration
      inline if (n == 0) 1.0
//    ^^^^^^ control flow
      else inline if (n % 2 == 1) x * power(x, n - 1)
//         ^^^^^^ control flow
      else power(x * x, n / 2)

Screenshot 2020-07-24 at 12 48 34

Similar for inline x match

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions