@@ -1386,30 +1386,12 @@ pub enum AnalyzerError {
13861386
13871387 #[ diagnostic(
13881388 severity( Error ) ,
1389- code( unresolvable_generic_argument ) ,
1389+ code( unresolvable_generic_expression ) ,
13901390 help( "" ) ,
13911391 url( "https://doc.veryl-lang.org/book/07_appendix/02_semantic_error.html#{}" , self . code( ) . unwrap( ) )
13921392 ) ]
13931393 #[ error( "\" {identifier}\" can't be resolved from the definition of generics" ) ]
1394- UnresolvableGenericArgument {
1395- identifier : String ,
1396- #[ source_code]
1397- input : MultiSources ,
1398- #[ label( "Error location" ) ]
1399- error_location : SourceSpan ,
1400- #[ label( "Definition" ) ]
1401- definition_location : SourceSpan ,
1402- token_source : TokenSource ,
1403- } ,
1404-
1405- #[ diagnostic(
1406- severity( Error ) ,
1407- code( unresolvable_generic_reference) ,
1408- help( "" ) ,
1409- url( "" )
1410- ) ]
1411- #[ error( "\" {identifier}\" can't be resolved from the definition of generics" ) ]
1412- UnresolvableGenericReference {
1394+ UnresolvableGenericExpression {
14131395 identifier : String ,
14141396 #[ source_code]
14151397 input : MultiSources ,
@@ -1629,8 +1611,7 @@ impl AnalyzerError {
16291611 AnalyzerError :: UnknownParam { token_source, .. } => * token_source,
16301612 AnalyzerError :: UnknownPort { token_source, .. } => * token_source,
16311613 AnalyzerError :: UnknownUnsafe { token_source, .. } => * token_source,
1632- AnalyzerError :: UnresolvableGenericArgument { token_source, .. } => * token_source,
1633- AnalyzerError :: UnresolvableGenericReference { token_source, .. } => * token_source,
1614+ AnalyzerError :: UnresolvableGenericExpression { token_source, .. } => * token_source,
16341615 AnalyzerError :: UnsignedLoopVariableInDescendingOrderForLoop {
16351616 token_source, ..
16361617 } => * token_source,
@@ -2397,25 +2378,12 @@ impl AnalyzerError {
23972378 token_source : token. source ( ) ,
23982379 }
23992380 }
2400- pub fn unresolvable_generic_argument (
2401- identifier : & str ,
2402- token : & TokenRange ,
2403- definition_token : & TokenRange ,
2404- ) -> Self {
2405- AnalyzerError :: UnresolvableGenericArgument {
2406- identifier : identifier. to_string ( ) ,
2407- input : source ( token) ,
2408- error_location : token. into ( ) ,
2409- definition_location : definition_token. into ( ) ,
2410- token_source : token. source ( ) ,
2411- }
2412- }
2413- pub fn unresolvable_generic_reference (
2381+ pub fn unresolvable_generic_expression (
24142382 identifier : & str ,
24152383 token : & TokenRange ,
24162384 definition_token : & TokenRange ,
24172385 ) -> Self {
2418- AnalyzerError :: UnresolvableGenericReference {
2386+ AnalyzerError :: UnresolvableGenericExpression {
24192387 identifier : identifier. to_string ( ) ,
24202388 input : source ( token) ,
24212389 error_location : token. into ( ) ,
0 commit comments