Files
Pierre-Marie de Rodat 2b9b33d6a0 Remove __future__ imports and adjust stylechecks
TN: T511-017
2020-05-26 12:33:48 +02:00

29 lines
571 B
Python

"""
Test that structs containing arrays work correctly.
"""
from langkit.dsl import ASTNode, Struct, T, UserField
from langkit.expressions import New, String, langkit_property
from utils import build_and_run
class KV(Struct):
key = UserField(type=T.String)
value = UserField(type=T.String)
class FooNode(ASTNode):
@langkit_property(public=True)
def get():
return New(T.KV, key=String("So"), value=String("What"))
class Example(FooNode):
pass
build_and_run(lkt_file='expected_concrete_syntax.lkt', py_script='main.py')
print('Done')