private void checkTypeDeprecation ( NodeTraversal t , Node n ) { if ( ! shouldEmitDeprecationWarning ( t , n ) ) { return ; } ObjectType instanceType = n . getJSType ( ) . toMaybeFunctionType ( ) . getInstanceType ( ) ; String deprecationInfo = getTypeDeprecationInfo ( instanceType ) ; if ( deprecationInfo == null ) { return ; } DiagnosticType message = deprecationInfo . isEmpty ( ) ? DEPRECATED_CLASS : DEPRECATED_CLASS_REASON ; compiler . report ( JSError . make ( n , message , instanceType . toString ( ) , deprecationInfo ) ) ; }
Reports deprecation issue with regard to a type usage .