-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
embedding: specialize inherited functions.
Fixes #414.
whitequark
committed
May 16, 2016
1 parent
6400221
commit 355af3e
Showing
4 changed files
with
172 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# RUN: %python -m artiq.compiler.testbench.embedding %s | ||
|
||
from artiq.language.core import * | ||
from artiq.language.types import * | ||
|
||
class a: | ||
@kernel | ||
def f(self): | ||
print(self.x) | ||
return None | ||
|
||
class b(a): | ||
x = 1 | ||
class c(a): | ||
x = 2 | ||
|
||
bi = b() | ||
ci = c() | ||
@kernel | ||
def entrypoint(): | ||
bi.f() | ||
ci.f() |