You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Generified method call shows "cannot convert from Object to boolean" error #4211
Type mismatch: cannot convert from Object to boolean Java(16777233)
Environment:
(VS Codium - SSH remote development)
Version: 1.95.3
Release: 24321
Commit: dc5a551c256719475d2d0959270e3836c9bbb632
Date: 2024-11-16T09:16:49.983Z
Electron: 32.2.5
ElectronBuildId: undefined
Chromium: 128.0.6613.186
Node.js: 20.18.0
V8: 12.8.374.38-electron.0
OS: Windows_NT x64 10.0.19045
JDK: 17
Steps to reproduce
publicclassTest {
public <T> TsomeMethod() {
return (T) Boolean.TRUE;
}
publicvoidsomeOtherMethod() {
if (this.someMethod()) { // Type mismatch: cannot convert from Object to boolean Java(16777233)
}
}
}
Current Result
The following compilation error is shown in vs-codium: Type mismatch: cannot convert from Object to boolean Java(16777233)
The error is not seen if the result of this.someMethod() is stored in a Boolean var first
Activity