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.

Bug 270368 - AssertionError: class org.netbeans.modules.php.editor.parser.astnodes.NullableType
Summary: AssertionError: class org.netbeans.modules.php.editor.parser.astnodes.Nullabl...
Status: RESOLVED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: Dev
Hardware: All All
: P3 normal (vote)
Assignee: junichi11
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-11 17:25 UTC by CarusoGabriel
Modified: 2017-04-13 01:43 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 228638


Attachments
stacktrace (5.47 KB, text/plain)
2017-04-11 17:25 UTC, CarusoGabriel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description CarusoGabriel 2017-04-11 17:25:28 UTC
Build: NetBeans IDE Dev (Build 201704100002)
VM: OpenJDK 64-Bit Server VM, 25.121-b13, OpenJDK Runtime Environment, 1.8.0_121-8u121-b13-0ubuntu1.16.10.2-b13
OS: Linux

User Comments:
GUEST: Just editing some php files

GUEST: Added nullable string type to construct parameter

carusogabriel: Just putting a ? before an array type parameter




Stacktrace: 
java.lang.AssertionError: class org.netbeans.modules.php.editor.parser.astnodes.NullableType
   at org.netbeans.modules.php.editor.CodeUtils.extractQualifiedName(CodeUtils.java:270)
   at org.netbeans.modules.php.editor.verification.InitializeFieldSuggestion$FieldDeclarationInitializer.<init>(InitializeFieldSuggestion.java:303)
   at org.netbeans.modules.php.editor.verification.InitializeFieldSuggestion$ConstructorVisitor.createParametersToInit(InitializeFieldSuggestion.java:214)
   at org.netbeans.modules.php.editor.verification.InitializeFieldSuggestion$ConstructorVisitor.createHints(InitializeFieldSuggestion.java:199)
   at org.netbeans.modules.php.editor.verification.InitializeFieldSuggestion$ConstructorVisitor.visit(InitializeFieldSuggestion.java:194)
   at org.netbeans.modules.php.editor.parser.astnodes.MethodDeclaration.accept(MethodDeclaration.java:77)
Comment 1 CarusoGabriel 2017-04-11 17:25:31 UTC
Created attachment 164085 [details]
stacktrace
Comment 2 junichi11 2017-04-12 00:21:14 UTC
Thanks for reporting.

Reproducible code:
<?php
class MyClass {

    function __construct(?string $test) {
        
    }
}
Comment 3 junichi11 2017-04-12 02:59:42 UTC
Fixed. Sorry for the inconvenience.

http://hg.netbeans.org/web-main/rev/46bf5444aa91

Thanks.
Comment 4 Quality Engineering 2017-04-13 01:43:33 UTC
Integrated into 'main-silver', will be available in build *201704130002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/46bf5444aa91
User: Junichi Yamamoto <junichi11@netbeans.org>
Log: #270368 - AssertionError: class org.netbeans.modules.php.editor.parser.astnodes.NullableType