Skip to content

Conversation

@RazvanN7
Copy link
Contributor

No description provided.

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @RazvanN7! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.

Some tips to help speed things up:

  • smaller, focused PRs are easier to review than big ones

  • try not to mix up refactoring or style changes with bug fixes or feature enhancements

  • provide helpful commit messages explaining the rationale behind each change

Bear in mind that large or tricky changes may require multiple rounds of review and revision.

Please see CONTRIBUTING.md for more information.

Bugzilla references

Auto-close Bugzilla Description
18219 Private import inside struct leaks symbols when used as VarDeclaration types

* symbol found, NULL if not
*/
final Dsymbol searchX(Loc loc, Scope* sc, RootObject id)
final Dsymbol searchX(Loc loc, Scope* sc, RootObject id, int flags)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add Params DDoc comment.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally DAutotest should check that and fail respectively (except that we broke it today - #7637)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this ok?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this ok?

IMO, yes. Though I'm looking forward to replacing flags with a proper enum. But that's another PR.

@wilzbach
Copy link
Contributor

Mind the CI failures:

dmd/parsetimevisitor.d(17): Error: no property 'Statement' for type 'ASTCodegen', did you mean 'dmd.statement.Statement'?
dmd/parsetimevisitor.d(19): Error: no property 'Expression' for type 'ASTCodegen', did you mean 'dmd.expression.Expression'?
dmd/parsetimevisitor.d(20): Error: no property 'TemplateParameter' for type 'ASTCodegen', did you mean 'dmd.dtemplate.TemplateParameter'?
dmd/parsetimevisitor.d(21): Error: no property 'Condition' for type 'ASTCodegen', did you mean 'dmd.cond.Condition'?
dmd/parsetimevisitor.d(22): Error: no property 'Initializer' for type 'ASTCodegen', did you mean 'dmd.init.Initializer'?
dmd/parsetimevisitor.d(26): Error: no property 'AliasThis' for type 'ASTCodegen', did you mean 'dmd.aliasthis.AliasThis'?
dmd/parsetimevisitor.d(27): Error: no property 'Declaration' for type 'ASTCodegen', did you mean 'dmd.declaration.Declaration'?
dmd/parsetimevisitor.d(28): Error: no property 'ScopeDsymbol' for type 'ASTCodegen', did you mean 'dmd.dsymbol.ScopeDsymbol'?
dmd/parsetimevisitor.d(29): Error: no property 'Import' for type 'ASTCodegen', did you mean 'dmd.dimport.Import'?
dmd/parsetimevisitor.d(30): Error: no property 'AttribDeclaration' for type 'ASTCodegen', did you mean 'dmd.attrib.AttribDeclaration'?
dmd/parsetimevisitor.d(31): Error: no property 'StaticAssert' for type 'ASTCodegen', did you mean 'dmd.staticassert.StaticAssert'?
dmd/parsetimevisitor.d(32): Error: no property 'DebugSymbol' for type 'ASTCodegen', did you mean 'dmd.dversion.DebugSymbol'?
dmd/parsetimevisitor.d(33): Error: no property 'VersionSymbol' for type 'ASTCodegen', did you mean 'dmd.dversion.VersionSymbol'?
dmd/parsetimevisitor.d(36): Error: no property 'Package' for type 'ASTCodegen', did you mean 'dmd.dmodule.Package'?
dmd/parsetimevisitor.d(37): Error: no property 'EnumDeclaration' for type 'ASTCodegen', did you mean 'dmd.denum.EnumDeclaration'?
dmd/parsetimevisitor.d(38): Error: no property 'AggregateDeclaration' for type 'ASTCodegen', did you mean 'dmd.aggregate.AggregateDeclaration'?
dmd/parsetimevisitor.d(39): Error: no property 'TemplateDeclaration' for type 'ASTCodegen', did you mean 'dmd.dtemplate.TemplateDeclaration'?
dmd/parsetimevisitor.d(40): Error: no property 'TemplateInstance' for type 'ASTCodegen', did you mean 'dmd.dtemplate.TemplateInstance'?
dmd/parsetimevisitor.d(41): Error: no property 'Nspace' for type 'ASTCodegen', did you mean 'dmd.nspace.Nspace'?
dmd/parsetimevisitor.d(45): Error: no property 'VarDeclaration' for type 'ASTCodegen', did you mean 'dmd.declaration.VarDeclaration'?

@RazvanN7
Copy link
Contributor Author

@wilzbach Yeah, I need to talk with @andralex about that.

@wilzbach
Copy link
Contributor

Yeah, I need to talk with @andralex about that.

It looks similar to the bug found in dlang/phobos#5584. I suspect this will need to trigger a deprecation for a while.

JinShil
JinShil previously approved these changes Jan 10, 2018
@JinShil JinShil dismissed their stale review January 10, 2018 10:46

Only meant to approve changes, not the entire PR.

@RazvanN7
Copy link
Contributor Author

After this is merged I sugest we rename searchX which does not say anything to searchTypeMembers
and move it to mtype.d since that is the only place where it is used. Later on, we should move all this functionality out of the AST nodes.

@RazvanN7
Copy link
Contributor Author

Circle/ci and cybershadow fail because the version of the compiler used to compile the compiler is still under the effect of the lookup bug that this PR fixes

@wilzbach
Copy link
Contributor

still under the effect of the lookup bug that this PR fixes

Any way to work around it? You can bump CircleCi at .circleci/run.sh

@wilzbach wilzbach closed this Jan 15, 2018
@wilzbach wilzbach reopened this Jan 15, 2018
src/dmd/mtype.d Outdated
{
if (s)
error(loc, "no property `%s` for type `%s`, did you mean `%s`?", ident.toChars(), toChars(), s.toChars());
error(loc, "no property '%s' for type '%s', did you mean '%s'?", ident.toChars(), toChars(), s.toPrettyChars());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't revert the back ticks.

@RazvanN7
Copy link
Contributor Author

@andralex I transformed the error into a deprecation message.

@WalterBright
Copy link
Member

@RazvanN7 this seems to have introduced a regression https://issues.dlang.org/show_bug.cgi?id=19103

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants