Issue 9312 - With statement diagnostic is wrong #1479

Merged
merged 1 commit into from Jan 14, 2013

Conversation

Projects
None yet
2 participants
@ghost

ghost commented Jan 13, 2013

http://d.puremagic.com/issues/show_bug.cgi?id=9312

It only lists class and struct instances as possible expressions, but there are many more: class and struct types, template instances, enumerations, modules, etc. To avoid listing all possible types it's best to just state the type which can't be used.

@ghost ghost closed this Jan 13, 2013

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Jan 13, 2013

You know it can actually be many things: class instance, struct instance, class or struct type, enumeration type, template instance, module declaration.

I think it might be simpler if we just said with expression cannot be of type xyz.

ghost commented Jan 13, 2013

You know it can actually be many things: class instance, struct instance, class or struct type, enumeration type, template instance, module declaration.

I think it might be simpler if we just said with expression cannot be of type xyz.

@ghost ghost reopened this Jan 13, 2013

@9rnsr

This comment has been minimized.

Show comment
Hide comment
@9rnsr

9rnsr Jan 14, 2013

Member

I think we can summarize the set of class, struct, union, and interface to 'aggregate'.
How about with expressions must be aggregate objects, not xxx?

Member

9rnsr commented Jan 14, 2013

I think we can summarize the set of class, struct, union, and interface to 'aggregate'.
How about with expressions must be aggregate objects, not xxx?

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Jan 14, 2013

@9rnsr: Sure, that could work. Done.

ghost commented Jan 14, 2013

@9rnsr: Sure, that could work. Done.

@9rnsr

This comment has been minimized.

Show comment
Hide comment
@9rnsr

9rnsr Jan 14, 2013

Member

LGTM.

Member

9rnsr commented Jan 14, 2013

LGTM.

9rnsr added a commit that referenced this pull request Jan 14, 2013

Merge pull request #1479 from AndrejMitrovic/Fix9312
Issue 9312 - With statement diagnostic is wrong

@9rnsr 9rnsr merged commit 6cfa082 into dlang:master Jan 14, 2013

1 check passed

default Pass: 10
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment