Bug 16663 - Enum constants with Flags are not recognized
Summary: Enum constants with Flags are not recognized
Status: REOPENED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Debugger (show other bugs)
Version: unspecified
Hardware: PC Mac OS
: Normal normal
Target Milestone: master
Assignee: David Karlaš
URL:
Depends on:
Blocks:
 
Reported: 2013-12-08 09:33 UTC by Marek Safar
Modified: 2015-08-21 00:57 UTC (History)
3 users (show)

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


Attachments

Description Marek Safar 2013-12-08 09:33:07 UTC
using System;

class Test  {
	const AttributeTargets a1 = AttributeTargets.Assembly | AttributeTargets.Constructor;

	static void Main ()
	{
		const AttributeTargets a2 = AttributeTargets.Assembly | AttributeTargets.Constructor;
		return;
	}
}

Hover over a1 or a2.
Comment 1 Mike Krüger 2013-12-09 08:36:37 UTC
fixed
Comment 2 Ram Chandra 2014-03-27 09:47:25 UTC
I have checked this issue with latest master builds.

With the help of bug description, I observed that when I hover  over the "a1"  it shows the definition of variable "a1" i.e:

      "const AttributeTargets a1 = AttributeTargets.Assembly | AttributeTargets.Constructor;"

I tried same code with Visual studio and hover over the "a1" variable it shows "Assembly | Constructor", but in xamarin it shows the variable declaration again.


Screencast: http://www.screencast.com/t/3C1Zc0RBCuBc

Hence, I am Reopening  this issue.

Please let me know if I am missing something.

Environment :

Xamarin Studio
Version 4.2.4 (build 266)
Installation UUID: 6ea47b0d-1852-4aaf-808d-373ff0a5002b
Runtime:
	Mono 3.2.7 ((no/40f92d5)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 302070000

Xamarin.Android
Version: 4.12.1 (Trial Edition)
Android SDK: /Users/jatin66/Desktop/Backup/android-sdk-macosx
	Supported Android versions:
		1.6   (API level 4)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		3.2   (API level 13)
		4.0   (API level 14)
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.2   (API level 17)
		4.3   (API level 18)
		4.4   (API level 19)
Java SDK: /usr
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

Apple Developer Tools
Xcode 4.6.3 (2068)
Build 4H1503

Xamarin.Mac
Xamarin.Mac: 1.6.27

Xamarin.iOS
Version: 7.2.0.2 (Trial Edition)
Hash: 58c3efa
Branch: 
Build date: 2014-10-03 18:02:26-0400

Build Information
Release ID: 402040266
Git revision: 57fa6b7639703775ae1d5c46536e42ab424cb177
Build date: 2014-03-20 12:34:27-04
Xamarin addins: eee141c29724a19529e77b8e743086d95b29f5ba

Operating System
Mac OS X 10.7.5
Darwin Jatin66s-iMac.local 11.4.2 Darwin Kernel Version 11.4.2
    Thu Aug 23 16:25:48 PDT 2012
    root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64
Comment 3 Mike Krüger 2014-03-27 10:54:57 UTC
It's because of our different design of tooltips - they work as designed.
Comment 4 Ram Chandra 2014-03-27 11:24:41 UTC
As per "Comment 3" this is working as per design.

Hence, I am closing this issue.
Comment 5 Ram Chandra 2014-03-28 14:49:34 UTC
After spending some more time on this issue, I observed that when I hover  over the "a1" it shows the definition of variable "a1" i.e:

      "const AttributeTargets a1 = AttributeTargets.Assembly | AttributeTargets.Constructor;"

 but when I write the same code within "Main" method and remove the "const" keyword it shows the variable values like this "Assembly | Constructor".

I observed that there are output variations when I use same line of code with "const" keyword and without "const" keyword.

Hence, I am reopening this issue.

Screencast: http://www.screencast.com/t/rGgBd2jCOc1S

Please let me know if I am missing anything.

Environmet Info

Xamarin Studio
Version 4.2.4 (build 266)
Installation UUID: 6ea47b0d-1852-4aaf-808d-373ff0a5002b
Runtime:
	Mono 3.2.7 ((no/40f92d5)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 302070000

Xamarin.Android
Version: 4.12.1 (Trial Edition)
Android SDK: /Users/jatin66/Desktop/Backup/android-sdk-macosx
	Supported Android versions:
		1.6   (API level 4)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		3.2   (API level 13)
		4.0   (API level 14)
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.2   (API level 17)
		4.3   (API level 18)
		4.4   (API level 19)
Java SDK: /usr
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

Apple Developer Tools
Xcode 4.6.3 (2068)
Build 4H1503

Xamarin.Mac
Xamarin.Mac: 1.6.27

Xamarin.iOS
Version: 7.2.2.14 (Trial Edition)
Hash: 16bef0b
Branch: 
Build date: 2014-03-20 12:01:19-0400

Build Information
Release ID: 402040266
Git revision: 57fa6b7639703775ae1d5c46536e42ab424cb177
Build date: 2014-03-20 12:34:27-04
Xamarin addins: eee141c29724a19529e77b8e743086d95b29f5ba

Operating System
Mac OS X 10.7.5
Darwin Jatin66s-iMac.local 11.4.2 Darwin Kernel Version 11.4.2
    Thu Aug 23 16:25:48 PDT 2012
    root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64
Comment 6 Mike Krüger 2015-05-30 16:01:49 UTC
That's a debugger issue that may already be fixed.
This is not related to the original one anymore.

reassigning
Comment 7 David Karlaš 2015-08-21 00:57:47 UTC
The way .Net/VS is handling this is via const values stored in .pdb file since method const values are lost at compile time... Since this is not important bug and to avoid "wasting" time on implementing this in mcs.exe and in .mdb... I will revisit this bug once we switch to .ppdb/roslyn compiler.

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