Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[attributes] syntax is superceded by @(attributes)

  • Loading branch information...
commit a04cf864b932061ad7b72e7cad8b16fabc6a825a 1 parent af2c21b
@WalterBright WalterBright authored
Showing with 2 additions and 0 deletions.
  1. +1 −0  src/parse.c
  2. +1 −0  src/statement.c
View
1  src/parse.c
@@ -493,6 +493,7 @@ Dsymbols *Parser::parseDeclDefs(int once)
case TOKlbracket:
{
+ warning(loc, "use @(attributes) instead of [attributes]");
@klickverbot Collaborator

Why not just drop the [] syntax altogether? UDAs haven't been released yet, and might not even be in the next release.

@WalterBright Owner

Because some people were using it.

@klickverbot Collaborator

This shouldn't be a problem if it is a pre-release version. You expect stuff to break if you are using a development snapshot.

@jmdavis
jmdavis added a note

Yeah. What's the point in warning about stuff when it hasn't even been released? Just change it and be done with it. I don't see how anyone can expect a new feature which hasn't even been release to necessarily work exactly as it is without any changes before it's actually released. Anyone currently using it is using it at their own risk, and I think that it's foolish to carry technical debt around like this when we don't need to.

@donc Collaborator
donc added a note

++int.max. This has not appeared in any release, and never been documented. You can assume that it's only ever existed in experimental code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Expressions *exps = parseArguments();
a = parseBlock();
s = new UserAttributeDeclaration(exps, a);
View
1  src/statement.c
@@ -5432,6 +5432,7 @@ Statement *ImportStatement::semantic(Scope *sc)
}
s->semantic(sc);
+ s->semantic2(sc);
@MartinNowak Collaborator

This line causes a compiler ICE when the imported module is not found.
How is it related to the added warning?

@WalterBright Owner

It isn't related, it was for the previous change.

Anyhow, I just fixed the breakage.

@9rnsr Collaborator
9rnsr added a note

I'm really not sure why he added the line. It's actually causing a regression issue 14666, so I'm trying to remove it in #4735.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
sc->insert(s);
for (size_t i = 0; i < s->aliasdecls.dim; i++)

1 comment on commit a04cf86

@CyberShadow
Collaborator

This commit introduced a regression:
https://issues.dlang.org/show_bug.cgi?id=14666

Please sign in to comment.
Something went wrong with that request. Please try again.