Bug(?)在迭代器方法中的Contract.Requires会导致FatalExecutionEngineError [英] Bug(?) Contract.Requires in iterator method causes FatalExecutionEngineError

查看:80
本文介绍了Bug(?)在迭代器方法中的Contract.Requires会导致FatalExecutionEngineError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我认为重写器处理迭代器的方式可能存在错误。

I think there may be a bug in how rewriter handles iterators.

我有一个带有两个迭代器的迭代器嵌套的foreach循环有一个Contract.Requires< ArgumentNullExcpetion>(param1!= null)签入一个方法体。

I have an iterator with two nested foreach loops which has a Contract.Requires<ArgumentNullExcpetion>(param1 != null) check in a method body.

当我运行代码时,我会立即得到FatalExecutionEngineError异常尝试在迭代器上调用.MoveNext()。

When I run the code I'm getting FatalExecutionEngineError exception as soon as I try to call .MoveNext() on iterator.

当我注释掉契约代码或将嵌套的foreach循环更改为for循环时,bug就消失了。

The bug goes away when I comment out Contract code or change nested foreach loop to a for loop.

我更详细地描述了这个错误(带代码)这里是
(在帖子的底部)

I described this error in more details (with code) here (at the bottom of the post) .

推荐答案

感谢报告tihs。现已推出的新版本1.4.30629.0应解决此问题。

Thanks for reporting tihs. The new release 1.4.30629.0 which is now out should fix this problem.

 


这篇关于Bug(?)在迭代器方法中的Contract.Requires会导致FatalExecutionEngineError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆