This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
The end offset in AST for namespaces limited with curly braces is wrong if they are not immediately followed with a declaration of another namespace, e.g: namespace test { function function_name() { } } echo 1; // this is still within the block scope
batch reassigning
I voted for this issue since the only way to combine global non-namespaced code with namespaced code id to use bracketed syntax. See http://www.php.net/manual/en/language.namespaces.definitionmultiple.php When working with legacy code this will be common case.
This is here from beginning. The grammar for the parser doesn't work correctly here and I'm afraid that fixing this before code freeze is a little danger.
There are two things, which are here mixed together. The firs one is PHP Documentor syntax where @var is used as tag to document the data type of class variables. So NetBeans expects the PHP Documentor style /** @var */ for class variables. The @var tag is bold, because it's tag defined in the spec. You can write /** and hit enter before such class varible and the skeleton of php doc is generated. The second think is /* @var .... */ doesn't have nothing with PHP Documentor. It helps to recognized type of variable (not class one), when NetBeans can not resolve the type. It's not according a specification, it's a "deal" between user and the IDE. Unfortunately both cases use @var tag and this can be misleading.
Fixed in web-main: http://hg.netbeans.org/web-main/rev/9354236a32ab
Integrated into 'main-golden', will be available in build *201203240400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/9354236a32ab User: Ondrej Brejla <obrejla@netbeans.org> Log: #170712 - Wrong offsets in AST for namespaces limited with curly braces