the-liquid-metal opened a new issue, #6040:
URL: https://github.com/apache/netbeans/issues/6040
### Apache NetBeans version
Apache NetBeans 18
### What happened
Mismatch between default value and property type must produce error.
### How to reproduce
```php
<?php
declare(strict_types=1);
class MyClass {
public int $propInt1 = 10; // OK
public int $propInt2 = 10.1; // this statement must
display error
public int $propInt3 = "foo"; // this statement must
display error
public int $propInt4 = false; // this statement must
display error
public int $propInt5 = null; // this statement must
display error
public int $propInt6 = [10, "foo", false]; // this statement must
display error
public float $propFloat1 = 10; // OK
public float $propFloat2 = 10.1; // OK
public float $propFloat3 = "foo"; // this statement must
display error
public float $propFloat4 = false; // this statement must
display error
public float $propFloat5 = null; // this statement must
display error
public float $propFloat6 = [10, "foo", false]; // this statement must
display error
public string $propString1 = 10; // this statement must
display error
public string $propString2 = 10.1; // this statement must
display error
public string $propString3 = "foo"; // OK
public string $propString4 = false; // this statement must
display error
public string $propString5 = null; // this statement must
display error
public string $propString6 = [10, "foo", false]; // this statement must
display error
public bool $propBool1 = 10; // this statement must
display error
public bool $propBool2 = 10.1; // this statement must
display error
public bool $propBool3 = "foo"; // this statement must
display error
public bool $propBool4 = false; // OK
public bool $propBool5 = null; // this statement must
display error
public bool $propBool6 = [10, "foo", false]; // this statement must
display error
public array $propArray1 = 10; // this statement must
display error
public array $propArray2 = 10.1; // this statement must
display error
public array $propArray3 = "foo"; // this statement must
display error
public array $propArray4 = false; // this statement must
display error
public array $propArray5 = null; // this statement must
display error
public array $propArray6 = [10, "foo", false]; // OK
public object $propObject1 = 10; // this statement must
display error
public object $propObject2 = 10.1; // this statement must
display error
public object $propObject3 = "foo"; // this statement must
display error
public object $propObject4 = false; // this statement must
display error
public object $propObject5 = null; // this statement must
display error
public object $propObject6 = [10, "foo", false]; // this statement must
display error
}
```
### Did this work correctly in an earlier version?
No / Don't know
### Operating System
Windows 10
### JDK
Java: 14.0.1; Java HotSpot(TM) 64-Bit Server VM 14.0.1+7 Runtime: Java(TM)
SE Runtime Environment 14.0.1+7
### Apache NetBeans packaging
Apache NetBeans binary zip
### Anything else
_No response_
### Are you willing to submit a pull request?
No
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists