diff --git a/jni.d b/jni.d index cd3d3be..76db786 100644 --- a/jni.d +++ b/jni.d @@ -1240,7 +1240,7 @@ private enum ImportImplementationString = q{ auto len = (*env).GetStringLength(env, jret); auto ptr = (*env).GetStringChars(env, jret, null); - static if(is(T == wstring)) { + static if(is(typeof(return) == wstring)) { if(ptr !is null) { ret = ptr[0 .. len].idup; (*env).ReleaseStringChars(env, jret, ptr);