Skip to content

Commit

Permalink
regenerate test output; re-express unsupported.mo to report similar e…
Browse files Browse the repository at this point in the history
…rrors
  • Loading branch information
crusso committed Sep 29, 2024
1 parent f7b5c06 commit 0d79f79
Show file tree
Hide file tree
Showing 14 changed files with 87 additions and 106 deletions.
4 changes: 2 additions & 2 deletions test/run-drun/ok/issue-1938-b.comp-ref.ok
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
issue-1938-b.mo:2.1-2.9: type error [M0038], misplaced await
issue-1938-b.mo:2.1-2.9: type error [M0037], misplaced async expression; try enclosing in an async function
issue-1938-b.mo:2.1-2.9: type error [M0141], an actor or actor class must be the only non-imported declaration in a program
(This is a limitation of the current version and flag -ref-system-api.)
4 changes: 2 additions & 2 deletions test/run-drun/ok/issue-1938-b.comp.ok
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
issue-1938-b.mo:2.1-2.9: type error [M0038], misplaced await
issue-1938-b.mo:2.1-2.9: type error [M0037], misplaced async expression; try enclosing in an async function
issue-1938-b.mo:2.1-2.9: type error [M0141], an actor or actor class must be the only non-imported declaration in a program
(This is a limitation of the current version.)
4 changes: 2 additions & 2 deletions test/run-drun/ok/issue-1938-c.comp-ref.ok
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
issue-1938-c.mo:2.1-2.11: type error [M0038], misplaced await
issue-1938-c.mo:2.1-2.11: type error [M0037], misplaced async expression; try enclosing in an async function
issue-1938-c.mo:2.1-2.11: type error [M0141], an actor or actor class must be the only non-imported declaration in a program
(This is a limitation of the current version and flag -ref-system-api.)
4 changes: 2 additions & 2 deletions test/run-drun/ok/issue-1938-c.comp.ok
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
issue-1938-c.mo:2.1-2.11: type error [M0038], misplaced await
issue-1938-c.mo:2.1-2.11: type error [M0037], misplaced async expression; try enclosing in an async function
issue-1938-c.mo:2.1-2.11: type error [M0141], an actor or actor class must be the only non-imported declaration in a program
(This is a limitation of the current version.)
4 changes: 2 additions & 2 deletions test/run-drun/ok/issue-1938.comp-ref.ok
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
issue-1938.mo:2.1-2.11: type error [M0038], misplaced await
issue-1938.mo:2.1-2.11: type error [M0037], misplaced async expression; try enclosing in an async function
issue-1938.mo:2.1-2.11: type error [M0141], an actor or actor class must be the only non-imported declaration in a program
(This is a limitation of the current version and flag -ref-system-api.)
4 changes: 2 additions & 2 deletions test/run-drun/ok/issue-1938.comp.ok
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
issue-1938.mo:2.1-2.11: type error [M0038], misplaced await
issue-1938.mo:2.1-2.11: type error [M0037], misplaced async expression; try enclosing in an async function
issue-1938.mo:2.1-2.11: type error [M0141], an actor or actor class must be the only non-imported declaration in a program
(This is a limitation of the current version.)
5 changes: 2 additions & 3 deletions test/run-drun/ok/unavailable-constructor.comp-ref.ok
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
unavailable-constructor.mo:1.36-1.37: type error [M0056], variable C is in scope but not available in compiled code
unavailable-constructor.mo:5.17-5.18: type error [M0056], variable C is in scope but not available in compiled code
unavailable-constructor.mo:8.31-8.32: type error [M0056], variable C is in scope but not available in compiled code
unavailable-constructor.mo:3.1-11.2: type error [M0141], an actor or actor class must be the only non-imported declaration in a program
(This is a limitation of the current version and flag -ref-system-api.)
5 changes: 2 additions & 3 deletions test/run-drun/ok/unavailable-constructor.comp.ok
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
unavailable-constructor.mo:1.36-1.37: type error [M0056], variable C is in scope but not available in compiled code
unavailable-constructor.mo:5.17-5.18: type error [M0056], variable C is in scope but not available in compiled code
unavailable-constructor.mo:8.31-8.32: type error [M0056], variable C is in scope but not available in compiled code
unavailable-constructor.mo:3.1-11.2: type error [M0141], an actor or actor class must be the only non-imported declaration in a program
(This is a limitation of the current version.)
6 changes: 2 additions & 4 deletions test/run-drun/ok/unsupported-more.comp-ref.ok
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
unsupported-more.mo:2.1-5.2: type error [M0038], misplaced await
unsupported-more.mo:2.1-5.2: type error [M0037], misplaced async expression; try enclosing in an async function
unsupported-more.mo:8.1-8.25: type error [M0038], misplaced await
unsupported-more.mo:8.1-8.25: type error [M0037], misplaced async expression; try enclosing in an async function
unsupported-more.mo:2.1-5.2: type error [M0141], an actor or actor class must be the only non-imported declaration in a program
(This is a limitation of the current version and flag -ref-system-api.)
6 changes: 2 additions & 4 deletions test/run-drun/ok/unsupported-more.comp.ok
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
unsupported-more.mo:2.1-5.2: type error [M0038], misplaced await
unsupported-more.mo:2.1-5.2: type error [M0037], misplaced async expression; try enclosing in an async function
unsupported-more.mo:8.1-8.25: type error [M0038], misplaced await
unsupported-more.mo:8.1-8.25: type error [M0037], misplaced async expression; try enclosing in an async function
unsupported-more.mo:2.1-5.2: type error [M0141], an actor or actor class must be the only non-imported declaration in a program
(This is a limitation of the current version.)
24 changes: 8 additions & 16 deletions test/run-drun/ok/unsupported.comp-ref.ok
Original file line number Diff line number Diff line change
@@ -1,24 +1,16 @@
unsupported.mo:2.1-33.2: type error [M0038], misplaced await
unsupported.mo:2.1-33.2: type error [M0037], misplaced async expression; try enclosing in an async function
unsupported.mo:4.14-4.50: type error [M0126], a shared function cannot be private
unsupported.mo:36.36-36.39: type error [M0077], a shared function is only allowed as a public field of an actor
(This is a limitation of the current version and flag -ref-system-api.)
unsupported.mo:36.26-36.29: type error [M0077], a shared function is only allowed as a public field of an actor
unsupported.mo:50.11-50.43: type error [M0139], inner actor classes are not supported yet; any actor class must come last in your program
(This is a limitation of the current version and flag -ref-system-api.)
unsupported.mo:50.3-50.35: type error [M0139], inner actor classes are not supported yet; any actor class must come last in your program
unsupported.mo:54.11-54.50: type error [M0139], inner actor classes are not supported yet; any actor class must come last in your program
(This is a limitation of the current version and flag -ref-system-api.)
unsupported.mo:54.3-54.42: type error [M0139], inner actor classes are not supported yet; any actor class must come last in your program
unsupported.mo:58.53-58.61: type error [M0069], non-toplevel actor; an actor can only be declared at the toplevel of a program
(This is a limitation of the current version and flag -ref-system-api.)
unsupported.mo:58.45-58.53: type error [M0038], misplaced await
unsupported.mo:58.45-58.53: type error [M0037], misplaced async expression; try enclosing in an async function
unsupported.mo:58.45-58.53: type error [M0069], non-toplevel actor; an actor can only be declared at the toplevel of a program
unsupported.mo:62.47-62.55: type error [M0069], non-toplevel actor; an actor can only be declared at the toplevel of a program
(This is a limitation of the current version and flag -ref-system-api.)
unsupported.mo:62.39-62.47: type error [M0038], misplaced await
unsupported.mo:62.39-62.47: type error [M0037], misplaced async expression; try enclosing in an async function
unsupported.mo:62.39-62.47: type error [M0069], non-toplevel actor; an actor can only be declared at the toplevel of a program
unsupported.mo:72.44-72.47: type error [M0077], a shared function is only allowed as a public field of an actor
(This is a limitation of the current version and flag -ref-system-api.)
unsupported.mo:66.1-66.25: type error [M0038], misplaced await
unsupported.mo:66.1-66.25: type error [M0037], misplaced async expression; try enclosing in an async function
unsupported.mo:72.34-72.37: type error [M0077], a shared function is only allowed as a public field of an actor
unsupported.mo:73.44-73.47: type error [M0077], a shared function is only allowed as a public field of an actor
(This is a limitation of the current version and flag -ref-system-api.)
unsupported.mo:73.27-73.30: type error [M0077], a shared function is only allowed as a public field of an actor
unsupported.mo:4.14-4.50: type error [M0126], a shared function cannot be private
(This is a limitation of the current version and flag -ref-system-api.)
24 changes: 8 additions & 16 deletions test/run-drun/ok/unsupported.comp.ok
Original file line number Diff line number Diff line change
@@ -1,24 +1,16 @@
unsupported.mo:2.1-33.2: type error [M0038], misplaced await
unsupported.mo:2.1-33.2: type error [M0037], misplaced async expression; try enclosing in an async function
unsupported.mo:4.14-4.50: type error [M0126], a shared function cannot be private
unsupported.mo:36.36-36.39: type error [M0077], a shared function is only allowed as a public field of an actor
(This is a limitation of the current version.)
unsupported.mo:36.26-36.29: type error [M0077], a shared function is only allowed as a public field of an actor
unsupported.mo:50.11-50.43: type error [M0139], inner actor classes are not supported yet; any actor class must come last in your program
(This is a limitation of the current version.)
unsupported.mo:50.3-50.35: type error [M0139], inner actor classes are not supported yet; any actor class must come last in your program
unsupported.mo:54.11-54.50: type error [M0139], inner actor classes are not supported yet; any actor class must come last in your program
(This is a limitation of the current version.)
unsupported.mo:54.3-54.42: type error [M0139], inner actor classes are not supported yet; any actor class must come last in your program
unsupported.mo:58.53-58.61: type error [M0069], non-toplevel actor; an actor can only be declared at the toplevel of a program
(This is a limitation of the current version.)
unsupported.mo:58.45-58.53: type error [M0038], misplaced await
unsupported.mo:58.45-58.53: type error [M0037], misplaced async expression; try enclosing in an async function
unsupported.mo:58.45-58.53: type error [M0069], non-toplevel actor; an actor can only be declared at the toplevel of a program
unsupported.mo:62.47-62.55: type error [M0069], non-toplevel actor; an actor can only be declared at the toplevel of a program
(This is a limitation of the current version.)
unsupported.mo:62.39-62.47: type error [M0038], misplaced await
unsupported.mo:62.39-62.47: type error [M0037], misplaced async expression; try enclosing in an async function
unsupported.mo:62.39-62.47: type error [M0069], non-toplevel actor; an actor can only be declared at the toplevel of a program
unsupported.mo:72.44-72.47: type error [M0077], a shared function is only allowed as a public field of an actor
(This is a limitation of the current version.)
unsupported.mo:66.1-66.25: type error [M0038], misplaced await
unsupported.mo:66.1-66.25: type error [M0037], misplaced async expression; try enclosing in an async function
unsupported.mo:72.34-72.37: type error [M0077], a shared function is only allowed as a public field of an actor
unsupported.mo:73.44-73.47: type error [M0077], a shared function is only allowed as a public field of an actor
(This is a limitation of the current version.)
unsupported.mo:73.27-73.30: type error [M0077], a shared function is only allowed as a public field of an actor
unsupported.mo:4.14-4.50: type error [M0126], a shared function cannot be private
(This is a limitation of the current version.)
14 changes: 7 additions & 7 deletions test/run-drun/ok/unsupported.tc.ok
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ unsupported.mo:4.26-4.44: warning [M0194], unused identifier bad_private_shared
unsupported.mo:6.29-6.30: warning [M0194], unused identifier a (delete or rename to wildcard `_` or `_a`)
unsupported.mo:8.32-8.33: warning [M0194], unused identifier f (delete or rename to wildcard `_` or `_f`)
unsupported.mo:30.13-30.14: warning [M0194], unused identifier a (delete or rename to wildcard `_` or `_a`)
unsupported.mo:36.13-36.23: warning [M0194], unused identifier bad_shared (delete or rename to wildcard `_` or `_bad_shared`)
unsupported.mo:50.15-50.28: warning [M0194], unused identifier BadActorClass (delete or rename to wildcard `_` or `_BadActorClass`)
unsupported.mo:54.15-54.28: warning [M0194], unused identifier BadActorClass (delete or rename to wildcard `_` or `_BadActorClass`)
unsupported.mo:54.30-54.31: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`)
unsupported.mo:58.6-58.23: warning [M0194], unused identifier bad_non_top_actor (delete or rename to wildcard `_` or `_bad_non_top_actor`)
unsupported.mo:62.7-62.23: warning [M0194], unused identifier bad_nested_actor (delete or rename to wildcard `_` or `_bad_nested_actor`)
unsupported.mo:69.6-69.20: warning [M0194], unused identifier implicit_async (delete or rename to wildcard `_` or `_implicit_async`)
unsupported.mo:36.23-36.33: warning [M0194], unused identifier bad_shared (delete or rename to wildcard `_` or `_bad_shared`)
unsupported.mo:50.23-50.36: warning [M0194], unused identifier BadActorClass (delete or rename to wildcard `_` or `_BadActorClass`)
unsupported.mo:54.23-54.36: warning [M0194], unused identifier BadActorClass (delete or rename to wildcard `_` or `_BadActorClass`)
unsupported.mo:54.38-54.39: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`)
unsupported.mo:58.14-58.31: warning [M0194], unused identifier bad_non_top_actor (delete or rename to wildcard `_` or `_bad_non_top_actor`)
unsupported.mo:62.15-62.31: warning [M0194], unused identifier bad_nested_actor (delete or rename to wildcard `_` or `_bad_nested_actor`)
unsupported.mo:67.16-67.30: warning [M0194], unused identifier implicit_async (delete or rename to wildcard `_` or `_implicit_async`)
85 changes: 44 additions & 41 deletions test/run-drun/unsupported.mo
Original file line number Diff line number Diff line change
Expand Up @@ -30,45 +30,48 @@ actor Counter {
let a = async { 1; }; // supported async
};

}
;

shared func bad_shared() { }; // unsupported non actor-member

do {
// shared function types are sharable
type wellformed_1 = shared (shared () -> ()) -> async ();
};

do {
// actors are shareable
type wellformed_2 = shared (actor {}) -> async ();
};


do {
actor class BadActorClass () { }; // no actor classes
};

do {
actor class BadActorClass (x : Int) { }; // no actor classes
public func misc_unsupported () : async () {

do {
shared func bad_shared() { }; // unsupported non actor-member
};

do {
// shared function types are sharable
type wellformed_1 = shared (shared () -> ()) -> async ();
};

do {
// actors are shareable
type wellformed_2 = shared (actor {}) -> async ();
};

do {
actor class BadActorClass () { }; // no actor classes
};

do {
actor class BadActorClass (x : Int) { }; // no actor classes
};

do {
let bad_non_top_actor : actor {} = if true actor {} else actor {};
};

do {
let bad_nested_actor = do { let _ = actor {}; ()};
};

do {
// async functions not supported (inference mode)
func implicit_async() : async () { };
};

do {
// anonymous shared functions not supported (inference and checking mode)
let _ = shared func() : async () { };
ignore (shared func() : async () { }) : shared () -> async ();

};
}
};

do {
let bad_non_top_actor : actor {} = if true actor {} else actor {};
};

do {
let bad_nested_actor = do { let _ = actor {}; ()};
};


actor BadSecondActor { };

// async functions not supported (inference mode)
func implicit_async() : async () { };

// anonymous shared functions not supported (inference and checking mode)
let _ = shared func() : async () { };
(shared func() : async () { }) : shared () -> async ();

0 comments on commit 0d79f79

Please sign in to comment.