-
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.
compiler: fix quoting of methods (fixes #423).
whitequark
committed
May 9, 2016
1 parent
4c78bb4
commit 4e5d752
Showing
6 changed files
with
129 additions
and
45 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,19 @@ | ||
# RUN: %python -m artiq.compiler.testbench.embedding +diag %s 2>%t | ||
# RUN: OutputCheck %s --file-to-check=%t | ||
|
||
from artiq.language.core import * | ||
from artiq.language.types import * | ||
|
||
class c: | ||
pass | ||
@kernel | ||
def f(): | ||
pass | ||
c.f = f | ||
x = c().f | ||
|
||
@kernel | ||
def entrypoint(): | ||
# CHECK-L: <synthesized>:1: error: function 'f()->NoneType delay('a)' of class 'testbench.c' cannot accept a self argument | ||
# CHECK-L: ${LINE:+1}: note: expanded from here | ||
x |
24 changes: 24 additions & 0 deletions
24
artiq/test/lit/embedding/error_kernel_method_self_unify.py
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,24 @@ | ||
# RUN: %python -m artiq.compiler.testbench.embedding +diag %s 2>%t | ||
# RUN: OutputCheck %s --file-to-check=%t | ||
|
||
from artiq.language.core import * | ||
from artiq.language.types import * | ||
|
||
@kernel | ||
def f(self): | ||
core_log(self.x) | ||
class c: | ||
a = f | ||
x = 1 | ||
class d: | ||
b = f | ||
x = 2 | ||
xa = c().a | ||
xb = d().b | ||
|
||
@kernel | ||
def entrypoint(): | ||
xa() | ||
# CHECK-L: <synthesized>:1: error: cannot unify <instance testbench.d> with <instance testbench.c | ||
# CHECK-L: ${LINE:+1}: note: expanded from here | ||
xb() |
File renamed without changes.