** * Check if the given class-declaration extends null then return true. * Otherwise, return false * @param classDecl a class declaration to check if it extends null */
(classDecl *ast.Node)
| 12247 | * @param classDecl a class declaration to check if it extends null |
| 12248 | */ |
| 12249 | func (c *Checker) classDeclarationExtendsNull(classDecl *ast.Node) bool { |
| 12250 | classSymbol := c.getSymbolOfDeclaration(classDecl) |
| 12251 | classInstanceType := c.getDeclaredTypeOfSymbol(classSymbol) |
| 12252 | baseConstructorType := c.getBaseConstructorTypeOfClass(classInstanceType) |
| 12253 | return baseConstructorType == c.nullWideningType |
| 12254 | } |
| 12255 | |
| 12256 | func (c *Checker) checkAssertion(node *ast.Node, checkMode CheckMode) *Type { |
| 12257 | if node.Kind == ast.KindTypeAssertionExpression { |
no test coverage detected