ContributePerguntasPublicaçõesTags
VIKEnut'
EntrarInscreva-se

Pt

РусскийPolskiDeutschEspañol

Tema escuro

Write
EntrarInscreva-se

Tema escuro

Pt

РусскийPolskiDeutschEspañol

Você é muito ativo! É ótimo!

Registre-se para continuar usando todos os recursos do Techfeed

SignUpAction

Já possui uma conta?SignInAction

Tags populares

git-describegame-physicscrc16file-importpowermockubuntu-11.04sienawindows-integrated-auththrobberhibernate-criteriatranslationrfc2445theorem-provingsynonymslideshowspectrumsendgridtypo3ntlmtfs2013

Perguntas relacionadas

1

Convertendo array de strings C em Swift array de strings

4

Como converter um bool para uma string no Go?

25

Como analiso uma string em um float ou int em Python?

5

Não é possível converter implicitamente o tipo 'customtype' para 'othercustomtype'

5

Por que usar conversões implícitas / explícitas em vez de construtores?

Dec 20, 2013, 09:19 AM
 
type-conversionscala

Usando uma classe implícita para substituir o método

Minha intenção é mudar o comportamento do== método emString chamarequalsIgnoreCase.

Este código

implicit class LowerCase(s: String) {
      override def ==(that: LowerCase) = that.equalsIgnoreCase(this)
}

resulta neste erro

error: type mismatch;
 found   : MyClass.LowerCase
 required: String
      override def ==(that: String) = that.equalsIgnoreCase(this)

questionAnswers(1)

yourAnswerToTheQuestion

Perguntas populares

0 a resposta

estrutura @Compiled fornece erro de código de bit ao arquivar

0 a resposta

RTTI Sobrecarga em C ++

0 a resposta

Como ler / entender uma sequência de dados serializada PHP em python

0 a resposta

Angular.js - ng-change não dispara quando ng-pattern é $ inválido

0 a resposta

extensão PDO @PHP não está funcionando no IIS

© 2020. Todos os direitos reservados
Feito com amor 

Pt

РусскийPolskiDeutschEspañol