Bug 13606 - Consecutive + operators yield unexpected results
Summary: Consecutive + operators yield unexpected results
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Web (show other bugs)
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-07-30 09:56 UTC by Michael Lovett
Modified: 2013-07-30 10:12 UTC (History)
2 users (show)

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


Attachments

Description Michael Lovett 2013-07-30 09:56:44 UTC
In an aspx.cs page (ASP.NET) we had several erroneous statement such as the following, which contain multiple consecutive + operators. We would have expected this to have generated some sort of "syntax error" (which would have led us to examine the bad code) but instead we got "Cannot read from a closed StreamReader".


 cell.Text = dataAccess.GetTranslatedUILabel("BFOM_RD_FILTERED") + 
             + "<br>" + 
            SageMath.MakePercentString((filteredRespondentCount / (double)totalRespondentCount) * 100);




Error details:

Server Error in '/blink2_m120326cn' Application
Cannot read from a closed StreamReader

Description: HTTP 500. Error processing request.

Stack Trace:

System.ObjectDisposedException: Cannot read from a closed StreamReader
  at System.IO.StreamReader.ReadToEnd () [0x00000] in <filename unknown>:0 
  at System.Web.Compilation.AspParser..ctor (System.String filename, System.IO.TextReader input) [0x00000] in <filename unknown>:0 
  at System.Web.Compilation.AspGenerator.InitParser (System.IO.TextReader reader, System.String filename) [0x00000] in <filename unknown>:0 
  at System.Web.Compilation.AspGenerator.Parse (System.IO.TextReader reader, System.String filename, Boolean doInitParser) [0x00000] in <filename unknown>:0 
  at System.Web.Compilation.GenericBuildProvider`1[System.Web.UI.TemplateParser].Parse () [0x00000] in <filename unknown>:0 
  at System.Web.Compilation.GenericBuildProvider`1[System.Web.UI.TemplateParser].GenerateCode () [0x00000] in <filename unknown>:0 
  at System.Web.Compilation.GenericBuildProvider`1[System.Web.UI.TemplateParser].GenerateCode (System.Web.Compilation.AssemblyBuilder assemblyBuilder) [0x00000] in <filename unknown>:0 
  at System.Web.Compilation.BuildManager.GenerateAssembly (System.Web.Compilation.AssemblyBuilder abuilder, System.Web.Compilation.BuildProviderGroup group, System.Web.VirtualPath vp, Boolean debug) [0x00000] in <filename unknown>:0 

Version information: Mono Runtime Version: 2.10.8.1 (Debian 2.10.8.1-1~dhx1~lucid1); ASP.NET Version: 2.0.50727.1433

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