Note: This website is archived. For up-to-date information about D projects and development, please visit wiki.dlang.org.

Ticket #121 (new defect)

Opened 11 years ago

Last modified 10 years ago

anonymous untyped enum values lack ddoc in hint

Reported by: Extrawurst Assigned to:
Priority: major Component: descent.astview
Version: Keywords:
Cc:

Description

enum {
 ///ddoc
 FOO,
 ///ddoc
 BAR
}

auto a = FOO;

hovering FOO doesnt show the ddoc. if u give the enum a type "enum : long{" it works again. I am talking about Descent switched D1.x setting on. Under D2.x enums hints are broken anyway ;)

Attachments

ddoc2.png (30.7 kB) - added by Vladimir on 10/04/08 20:00:31.
ddoc3.png (30.7 kB) - added by Vladimir on 10/04/08 20:00:49.

Change History

10/02/08 13:43:43 changed by Vladimir

In my installation (nightly build 0.5.3.20080925) there is no difference whether the enum is anonymous/named/typed or not

enum {
	/// no ddoc in case1
	case1,
	
	/**
	 * no ddoc in case2
	 */ 
	case2,

	case3, /// ok in case3
	
	/// shows both
	case4, /// sections in case 4
}

10/03/08 11:26:00 changed by asterite

Fixed in 0.5.3.20081003. Can you verify this?

10/03/08 14:38:51 changed by Vladimir

/// if ddoc declared here, sometimes everything inside method shows that ddoc
void test() {
	/**
	 * testing enum: no ddoc
	 */
	enum TYPE {
		/// sometimes it shows 'testing enum', sometimes nothing
		case1,

		/**
		 * sometimes it works ok
		 */ 
		case2,

		case3, /// the same in case3

		/// and here
		case4, /// as well
	}
	
	auto a = TYPE.case1;
}

10/03/08 15:37:08 changed by asterite

10/04/08 14:51:06 changed by asterite

Fixed this new stuff in 0.5.3.20081004. Can you verify this?

10/04/08 20:00:09 changed by Vladimir

Still does not work sometimes. See attachments ddoc1.png and ddoc2.png. Note contents of Outline view.

10/04/08 20:00:31 changed by Vladimir

  • attachment ddoc2.png added.

10/04/08 20:00:49 changed by Vladimir

  • attachment ddoc3.png added.

01/30/09 10:52:00 changed by Vladimir

It seem to work in version 0.5.4, except this case:

1. create new module

2. paste this code:

enum TYPE {
	/// ddoc for case1
	case1
}

void test() {
	
	auto a = TYPE;
}

3. type . after 'auto a = TYPE'. Note there is no ddoc associated with 'case1'

4. now press Escape and Ctrl+Space. Ddoc now appears