Bug 41602

Summary: Compiler fails to recognize Indexer
Product: [Mono] Compilers Reporter: Jonathan Chambers <joncham>
Component: C#Assignee: Marek Safar <masafa>
Severity: normal CC: joncham, mono-bugs+mono
Priority: ---    
Version: 4.5.X   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Tags: Is this bug a regression?: Yes
Last known good build: Mono 2.6 ;-)
Attachments: Compiler Test Case

Description Jonathan Chambers 2016-06-08 15:15:51 UTC
Created attachment 16232 [details]
Compiler Test Case

Compiler fails to compile code using custom indexer. .Net (csc) compiles this code fine.

Open attached project and try to build:

csc Program.cs -r:IndexerTest.dll
// works correctly

mcs Program.cs -r:IndexerTest.dll
Program.cs(10,23): error CS0021: Cannot apply indexing with [] to an expression of type `TypeWithIndexer'
Compilation failed: 1 error(s), 0 warnings
Comment 1 Marek Safar 2016-06-09 13:06:51 UTC
Fixed in master and 4.5.1