Add validation of implicit `infers` usage
See original GitHub issueWe already validate incorrect explicit usage of returns
and infers
in #438 – we should validate implicit usage too.
For example, a Definition
rule can be defined without a return type, what implicitly means Definition infers Definition
.
Definition:
'def' name=ID ('(' args+=DeclaredParameter (',' args+=DeclaredParameter)* ')')? ':' expr=Expression ';';
If now interface Definition
will be declared, we should validate, that the Definition
rule has the return type Definition
as Definition returns Definition
.
Definition returns Definition: ...;
interface Definition {
name: string
expr: Expression
args: DeclaredParameter[]
}
Depends on #440.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Dealing with validation problems - Gradle User Manual
Invalid use of cacheable annotation. This error indicates that you have annotated a type with @CacheableTransform on something that is not an artifact...
Read more >Validation - Laravel - The PHP Framework For Web Artisans
To do this, we will use the validate method provided by the Illuminate\Http\Request object.
Read more >Can the Implicit Association Test Measure Automatic ...
Does the IAT measure automatic judgment that typical self-report measures do not measure? In this commentary, we argue that although Schimmack's ...
Read more >Creating multiple validators for the same constraint - LogicBig
Following example shows how to create multiple validators (multiple implementations of ConstraintValidators ) for the same constraint.
Read more >Error Explanations for The W3C Markup Validation Service
One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@montymxb I believed this behavior was already added by https://github.com/langium/langium/pull/461. But I agree having a quick fix for this would be great!
We need to fix scoping anyways, currently in your example
returns Definition
will link to Parser ruleDefinition
😃