Skip to content

[TIP] Scala(스칼라) Declare variable named 'type': 변수명이 type 일 때 선언  #24

@haonly

Description

@haonly

Json 데이터 파싱 시 변수 이름이 'type' 이어야 하는 경우가 생김.

backticks(`)로 해결 가능!

var `type` = 10

case class Policy (
   Name: String
   `type`: Int )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions