Bug 6292 - [PARSER] The compiler tells unexpected symbol when calling method F(bool a, bool b)
Summary: [PARSER] The compiler tells unexpected symbol when calling method F(bool a, b...
Status: NEW
Alias: None
Product: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: unspecified
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Marek Safar
URL:
: 60471 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-07-26 01:57 UTC by Minh Cat VO
Modified: 2017-11-01 14:30 UTC (History)
3 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description Minh Cat VO 2012-07-26 01:57:23 UTC
For example, I declared a method 

bool F (bool a, bool b) { return 1;} 

public static void Main(string[] args) 
{
 int a = 1;
 int b = 1;
 int c = 1;
 F(a < b, b > c);  // Error: Unexpected symbol 'c'. 
}

I think the compiler get errors when parsing "b, b" the between '<' '>', maybe it refers to generic.
Comment 1 Marek Safar 2013-03-22 09:36:10 UTC
I don't think we can fix this with jay because we need to tokenize variable_type using different rules (tokenize <,> always as generic OP_GENERICS_* only) and we cannot flag this context using jay. If that was possible we can then could disambiguate using C# rules from 7.6.4.2 Grammar ambiguities
Comment 2 Marek Safar 2017-11-01 14:30:35 UTC
*** Bug 60471 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.