void expectCanAssignToPrototype ( JSType ownerType , Node node , JSType rightType ) { if ( ownerType . isFunctionType ( ) ) { FunctionType functionType = ownerType . toMaybeFunctionType ( ) ; if ( functionType . isConstructor ( ) ) { expectObject ( node , rightType , "cannot override prototype with non-object" ) ; } } }
Expect that it s valid to assign something to a given type s prototype .