Quantcast
Channel: YouTrackReSharper (RSRP) - Bug and Issue Tracker
Viewing all articles
Browse latest Browse all 106942

RSRP-29095: 'error CS0029: Cannot implicitly convert...' is not detected

$
0
0
Reporter Vladimir Reshetnikov (nikov) Vladimir Reshetnikov (nikov)
Created Sep 27, 2006 2:28:26 PM
Updated Apr 14, 2012 6:01:54 AM
Priority Normal
Type Bug
Fix versions Mirabile Futurum
State Open
Assignee Evgeny Pasynkov (pasynkov)
Subsystem Code Analysis
Affected versions No Affected versions
Fixed in build No Fixed in build
ReSharper cannot detect the following errors:

using System;
class A
{
    static void Main()
    {
        new TypedReference().GetType(); // error CS0029: Cannot implicitly convert type 'System.TypedReference' to 'object'
        new TypedReference().ToString(); // error CS0029: Cannot implicitly convert type 'System.TypedReference' to 'System.ValueType'
    }
}


ECMA-335 (CLI)

8.2.4 Boxing and unboxing of values

A type is
boxable if it is one of the following:
• A value type (including instantiations of generic value types) that does not contain fields that can point into
the CIL evaluation stack
[Rationale: A value type that does contain such fields cannot be boxed, else those embedded pointers
could outlive the entries in the CIL evaluation stack to which they point; e.g.,
System.RuntimeArgumentHandle, System.TypedReference. Value types that contain such pointers are
informally described as "byref-like" value types. end rationale]

Viewing all articles
Browse latest Browse all 106942

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>