Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[✏️ CORRECT] : 도피가 쏘아올린 작은 공(class 내의 let property에 관하여) #37

Closed
1 task done
GroundDev opened this issue Jul 18, 2022 · 3 comments · Fixed by #29
Closed
1 task done
Assignees
Labels
✏️ CORRECT 주로 문법의 오류나 타입의 변경, 이름 변경 등에 사용 (노란것들) 😀 Ground
Projects

Comments

@GroundDev
Copy link
Collaborator

GroundDev commented Jul 18, 2022

작업내용

  • 도피의 코드리뷰 내용을 반영하기 위해 끙끙대보다가 이해되지 않는 부분이 있어 올립니다. #29 comment
  • 작업 상황은 다음과 같이 진행중입니다.

image

위와 같이 초기화 순서로 인해 문제가 생겼습니다. - 이에 혹시나 해서 static으로 선언해 봤습니다.

image

그랬더니 띠용 오류가 생기지 않는 겁니다. - 이게 대체 왜 이렇게 된거지? 클래스 내에서 static으로 선언하게 되면 해당 인스턴스를 생성하기 전에 이미 생성이 되어있는건가? 싶어서 관련된 내용들을 좀 찾아봤는데, 오히려 그 반대로 lazy하게 선언된다는 점을(?) 알게 되었습니다. - 이에 관해 얘기를 나눠보고 싶어 이슈를 열게 되었습니다.

스크린샷

  • UI 관련 작업은 아닙니다.

Reference

  • 레퍼런스는 그때그때 올리겠습니다.
@GroundDev GroundDev added the ✏️ CORRECT 주로 문법의 오류나 타입의 변경, 이름 변경 등에 사용 (노란것들) label Jul 18, 2022
@GroundDev GroundDev self-assigned this Jul 18, 2022
@GroundDev GroundDev added this to To do in GiveCake via automation Jul 18, 2022
@GroundDev GroundDev changed the title [✏️ CORRECT] : CORRECT 타이틀 [✏️ CORRECT] : 도피가 쏘아올린 작은 공(class 내의 let property에 관하여) Jul 18, 2022
@ddophi98
Copy link
Collaborator

image

저런 오류가 이렇게 약간 초기화가 안된 상태에서 다른 변수에 할당하려할떄? 생기긴합니다

@ddophi98
Copy link
Collaborator

image

그래서 저는 주로 저 오류 해결할땐 이렇게 쓰죠

@GroundDev
Copy link
Collaborator Author

GroundDev commented Jul 19, 2022

감사합니다!
추후 refactoring 작업할 때 염두하겠습니다.

GiveCake automation moved this from To do to Done Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✏️ CORRECT 주로 문법의 오류나 타입의 변경, 이름 변경 등에 사용 (노란것들) 😀 Ground
Projects
Development

Successfully merging a pull request may close this issue.

2 participants