Skip to content

Commit

Permalink
fix Issue 8217 - static nested class can reference outer scope by tem…
Browse files Browse the repository at this point in the history
…plate instantiation
  • Loading branch information
9rnsr committed Apr 2, 2015
1 parent 838abc6 commit 35f0faf
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions test/fail_compilation/fail8217.d
@@ -0,0 +1,25 @@
/*
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();
}
}
}

0 comments on commit 35f0faf

Please sign in to comment.