pdt icon indicating copy to clipboard operation
pdt copied to clipboard

codeassist erroneously thinks Throwable::getMessage() returns void. it returns string

Open divinity76 opened this issue 3 years ago • 0 comments

Describe the bug codeassist erroneously thinks Throwable::getMessage() returns void. it returns string

Describe the eclipse environment Eclipse Version: 2021-09 (4.21.0) Build id: 20210910-1417 PDT version 7.2.0.202005271851

Describe your system

  • OS: Xubuntu Linux 20.04
  • Version (?? do you mean Eclipse version or OS version? 20.04 kernel 5.4.0-88-generic x86_64)

To Reproduce Steps to reproduce the behavior: 1: open a php file and write

<?php (new Throwable())->getMessage();

then go to the M and press ctrl+shift+space

Expected behavior code assist should inform us that getMessage() returns string. instead it says void.

Screenshots

Additional context

just checked the code generating the typehints, and my first thought was https://stackoverflow.com/a/1732454/1067003

  • ideally that code should get some DOMDocument + DOMXPath() treatment.. i might do it myself one of these days

divinity76 avatar Nov 17 '21 22:11 divinity76