Skip to content

Commit fa98d32

Browse files
committed
Added error test case for attempting to require implementation parameters for main function
1 parent 35ce0a2 commit fa98d32

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

Diff for: src/hash_map_ext.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ impl<K: Hash + Eq + Clone, V> HashMapExt<K, V> for HashMap<K, V> {
1818
value: V,
1919
or_else: FnOrElse,
2020
) -> Result<(), E> {
21-
// Unfortantely there isn't an API provided to do this without having
21+
// Unfortunately there isn't an API provided to do this without having
2222
// to do the lookup twice or cloning the key, so we will prefer the double lookup.
2323
if self.contains_key(key) {
2424
Err(or_else(key))

Diff for: src/index_map_ext.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ impl<K: Equivalent<K> + Hash + Eq, V> IndexMapExt<K, V> for IndexMap<K, V> {
2323
value: V,
2424
or_else: FnOrElse,
2525
) -> Result<(), E> {
26-
// Unfortantely there isn't an API provided to do this without having
26+
// Unfortunately there isn't an API provided to do this without having
2727
// to do the lookup twice or cloning the key, so we will prefer the double lookup.
2828
if self.contains_key(&key) {
2929
Err(or_else(key))

Diff for: tests/error/using_on_main/main.adept

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
pragma => adept("3.0")
3+
4+
trait Say {
5+
func say() void
6+
}
7+
8+
#[using $say Say]
9+
func main {}
10+

0 commit comments

Comments
 (0)