Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Exception compiling iterator of tuples #14888

Closed
HaloFour opened this issue Nov 2, 2016 · 1 comment
Closed

Bug: Exception compiling iterator of tuples #14888

HaloFour opened this issue Nov 2, 2016 · 1 comment
Assignees
Labels
Area-Compilers Bug New Language Feature - Tuples Tuples Resolution-Fixed The bug has been fixed and/or the requested behavior has been implemented
Milestone

Comments

@HaloFour
Copy link

HaloFour commented Nov 2, 2016

Version Used: http://tryroslyn.azurewebsites.net/ (master Oct 29 2016)

Steps to Reproduce:

using System;
using System.Collections.Generic;

public class C {
    public IEnumerable<(int, int)> entries() {
        yield return (1, 2);
    }
}

Expected Behavior:

Compiles successfully.

Actual Behavior:

Unexpected value 'NoConversion' of type 'Microsoft.CodeAnalysis.CSharp.ConversionKind'
   at Microsoft.CodeAnalysis.CSharp.CodeGen.CodeGenerator.EmitConversion(BoundConversion conversion) in D:\#TeamCity\buildAgent\work\596e688e8f7f38c8\!roslyn\dotnet\Src\Compilers\CSharp\Portable\CodeGen\EmitConversion.cs:line 117
   at Microsoft.CodeAnalysis.CSharp.CodeGen.CodeGenerator.EmitConversionExpression(BoundConversion conversion, Boolean used) in D:\#TeamCity\buildAgent\work\596e688e8f7f38c8\!roslyn\dotnet\Src\Compilers\CSharp\Portable\CodeGen\EmitConversion.cs:line 34
   at Microsoft.CodeAnalysis.CSharp.CodeGen.CodeGenerator.EmitExpressionCore(BoundExpression expression, Boolean used) in D:\#TeamCity\buildAgent\work\596e688e8f7f38c8\!roslyn\dotnet\Src\Compilers\CSharp\Portable\CodeGen\EmitExpression.cs:line 112
   at Microsoft.CodeAnalysis.CSharp.CodeGen.CodeGenerator.EmitExpressionCoreWithStackGuard(BoundExpression expression, Boolean used) in D:\#TeamCity\buildAgent\work\596e688e8f7f38c8\!roslyn\dotnet\Src\Compilers\CSharp\Portable\CodeGen\EmitExpression.cs:line 72
   at Microsoft.CodeAnalysis.CSharp.CodeGen.CodeGenerator.EmitExpression(BoundExpression expression, Boolean used) in D:\#TeamCity\buildAgent\work\596e688e8f7f38c8\!roslyn\dotnet\Src\Compilers\CSharp\Portable\CodeGen\EmitExpression.cs:line 60
   at Microsoft.CodeAnalysis.CSharp.CodeGen.CodeGenerator.EmitReturnStatement(BoundReturnStatement boundReturnStatement) in D:\#TeamCity\buildAgent\work\596e688e8f7f38c8\!roslyn\dotnet\Src\Compilers\CSharp\Portable\CodeGen\EmitStatement.cs:line 684
   at Microsoft.CodeAnalysis.CSharp.CodeGen.CodeGenerator.EmitStatement(BoundStatement statement) in D:\#TeamCity\buildAgent\work\596e688e8f7f38c8\!roslyn\dotnet\Src\Compilers\CSharp\Portable\CodeGen\EmitStatement.cs:line 44
   at Microsoft.CodeAnalysis.CSharp.CodeGen.CodeGenerator.EmitBlock(BoundBlock block) in D:\#TeamCity\buildAgent\work\596e688e8f7f38c8\!roslyn\dotnet\Src\Compilers\CSharp\Portable\CodeGen\EmitStatement.cs:line 614
   at Microsoft.CodeAnalysis.CSharp.CodeGen.CodeGenerator.EmitStatement(BoundStatement statement) in D:\#TeamCity\buildAgent\work\596e688e8f7f38c8\!roslyn\dotnet\Src\Compilers\CSharp\Portable\CodeGen\EmitStatement.cs:line 24
   at Microsoft.CodeAnalysis.CSharp.CodeGen.CodeGenerator.GenerateImpl() in D:\#TeamCity\buildAgent\work\596e688e8f7f38c8\!roslyn\dotnet\Src\Compilers\CSharp\Portable\CodeGen\CodeGenerator.cs:line 248
   at Microsoft.CodeAnalysis.CSharp.CodeGen.CodeGenerator.Generate() in D:\#TeamCity\buildAgent\work\596e688e8f7f38c8\!roslyn\dotnet\Src\Compilers\CSharp\Portable\CodeGen\CodeGenerator.cs:line 183
   at Microsoft.CodeAnalysis.CSharp.MethodCompiler.GenerateMethodBody(PEModuleBuilder moduleBuilder, MethodSymbol method, Int32 methodOrdinal, BoundStatement block, ImmutableArray`1 lambdaDebugInfo, ImmutableArray`1 closureDebugInfo, StateMachineTypeSymbol stateMachineTypeOpt, VariableSlotAllocator variableSlotAllocatorOpt, DiagnosticBag diagnostics, DebugDocumentProvider debugDocumentProvider, ImportChain importChainOpt, Boolean emittingPdb, ImmutableArray`1 dynamicAnalysisSpans) in D:\#TeamCity\buildAgent\work\596e688e8f7f38c8\!roslyn\dotnet\Src\Compilers\CSharp\Portable\Compiler\MethodCompiler.cs:line 1311
   at Microsoft.CodeAnalysis.CSharp.MethodCompiler.CompileSynthesizedMethods(TypeCompilationState compilationState) in D:\#TeamCity\buildAgent\work\596e688e8f7f38c8\!roslyn\dotnet\Src\Compilers\CSharp\Portable\Compiler\MethodCompiler.cs:line 631
   at Microsoft.CodeAnalysis.CSharp.MethodCompiler.CompileNamedType(NamedTypeSymbol containingType) in D:\#TeamCity\buildAgent\work\596e688e8f7f38c8\!roslyn\dotnet\Src\Compilers\CSharp\Portable\Compiler\MethodCompiler.cs:line 537
   at Microsoft.CodeAnalysis.CSharp.MethodCompiler.<>c__DisplayClass20_0.<CompileNamedTypeAsTask>b__0() in D:\#TeamCity\buildAgent\work\596e688e8f7f38c8\!roslyn\dotnet\Src\Compilers\CSharp\Portable\Compiler\MethodCompiler.cs:line 323
   at Roslyn.Utilities.UICultureUtilities.<>c__DisplayClass5_0.<WithCurrentUICulture>b__0() in D:\#TeamCity\buildAgent\work\596e688e8f7f38c8\!roslyn\dotnet\Src\Compilers\Core\Portable\InternalUtilities\UICultureUtilities.cs:line 136
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at Microsoft.CodeAnalysis.CSharp.MethodCompiler.WaitForWorkers() in D:\#TeamCity\buildAgent\work\596e688e8f7f38c8\!roslyn\dotnet\Src\Compilers\CSharp\Portable\Compiler\MethodCompiler.cs:line 238
   at Microsoft.CodeAnalysis.CSharp.MethodCompiler.CompileMethodBodies(CSharpCompilation compilation, PEModuleBuilder moduleBeingBuiltOpt, Boolean generateDebugInfo, Boolean hasDeclarationErrors, DiagnosticBag diagnostics, Predicate`1 filterOpt, CancellationToken cancellationToken) in D:\#TeamCity\buildAgent\work\596e688e8f7f38c8\!roslyn\dotnet\Src\Compilers\CSharp\Portable\Compiler\MethodCompiler.cs:line 137
   at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.CompileMethods(CommonPEModuleBuilder moduleBuilder, Boolean emittingPdb, DiagnosticBag diagnostics, Predicate`1 filterOpt, CancellationToken cancellationToken) in D:\#TeamCity\buildAgent\work\596e688e8f7f38c8\!roslyn\dotnet\Src\Compilers\CSharp\Portable\Compilation\CSharpCompilation.cs:line 2335
   at Microsoft.CodeAnalysis.Compilation.Emit(Stream peStream, Stream pdbStream, Stream xmlDocumentationStream, Stream win32Resources, IEnumerable`1 manifestResources, EmitOptions options, IMethodSymbol debugEntryPoint, Stream sourceLinkStream, IEnumerable`1 embeddedTexts, CompilationTestData testData, CancellationToken cancellationToken) in D:\#TeamCity\buildAgent\work\596e688e8f7f38c8\!roslyn\dotnet\Src\Compilers\Core\Portable\Compilation\Compilation.cs:line 2016
   at Microsoft.CodeAnalysis.Compilation.Emit(Stream peStream, Stream pdbStream, Stream xmlDocumentationStream, Stream win32Resources, IEnumerable`1 manifestResources, EmitOptions options, IMethodSymbol debugEntryPoint, Stream sourceLinkStream, IEnumerable`1 embeddedTexts, CancellationToken cancellationToken) in D:\#TeamCity\buildAgent\work\596e688e8f7f38c8\!roslyn\dotnet\Src\Compilers\Core\Portable\Compilation\Compilation.cs:line 1964
   at TryRoslyn.Core.Processing.CodeProcessor.Process(String code, ProcessingOptions options) in D:\#TeamCity\buildAgent\work\596e688e8f7f38c8\!sites\dotnet-master\Core\Processing\CodeProcessor.cs:line 44
   at TryRoslyn.Web.Api.Controllers.RoslynController.Compilation(CompilationArguments arguments) in D:\#TeamCity\buildAgent\work\596e688e8f7f38c8\!sites\dotnet-master\Web.Api\Controllers\RoslynController.cs:line 18
   at lambda_method(Closure , Object , Object[] )
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Tracing.ITraceWriterExtensions.<TraceBeginEndAsyncCore>d__18`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Tracing.ITraceWriterExtensions.<TraceBeginEndAsyncCore>d__18`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Tracing.Tracers.HttpControllerTracer.<ExecuteAsyncCore>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Tracing.ITraceWriterExtensions.<TraceBeginEndAsyncCore>d__18`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()
@AlekseyTs
Copy link
Contributor

It looks like the issue has been already addressed by #15048

AlekseyTs added a commit to AlekseyTs/roslyn that referenced this issue Nov 8, 2016
… referenced in source.

Also add regression test for dotnet#14888. Closes dotnet#14888.
@AlekseyTs AlekseyTs added the Resolution-Fixed The bug has been fixed and/or the requested behavior has been implemented label Nov 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Bug New Language Feature - Tuples Tuples Resolution-Fixed The bug has been fixed and/or the requested behavior has been implemented
Projects
None yet
Development

No branches or pull requests

3 participants