google / google/closure-compiler

The typechecker doesn't know the type of 'this' when @override is used to override a method on a specific instance

Open
#1,394 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.7k
Forks
1.2k
Avg merge
2d 12h
Merged PRs (30d)
6

Description

https://closure-compiler-debugger.appspot.com/#input0%3Dclass%2520Example%2520%257B%250A%2520%2520foo()%2520%257B%257D%250A%257D%250A%250Avar%2520example%2520%253D%2520new%2520Example%253B%250A%250A%252F**%2520%2540override%2520*%252F%250Aexample.foo%2520%253D%2520function()%2520%257B%250A%2520%2520console.log(this)%253B%250A%257D%26input1%26conformanceConfig%3D%250Arequirement%253A%2520%257B%250A%2520%2520type%253A%2520CUSTOM%250A%2520%2520java_class%253A%2520'com.google.javascript.jscomp.ConformanceRules%2524BanUnknownThis'%250A%2520%2520error_message%253A%2520'BanUnknownThis'%250A%257D%26externs%26refasterjs-template%26includeDefaultExterns%3D1%26CHECK_SYMBOLS%3D1%26CHECK_TYPES%3D1%26LANG_IN_IS_ES6%3D1%26MISSING_PROPERTIES%3D1%26PRESERVE_TYPE_ANNOTATIONS%3D1%26PRETTY_PRINT%3D1%26TRANSPILE%3D1

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.