extension_type_implements_disallowed_type 진단: 확장 타입이 허용되지 않는 타입을 implements 할 때

extension_type_implements_disallowed_type 진단: 확장 타입이 허용되지 않는 타입을 implements 할 때

Dart 분석기가 내보내는 진단에는 이름이 있어요. extension_type_implements_disallowed_type확장 타입(extension type)이 implements에 허용되지 않는 타입을 구현할 때 분석기가 알려주는 컴파일 타임 진단이에요.

출처: extension_type_implements_disallowed_type

본문

설명

분석기는 확장 타입이 implements할 수 없는 타입을 implements하면 이 진단을 만들어요.

다음 코드는 확장 타입이 dynamic 타입을 implements할 수 없기 때문에 이 진단이 나와요.

extension type A(int i) implements dynamic {}

흔한 해결 방법

implements 절에서 허용되지 않는 타입을 삭제하면 돼요.

extension type A(int i) {}

더 알아보기