Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge upstream stable (dlang/dmd@37b74d7219) #3706

Merged
merged 1 commit into from
Apr 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ set(LDC_VERSION "1.26.0") # May be overridden by git hash tag
set(DMDFE_MAJOR_VERSION 2)
set(DMDFE_MINOR_VERSION 0)
set(DMDFE_PATCH_VERSION 96)
set(DMDFE_FIX_LEVEL 0)
set(DMDFE_FIX_LEVEL 1)

set(DMD_VERSION ${DMDFE_MAJOR_VERSION}.${DMDFE_MINOR_VERSION}${DMDFE_PATCH_VERSION})
if(DEFINED DMDFE_FIX_LEVEL)
Expand Down
6 changes: 6 additions & 0 deletions dmd/dcast.d
Original file line number Diff line number Diff line change
Expand Up @@ -1400,7 +1400,13 @@ MATCH implicitConvTo(Expression e, Type t)
{
typeb = toStaticArrayType(e);
if (typeb)
{
// Try: T[] -> T[dim]
// (Slice with compile-time known boundaries to static array)
result = typeb.implicitConvTo(t);
if (result > MATCH.convert)
result = MATCH.convert; // match with implicit conversion at most
}
return;
}

Expand Down
2 changes: 1 addition & 1 deletion dmd/dmangle.d
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ public:
n /= 10;
++ndigits;
}
buf.printf("%u__S%u", ndigits + 4, localNum);
buf.printf("%u__S%u", ndigits + 3, localNum);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion dmd/dsymbol.d
Original file line number Diff line number Diff line change
Expand Up @@ -2206,7 +2206,7 @@ extern (C++) final class AliasAssign : Dsymbol
Dsymbol aliassym; /// replace previous RHS of AliasDeclaration with `aliassym`
/// only one of type and aliassym can be != null

extern (D) this(const ref Loc loc, Identifier ident, Type type, Dsymbol aliasssym)
extern (D) this(const ref Loc loc, Identifier ident, Type type, Dsymbol aliassym)
{
super(loc, null);
this.ident = ident;
Expand Down
2 changes: 1 addition & 1 deletion dmd/dsymbolsem.d
Original file line number Diff line number Diff line change
Expand Up @@ -6690,7 +6690,7 @@ void aliasSemantic(AliasDeclaration ds, Scope* sc)
// pass to distinguish.
// If it is a type, then `.type` is set and getType() will return that
// type. If it is a symbol, then `.aliassym` is set and type is `null` -
// toAlias() will return `.aliasssym`
// toAlias() will return `.aliassym`

const errors = global.errors;
Type oldtype = ds.type;
Expand Down
2 changes: 2 additions & 0 deletions dmd/dtemplate.d
Original file line number Diff line number Diff line change
Expand Up @@ -4879,6 +4879,8 @@ MATCH deduceType(RootObject o, Scope* sc, Type tparam, TemplateParameters* param
if (Type tsa = toStaticArrayType(e))
{
tsa.accept(this);
if (result > MATCH.convert)
result = MATCH.convert; // match with implicit conversion at most
return;
}
}
Expand Down
4 changes: 2 additions & 2 deletions dmd/traits.d
Original file line number Diff line number Diff line change
Expand Up @@ -1450,10 +1450,10 @@ else

if (stc & STC.out_)
push("out");
else if (stc & STC.ref_)
push("ref");
else if (stc & STC.in_)
push("in");
else if (stc & STC.ref_)
push("ref");
else if (stc & STC.lazy_)
push("lazy");
else if (stc & STC.alias_)
Expand Down
2 changes: 1 addition & 1 deletion runtime/druntime
2 changes: 1 addition & 1 deletion runtime/phobos
2 changes: 1 addition & 1 deletion tests/d2/dmd-testsuite