mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Remove PropertyBinding rule, just use Binding
This commit is contained in:
parent
abc4e5de65
commit
0a4b5d07a1
16 changed files with 100 additions and 179 deletions
|
@ -114,7 +114,7 @@ class LookupOp(InfixExpr):
|
|||
|
||||
@context(ValueTypeCtx)
|
||||
def value_type(self) -> ValueTypeCtx:
|
||||
return ValueTypeCtx(None)
|
||||
return ValueTypeCtx(None, must_infer_type=True)
|
||||
|
||||
@property
|
||||
def property_name(self) -> str:
|
||||
|
@ -133,6 +133,10 @@ class LookupOp(InfixExpr):
|
|||
@validate("property")
|
||||
def property_exists(self):
|
||||
if self.lhs.type is None:
|
||||
# Literal values throw their own errors if the type isn't known
|
||||
if isinstance(self.lhs, LiteralExpr):
|
||||
return
|
||||
|
||||
raise CompileError(
|
||||
f"Could not determine the type of the preceding expression",
|
||||
hints=[
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue