Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I'm surprised: "metamodel expressions are not yet supported on the Dart backend" #59

Open
welopino opened this issue Jun 30, 2017 · 1 comment

Comments

@welopino
Copy link

welopino commented Jun 30, 2017

I am using ceylon 1.3.2 and the corresponding ceylon-dart plugin.

The dart backend contains a lot of code for the treatment of meta model code.
But a simple program of that sort couldn't be compiled and run.

run.ceylon:

shared void run(){
  value a = `String`;
   print(a);  
}

compiled with command:

$ ./bin/ceylon compile-dart --src=ceylondartMeta/source first

gives:

ceylondartMeta/source/first/run.ceylon:4: warning: unsupported feature: metamodel expressions are not yet supported on the
Dart backend
  value a = `String`;
            ^
1 warning
Note: Created module first/1.0.0

run with command:

$ ./bin/ceylon run-dart first

Unhandled exception:
AssertionError "Meta expressions not yet supported at 'run.ceylon: 4:12-4:19'"
#0      $package$run (file:///tmp/ceylon-run-dart3727661573809872428/first/first.dart:7:41)
#1      _$runToplevel.<anonymous closure> (file:///tmp/ceylon-run-dart3727661573809872428/first/first.dart:16:5)
#2      json$LazyJsonModule.runToplevel (package:ceylon/dart/runtime/model/model.dart:3231:54)
#3      json$LazyJsonModule.runApplication (package:ceylon/dart/runtime/model/model.dart:3175:16)
#4      $run (package:ceylon/language/language.dart:16209:23)
#5      main (file:///tmp/ceylon-run-dart3727661573809872428/first/first.dart:35:3)
#6      _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:263)
#7      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)
@welopino welopino changed the title I'm suprised: "metamodel expressions are not yet supported on the Dart backend" I'm surprised: "metamodel expressions are not yet supported on the Dart backend" Jun 30, 2017
@jvasileff
Copy link
Owner

The dart backend contains a lot of code for the treatment of meta model code

Yeah, and there's a lot more code for this in the topic-reified-generics branch. But it's not quite finished yet.

FTR, with a patch for #58 and using the topic-reified-generics, the program works:

jvasileff@tau:tmp.Yboq6CCf$ cat source/simple/run.ceylon
shared void run(){
  value a = `String`;
   print(a);
}
jvasileff@tau:tmp.Yboq6CCf$ ceylon run-dart --compile simple
Source found for module simple, compiling...
Note: Created module simple/1.0.0
String (type)
jvasileff@tau:tmp.Yboq6CCf$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants