* fix #426 - Full output mode breaks `__traits` completion * Add constant completion for the new isDisabled trait
This commit is contained in:
parent
68bbb51bb7
commit
02a5f40954
24
appveyor.yml
24
appveyor.yml
|
@ -19,18 +19,18 @@ environment:
|
|||
- DC: dmd
|
||||
DVersion: stable
|
||||
arch: x86
|
||||
- DC: ldc
|
||||
DVersion: beta
|
||||
arch: x86
|
||||
- DC: ldc
|
||||
DVersion: beta
|
||||
arch: x64
|
||||
- DC: ldc
|
||||
DVersion: stable
|
||||
arch: x86
|
||||
- DC: ldc
|
||||
DVersion: stable
|
||||
arch: x64
|
||||
# - DC: ldc
|
||||
# DVersion: beta
|
||||
# arch: x86
|
||||
# - DC: ldc
|
||||
# DVersion: beta
|
||||
# arch: x64
|
||||
# - DC: ldc
|
||||
# DVersion: stable
|
||||
# arch: x86
|
||||
# - DC: ldc
|
||||
# DVersion: stable
|
||||
# arch: x64
|
||||
|
||||
skip_tags: false
|
||||
branches:
|
||||
|
|
|
@ -768,6 +768,29 @@ false
|
|||
false
|
||||
)`),
|
||||
ConstantCompletion("isAssociativeArray", `Works like $(D isArithmetic), except it's for associative array types.`),
|
||||
|
||||
ConstantCompletion("isDisabled", r"$(P Takes one argument and returns `true` if it's a function declaration
|
||||
marked with `@disable`.)
|
||||
|
||||
---
|
||||
struct Foo
|
||||
{
|
||||
@disable void foo();
|
||||
void bar(){}
|
||||
}
|
||||
|
||||
static assert(__traits(isDisabled, Foo.foo));
|
||||
static assert(!__traits(isDisabled, Foo.bar));
|
||||
---
|
||||
|
||||
$(P For any other declaration even if `@disable` is a syntactically valid
|
||||
attribute `false` is returned because the annotation has no effect.)
|
||||
|
||||
---
|
||||
@disable struct Bar{}
|
||||
|
||||
static assert(!__traits(isDisabled, Bar));
|
||||
---"),
|
||||
ConstantCompletion("isFinalClass", `Works like $(D isAbstractClass), except it's for final classes.`),
|
||||
ConstantCompletion("isFinalFunction", `$(P Takes one argument. If that argument is a final function,
|
||||
$(D true) is returned, otherwise $(D false).
|
||||
|
|
|
@ -241,7 +241,7 @@ bool sendRequest(Socket socket, AutocompleteRequest request)
|
|||
*/
|
||||
AutocompleteResponse getResponse(Socket socket)
|
||||
{
|
||||
ubyte[1024 * 16] buffer;
|
||||
ubyte[1024 * 24] buffer;
|
||||
auto bytesReceived = socket.receive(buffer);
|
||||
if (bytesReceived == Socket.ERROR)
|
||||
throw new Exception("Incorrect number of bytes received");
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
identifiers
|
||||
allMembers k
|
||||
classInstanceSize k
|
||||
compiles k
|
||||
derivedMembers k
|
||||
getAliasThis k
|
||||
getAttributes k
|
||||
getFunctionAttributes k
|
||||
getFunctionVariadicStyle k
|
||||
getLinkage k
|
||||
getMember k
|
||||
getOverloads k
|
||||
getParameterStorageClasses k
|
||||
getPointerBitmap k
|
||||
getProtection k
|
||||
getUnitTests k
|
||||
getVirtualFunctions k
|
||||
getVirtualIndex k
|
||||
getVirtualMethods k
|
||||
hasMember k
|
||||
identifier k
|
||||
isAbstractClass k
|
||||
isAbstractFunction k
|
||||
isArithmetic k
|
||||
isAssociativeArray k
|
||||
isDisabled k
|
||||
isFinalClass k
|
||||
isFinalFunction k
|
||||
isFloating k
|
||||
isFuture k
|
||||
isIntegral k
|
||||
isLazy k
|
||||
isNested k
|
||||
isOut k
|
||||
isOverrideFunction k
|
||||
isPOD k
|
||||
isRef k
|
||||
isSame k
|
||||
isScalar k
|
||||
isStaticArray k
|
||||
isStaticFunction k
|
||||
isTemplate k
|
||||
isUnsigned k
|
||||
isVirtualFunction k
|
||||
isVirtualMethod k
|
||||
parent k
|
|
@ -0,0 +1 @@
|
|||
__traits(
|
|
@ -0,0 +1,5 @@
|
|||
set -e
|
||||
set -u
|
||||
|
||||
../../bin/dcd-client $1 file.d -c 9 > actual.txt
|
||||
diff actual.txt expected.txt
|
Loading…
Reference in New Issue