«type-mismatch» 태그된 질문

4
데이터 (유형 인터페이스 {})를 유형 문자열로 변환 할 수 없음 : 유형 어설 션 필요
나는 아주 새로운 것이었고 나는이 알림 패키지를 가지고 놀고있었습니다 . 처음에는 다음과 같은 코드가있었습니다. func doit(w http.ResponseWriter, r *http.Request) { notify.Post("my_event", "Hello World!") fmt.Fprint(w, "+OK") } 위 Hello World!의 함수에는 개행 문자를 추가하고 싶었습니다 doit. 왜냐하면 꽤 간단 하기는하지만 handler나중에 다음과 같이하기 때문입니다. func handler(w http.ResponseWriter, r *http.Request) { myEventChan …
178 go  type-mismatch 

4
이해를 위해 Scala의 유형 불일치
이 구조로 인해 Scala에서 유형 불일치 오류가 발생하는 이유는 무엇입니까? for (first <- Some(1); second <- List(1,2,3)) yield (first,second) <console>:6: error: type mismatch; found : List[(Int, Int)] required: Option[?] for (first <- Some(1); second <- List(1,2,3)) yield (first,second) Some을 List로 전환하면 잘 컴파일됩니다. for (first <- List(1,2,3); second <- Some(1)) …
당사 사이트를 사용함과 동시에 당사의 쿠키 정책개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.