Skip to content
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
3 changes: 1 addition & 2 deletions semaphoreci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ export OS_NAME=linux
export FULL_BUILD="${PULL_REQUEST_NUMBER+false}"
# SemaphoreCI doesn't provide a convenient way to the base branch (e.g. master or stable)
if [ -n "${PULL_REQUEST_NUMBER:-}" ]; then
# detect master/stable without querying the rate-limited API
BRANCH="$(git describe --all | sed -E "s/.*\/([^-/]*)-.*/\1/")"
BRANCH=$((curl -fsSL https://api.github.com/repos/dlang/dmd/pulls/$PULL_REQUEST_NUMBER || echo) | jq -r '.base.ref')
# check if the detected branch actually exists and fallback to master
if ! git ls-remote --exit-code --heads https://github.com/dlang/dmd.git "$BRANCH" > /dev/null ; then
echo "Invalid branch detected: ${BRANCH} - falling back to master"
Expand Down
2 changes: 1 addition & 1 deletion src/dmd/traits.d
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,7 @@ extern (C++) Expression semanticTraits(TraitsExp e, Scope* sc)
// if the parent is an interface declaration
// we must check for functions with the same signature
// in different inherited interfaces
if (sym.isInterfaceDeclaration())
if (sym && sym.isInterfaceDeclaration())
insertInterfaceInheritedFunction(fd, e);
else
exps.push(e);
Expand Down
13 changes: 13 additions & 0 deletions test/compilable/traits.d
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// This file is intended to contain all compilable traits-related tests in an
// effort to keep the number of files in the `compilable` folder to a minimum.

// https://issues.dlang.org/show_bug.cgi?id=19152

class C19152
{
int OnExecute()
{
auto name = __traits(getOverloads, this, "OnExecute").stringof;
return 0;
}
}