mesour-intellij-plugins / latte-pro-issues

2 stars 0 forks source link

Absolute ignoring of code context #172

Open hladpe opened 4 months ago

hladpe commented 4 months ago

Bug Description The context of the code is absolutely ignored, especially in relation to processing variables based on previous conditions. Some conditions prevent the occurrence of a problem, which the plugin will subsequently warn about anyway (for example, work with a nullable type). Due to the price of the license, it is necessary to teach the plugin to sense the context and position in the code.

Environment:

To Reproduce

  1. Open latte file
  2. Write a similar code structure as I show in the section below.
  3. See error

Code

{varType ?string $name}

{if $name !== null}
    Hello: {$name}!
{/if}

Screenshots Screenshot

Additional context It doesn't matter what data type is defined for the variable. It is repeated both with scalar types and with object instances, simply anywhere.

mabar commented 4 months ago

Duplicate, #145 This is planned to be implemented in a near future