mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00
25 lines
346 B
D
25 lines
346 B
D
/*
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/fail8217.d(22): Error: `this` for `foo` needs to be type `D` not type `fail8217.D.C`
|
|
---
|
|
*/
|
|
|
|
class D
|
|
{
|
|
int x;
|
|
template bar()
|
|
{
|
|
int foo()
|
|
{
|
|
return x;
|
|
}
|
|
}
|
|
static class C
|
|
{
|
|
int foo()
|
|
{
|
|
return bar!().foo();
|
|
}
|
|
}
|
|
}
|