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

connectionpool can't compile any more #2109

Closed
soarowl opened this issue Mar 9, 2018 · 0 comments
Closed

connectionpool can't compile any more #2109

soarowl opened this issue Mar 9, 2018 · 0 comments

Comments

@soarowl
Copy link

soarowl commented Mar 9, 2018

I have snippet:

import vibe.core.connectionpool, vibe.core.net;

void main()
{
    auto m_pool = new ConnectionPool!TCPConnection({
        auto conn = connectTCP("localhost", 8080);
        conn.keepAlive = true;
        return conn;
    }, 10);

    auto conn = m_pool.lockConnection;
    conn.write("hello");
}

It compile under 0.8.2 but not 0.8.3. Has following error messages:

C:\Users\znw\AppData\Roaming\dub\packages\vibe-core-1.4.0\vibe-core\source\vibe\core\connectionpool.d(93,45): Error: template instance vibe.core.net.TCPConnection.opCast!(void*) does not match template declaration opCast(T)() if (is(T == bool))
C:\Users\znw\AppData\Roaming\dub\packages\vibe-core-1.4.0\vibe-core\source\vibe\core\connectionpool.d(179,11): Error: generated function vibe.core.net.TCPConnection.opAssign (TCPConnection p) is not callable using argument types (typeof(null))
C:\Users\znw\AppData\Roaming\dub\packages\vibe-core-1.4.0\vibe-core\source\vibe\core\connectionpool.d(148,10): Error: incompatible types for ((conn) !is (null)): 'TCPConnection' and 'typeof(null)'
source\app.d(5,23): Error: template instance vibe.core.connectionpool.ConnectionPool!(TCPConnection) error instantiating
C:\Users\znw\AppData\Roaming\dub\packages\vibe-core-1.4.0\vibe-core\source\vibe\core\connectionpool.d(161,53): Error: template instance vibe.core.net.TCPConnection.opCast!(void*) does not match template declaration opCast(T)() if (is(T == bool))
C:\Users\znw\AppData\Roaming\dub\packages\vibe-core-1.4.0\vibe-core\source\vibe\core\connectionpool.d(72,2): Error: template instance vibe.core.connectionpool.LockedConnection!(TCPConnection) error instantiating
source\app.d(5,23):        instantiated from here: ConnectionPool!(TCPConnection)
D:\ldc64\bin\ldc2.exe failed with exit code 1.

When I change to dmd 2.79.0, it can't compiled either.

test.zip

s-ludwig added a commit to vibe-d/vibe-core that referenced this issue Mar 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant