mirror of
https://github.com/carp-lang/Carp.git
synced 2024-09-11 05:25:28 +03:00
Add a valid use of a private binding to private-binding test
This commit is contained in:
parent
915a539d2d
commit
0b34f9b31a
@ -3,6 +3,11 @@
|
||||
(deftype Foo [bar Int])
|
||||
(private Foo.bar)
|
||||
|
||||
(defmodule Foo
|
||||
(defn get [foo]
|
||||
(Foo.bar foo))
|
||||
)
|
||||
|
||||
(defn boo [] @(Foo.bar &(Foo.init 1)))
|
||||
|
||||
(defn main [] (println* (Foo.bar &(Foo.init 1))))
|
||||
|
@ -1,2 +1,2 @@
|
||||
private-bindings.carp:6:16 The binding: Foo.bar is private; it may only be used within the module that defines it.
|
||||
private-bindings.carp:8:26 The binding: Foo.bar is private; it may only be used within the module that defines it.
|
||||
private-bindings.carp:11:16 The binding: Foo.bar is private; it may only be used within the module that defines it.
|
||||
private-bindings.carp:13:26 The binding: Foo.bar is private; it may only be used within the module that defines it.
|
||||
|
Loading…
Reference in New Issue
Block a user